Skip to content
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

hub breaks git -C for the git remote command #1105

Closed
ilovezfs opened this issue Feb 7, 2016 · 3 comments
Closed

hub breaks git -C for the git remote command #1105

ilovezfs opened this issue Feb 7, 2016 · 3 comments
Labels

Comments

@ilovezfs
Copy link

ilovezfs commented Feb 7, 2016

Josephs-MacBook-Pro:~ joe$ /usr/bin/git --version
git version 1.8.5.2 (Apple Git-48)
Josephs-MacBook-Pro:~ joe$ /usr/local/bin/git --version
git version 2.7.1
Josephs-MacBook-Pro:~ joe$ alias | grep hub
alias git='hub'
Josephs-MacBook-Pro:~ joe$ git --version
git version 2.7.1
hub version 2.2.3
Josephs-MacBook-Pro:~ joe$ hub --version
git version 2.7.1
hub version 2.2.3
Josephs-MacBook-Pro:~ joe$ /usr/bin/git -C /usr/local remote
ilovezfs
ilovezfs_local
origin
this
Josephs-MacBook-Pro:~ joe$ /usr/local/bin/git -C /usr/local remote
ilovezfs
ilovezfs_local
origin
this
Josephs-MacBook-Pro:~ joe$ git -C /usr/local remote
fatal: Not a git repository (or any of the parent directories): .git
Josephs-MacBook-Pro:~ joe$ hub -C /usr/local remote
fatal: Not a git repository (or any of the parent directories): .git
@mislav
Copy link
Owner

mislav commented Feb 9, 2016

Thanks for reporting! I definitely see the issue.

@ilovezfs
Copy link
Author

Tested locally, and fix confirmed! Thanks for getting to it so quickly. Any chance a new version could be tagged so that Homebrew will get the update?

@nesl247
Copy link

nesl247 commented Feb 16, 2016

Just spent the last few hours tracking down an issue in another project and found this as the cause. Would definitely love to see a new tag.

pcorpet added a commit to pcorpet/hub that referenced this issue Feb 16, 2016
 - use Git root dir instead of working dir to pick a repo name.

Fixes mislav#1105.
mislav added a commit that referenced this issue Feb 28, 2016
The `create` and `remote` commands needs to infer the current project
name from the project's directory. Instead of using the current working
directory, which doesn't necessarily match the project's toplevel
directory, use `git rev-parse --show-toplevel` which also respects the
`-C` global flag setting.

Fixes #1105, closes #1114
mislav added a commit that referenced this issue Aug 7, 2016
The `create` and `remote` commands needs to infer the current project
name from the project's directory. Instead of using the current working
directory, which doesn't necessarily match the project's toplevel
directory, use `git rev-parse --show-toplevel` which also respects the
`-C` global flag setting.

Fixes #1105, closes #1114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants