git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG?] `config branch.autosetuprebase true` breaks `rev-parse --is-inside-work-tree`
@ 2014-10-08 11:22 Richard Hartmann
  2014-10-08 17:35 ` Junio C Hamano
  2014-10-08 20:09 ` brian m. carlson
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Hartmann @ 2014-10-08 11:22 UTC (permalink / raw)
  To: Git List

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.


richih@titanium  ~ % mkdir git_test
richih@titanium  ~ % cd git_test
richih@titanium  ~/git_test % git init
Initialized empty Git repository in /home/richih/git_test/.git/
richih@titanium (git)-[master] ~/git_test % git rev-parse --is-inside-work-tree
true
richih@titanium (git)-[master] ~/git_test % git config
branch.autosetuprebase true
richih@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
richih@titanium  ~/git_test % cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[branch]
autosetuprebase = true
richih@titanium  ~/git_test % git --version
git version 2.1.1
richih@titanium  ~/git_test %


Thanks,
Richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-08 20:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-08 11:22 [BUG?] `config branch.autosetuprebase true` breaks `rev-parse --is-inside-work-tree` Richard Hartmann
2014-10-08 17:35 ` Junio C Hamano
2014-10-08 17:52   ` Junio C Hamano
2014-10-08 19:04   ` Tanay Abhra
2014-10-08 20:09 ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).