From: Junio C Hamano <gitster@pobox.com>
To: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [BUG?] `config branch.autosetuprebase true` breaks `rev-parse --is-inside-work-tree`
Date: Wed, 08 Oct 2014 10:35:46 -0700 [thread overview]
Message-ID: <xmqqppe2bh1p.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CAD77+gTuqbZimEK-=gXY8o4wFqOicFvnQ5MnV6Fq1npuckwYFQ@mail.gmail.com> (Richard Hartmann's message of "Wed, 8 Oct 2014 13:22:33 +0200")
Richard Hartmann <richih.mailinglist@gmail.com> 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.
next prev parent reply other threads:[~2014-10-08 17:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2014-10-08 17:52 ` Junio C Hamano
2014-10-08 19:04 ` Tanay Abhra
2014-10-08 20:09 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqppe2bh1p.fsf@gitster.dls.corp.google.com \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=richih.mailinglist@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.