Richard Hartmann
2014-10-08 11:22:33 UTC
Dear all,
I am not sure if this is an actual bug or just a corner case that's
not worth to be fixed.
This was not tested with HEAD or even 2.1.2, but 2.1.1.
Notwithstanding if the setting is correct, shouldn't rev-parse be
resilient enough to at least be able to tell if we're in a work tree?
I understand why `git status` and the like would need to parse the
full config, but determining if you're in a work tree should be
possible in most if not all cases.
Unless detached work trees get you into a situation where you really
need to parse the whole config...
So this is not a real bug report, more of a "is this intended this way?"
As you can see, my custom prompt (via vcs_info in Zsh) breaks due to
that which is how I noticed.
***@titanium ~ % mkdir git_test
***@titanium ~ % cd git_test
***@titanium ~/git_test % git init
Initialized empty Git repository in /home/richih/git_test/.git/
***@titanium (git)-[master] ~/git_test % git rev-parse --is-inside-work-tree
true
***@titanium (git)-[master] ~/git_test % git config
branch.autosetuprebase true
***@titanium ~/git_test % git rev-parse --is-inside-work-tree
error: Malformed value for branch.autosetuprebase
fatal: bad config file line 8 in .git/config
***@titanium ~/git_test % cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch]
autosetuprebase = true
***@titanium ~/git_test % git --version
git version 2.1.1
***@titanium ~/git_test %
Thanks,
Richard
I am not sure if this is an actual bug or just a corner case that's
not worth to be fixed.
This was not tested with HEAD or even 2.1.2, but 2.1.1.
Notwithstanding if the setting is correct, shouldn't rev-parse be
resilient enough to at least be able to tell if we're in a work tree?
I understand why `git status` and the like would need to parse the
full config, but determining if you're in a work tree should be
possible in most if not all cases.
Unless detached work trees get you into a situation where you really
need to parse the whole config...
So this is not a real bug report, more of a "is this intended this way?"
As you can see, my custom prompt (via vcs_info in Zsh) breaks due to
that which is how I noticed.
***@titanium ~ % mkdir git_test
***@titanium ~ % cd git_test
***@titanium ~/git_test % git init
Initialized empty Git repository in /home/richih/git_test/.git/
***@titanium (git)-[master] ~/git_test % git rev-parse --is-inside-work-tree
true
***@titanium (git)-[master] ~/git_test % git config
branch.autosetuprebase true
***@titanium ~/git_test % git rev-parse --is-inside-work-tree
error: Malformed value for branch.autosetuprebase
fatal: bad config file line 8 in .git/config
***@titanium ~/git_test % cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch]
autosetuprebase = true
***@titanium ~/git_test % git --version
git version 2.1.1
***@titanium ~/git_test %
Thanks,
Richard