From: Daniel Barkalow <barkalow@iabervon.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Jeff King <peff@peff.net>,
git@vger.kernel.org, "Randal L. Schwartz" <merlyn@stonehenge.com>
Subject: Re: recent change in git.git/master broke my repos
Date: Sat, 27 Oct 2007 16:06:37 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0710271600440.7345@iabervon.org> (raw)
In-Reply-To: <7vejfhulzn.fsf@gitster.siamese.dyndns.org>
On Fri, 26 Oct 2007, Junio C Hamano wrote:
> Daniel Barkalow <barkalow@iabervon.org> writes:
>
> > On Thu, 25 Oct 2007, Jeff King wrote:
> >
> >> On Thu, Oct 25, 2007 at 07:32:36AM -0700, Randal L. Schwartz wrote:
> >>
> >> > I have echo "ref: refs/remotes/origin/master" >.git/refs/heads/upstream
> >> > so that my daily update script can go:
> >> >
> >> > git-fetch
> >> > if [ repo is on master, and is not dirty ];
> >> > git-merge upstream
> >> > fi
> >> >
> >> > Yesterday that worked.
> >> >
> >> > Today I get a rash of:
> >> >
> >> > fatal: Couldn't find remote ref refs/remotes/origin/master
> >> >
> >> > from my git-fetch.
> >>
> >> Randal and I discussed this a bit on IRC, and it turns out not to be
> >> related to the 'upstream' symref. Instead, he had a broken
> >> branch.master.merge config that pointed to "refs/remotes/origin/master"
> >> (which you can see from his script above doesn't actually get used).
> >>
> >> So presumably the old git-fetch didn't care that the contents of
> >> branch.*.master didn't exist (it's just that nothing got marked for
> >> merging), but the one just merged from the db/fetch-pack topic does.
> >>
> >> Is this behavior change intentional?
> >
> > It's not exactly intentional; it's just that nobody seems to have tested
> > this particular misconfiguration. It should probably report an error
> > (since the configuration is, in fact, broken and potentially misleading),
> > but it probably shouldn't be fatal and certainly shouldn't be so
> > uninformative.
>
> How would we proceed from here, then?
>
> If you had "branch.master.merge = refs/heads/foobar", kept
> running happily, and suddenly the remote stopped carrying that
> foobar branch, you would get a configuration that uses
> nonexistent remote branch name, so this is not purely a
> configuration error on the fetcher's side.
True, although I'd consider that a matter of configuration rot rather than
it being an okay configuration; the user probably still needs to figure
out what happened to it and what to use instead. Maybe we want to output a
message to stderr (although higher than the die() used to be, so that we
can report the reason that it was looking for the missing remote ref).
> Older git used to enumerate remote tracking branches explicitly,
> and one of the remote.origin.fetch entries would have said
> "refs/heads/foobar:refs/remotes/origin/foobar", and that would
> have made git-fetch fail with the error, complaining that such a
> branch does not exist.
>
> You are suggesting that git-fetch should not fail if
> remote.origin.fetch is refs/heads/*:refs/remotes/origin/*
> wildcard, and I think I can agree with that; "git pull" however
> should notice and and exit with an error.
>
> Perhaps something like this?
That looks like what I was going to write when I got to it (although I
would have had the flag inverted, which is less git style, I guess).
Acked-By: Daniel Barkalow <barkalow@iabervon.org>
-Daniel
*This .sig left intentionally blank*
prev parent reply other threads:[~2007-10-27 20:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-25 14:32 recent change in git.git/master broke my repos Randal L. Schwartz
2007-10-25 15:01 ` Karl Hasselström
2007-10-25 17:46 ` Nicolas Pitre
2007-10-25 18:29 ` Randal L. Schwartz
2007-10-25 20:23 ` Andreas Ericsson
2007-10-25 20:38 ` Nicolas Pitre
2007-10-25 20:42 ` Andreas Ericsson
2007-10-26 7:39 ` Karl Hasselström
2007-10-25 15:51 ` Jeff King
2007-10-25 15:55 ` Randal L. Schwartz
2007-10-25 15:57 ` Jeff King
2007-10-25 15:58 ` Randal L. Schwartz
2007-10-25 16:01 ` Jeff King
2007-10-25 16:06 ` Randal L. Schwartz
2007-10-25 16:56 ` Jeff King
2007-10-25 18:05 ` Daniel Barkalow
2007-10-27 6:09 ` Junio C Hamano
2007-10-27 20:06 ` Daniel Barkalow [this message]
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=Pine.LNX.4.64.0710271600440.7345@iabervon.org \
--to=barkalow@iabervon.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=merlyn@stonehenge.com \
--cc=peff@peff.net \
/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 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).