Thread (2 messages) 2 messages, 2 authors, 2016-06-15

Re: [BUG?] `config branch.autosetuprebase true` breaks `rev-parse --is-inside-work-tree`

flat view

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:02:40

Richard Hartmann [off-list ref] writes:
So this is not a real bug report, more of a "is this intended this way?"
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
...
[branch]
autosetuprebase = true
It does not seem to be limited to rev-parse but having a malformed
configuration for that variable would break everything Git, which
certainly is not how it is supposed to work.  It also seems that the
breakage dates back very far into the past (I checked 1.7.0 and it
seems to be broken the same way).

The same breakage exists for branch.autosetupmerge, I think, e.g.

	[branch]
                autosetupmerge = garbage

In config.c, git_default_branch_config() must be corrected to set
git_branch_track and autorebase to BRANCH_TRACK_MALFORMED and
AUTOREBASE_MALFORMED and the users of these two variables must be
fixed to deal with the "malformed in the configuration" cases, I
think.  The error should happen only in the codepath where we need
the value, and no other places.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help