Skip to content

adjust git call supported by older git clients #7155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Dec 1, 2023

motivation: new git call added does not work with older git clients (eg Centos7)

changes: use "git config --get remote.origin.url" instead of "git remote get-url origin"

[root@d6ebe024717b code]# cat /etc/*-release
CentOS Linux release 7.9.2009 (Core)
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

CentOS Linux release 7.9.2009 (Core)
CentOS Linux release 7.9.2009 (Core)
[root@d6ebe024717b code]# git remote get-url origin
error: Unknown subcommand: get-url
usage: git remote [-v | --verbose]
   or: git remote add [-t <branch>] [-m <master>] [-f] [--tags|--no-tags] [--mirror=<fetch|push>] <name> <url>
   or: git remote rename <old> <new>
   or: git remote remove <name>
   or: git remote set-head <name> (-a | -d | <branch>)
   or: git remote [-v | --verbose] show [-n] <name>
   or: git remote prune [-n | --dry-run] <name>
   or: git remote [-v | --verbose] update [-p | --prune] [(<group> | <remote>)...]
   or: git remote set-branches [--add] <name> <branch>...
   or: git remote set-url [--push] <name> <newurl> [<oldurl>]
   or: git remote set-url --add <name> <newurl>
   or: git remote set-url --delete <name> <url>

    -v, --verbose         be verbose; must be placed before a subcommand

[root@d6ebe024717b code]# git config --get remote.origin.url
[email protected]:tomerd/swift-package-manager.git
root@12f8f2570822:/code# cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
root@12f8f2570822:/code# git remote get-url origin
[email protected]:tomerd/swift-package-manager.git
root@12f8f2570822:/code# git config --get remote.origin.url
[email protected]:tomerd/swift-package-manager.git

motivaiton: new git call added does not work with older git clients (ag Centos7)

changes: use "git config --get remote.origin.url" instead of "git remote get-url origin"
@tomerd
Copy link
Contributor Author

tomerd commented Dec 1, 2023

@swift-ci test

@tomerd tomerd enabled auto-merge (squash) December 1, 2023 19:11
@tomerd tomerd disabled auto-merge December 1, 2023 19:11
@tomerd tomerd enabled auto-merge (squash) December 1, 2023 19:11
@tomerd tomerd merged commit 8387798 into swiftlang:main Dec 1, 2023
tomerd added a commit to tomerd/swift-package-manager that referenced this pull request Dec 2, 2023
motivation: new git call added does not work with older git clients (eg Centos7)

changes: use "git config --get remote.origin.url" instead of "git remote
get-url origin"
tomerd added a commit that referenced this pull request Dec 2, 2023
motivation: new git call added does not work with older git clients (eg Centos7)

changes: use "git config --get remote.origin.url" instead of "git remote
get-url origin"
MaxDesiatov pushed a commit that referenced this pull request Dec 2, 2023
motivation: new git call added does not work with older git clients (eg Centos7)

changes: use "git config --get remote.origin.url" instead of "git remote
get-url origin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants