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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Hartmann <richih.mailinglist@xxxxxxxxx> 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.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]