From: Jeff King <peff@peff.net>
To: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Cc: Jakub Narebski <jnareb@gmail.com>,
Jonathan Nieder <jrnieder@gmail.com>,
Vitaliy Semochkin <vitaliy.se@gmail.com>,
git@vger.kernel.org, Sverre Rabbelier <srabbelier@gmail.com>
Subject: Re: history missing
Date: Mon, 8 Nov 2010 13:28:02 -0500 [thread overview]
Message-ID: <20101108182801.GC30428@sigill.intra.peff.net> (raw)
In-Reply-To: <AANLkTi=eFJ5qTWLD-AdczeDtSAtxs9xihuO+QQ8tVLyj@mail.gmail.com>
On Mon, Nov 08, 2010 at 09:14:27AM -0500, Martin von Zweigbergk wrote:
> On Mon, Nov 8, 2010 at 8:48 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> > On Mon, 8 Nov 2010, Martin von Zweigbergk wrote:
> >> Sorry, maybe I misunderstood what the confusion was about. What I was
> >> referring to was the confusion caused by 'git fetch origin master' not
> >> updating 'refs/remotes/origin/master'.
> >
> > Should it really do it? What if it does not exist? What if <remote>
> > is specified via URL?
>
> I would probably not expect it to be updated (even if the URL matches a
> configured remove). If the reference does not yet exist, I think I would
> expect it to be created.
Yeah, the patch I posted a while back (and referenced below) does not
convert URLs into remote names (nor do I think it should). But if you
give it the name of a configured remote, and it is fetching a ref from
the remote that is mentioned on the LHS of a configured fetch refspec,
it will update the matching RHS of that refspec opportunistically.
So it should be pretty unsurprising to the user (see the thread below
for some discussion of when it could be surprising).
> Also see http://thread.gmane.org/gmane.comp.version-control.git/127163/.
> Junio, Jeff and Avery can argue much better for and against this than I
> can. I read it at some point, but I don't quite remember now if they did
> discuss the historical reasons for the current behavior in that thread.
I took a look at cleaning up the patch from that thread. It causes 4 of
the test scripts to fail. Most disturbing is this one:
$ grep explicit.fetch t/t5510-fetch.sh
test_expect_success 'explicit fetch should not update tracking' '
which checks for the direct opposite of the behavior we are discussing.
The test was added by Junio in late 2007. However, I can't seem to find
any discussion on the mailing list about it. Junio, do you remember
anything about this?
-Peff
next prev parent reply other threads:[~2010-11-08 18:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 19:47 history missing Vitaliy Semochkin
2010-10-26 20:04 ` Sverre Rabbelier
2010-11-08 9:02 ` Jonathan Nieder
2010-11-08 11:56 ` Martin von Zweigbergk
2010-11-08 13:29 ` Jakub Narebski
2010-11-08 13:37 ` Martin von Zweigbergk
2010-11-08 13:48 ` Jakub Narebski
2010-11-08 14:14 ` Martin von Zweigbergk
2010-11-08 18:28 ` Jeff King [this message]
2010-11-08 11:29 ` Alex Riesen
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=20101108182801.GC30428@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jnareb@gmail.com \
--cc=jrnieder@gmail.com \
--cc=martin.von.zweigbergk@gmail.com \
--cc=srabbelier@gmail.com \
--cc=vitaliy.se@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 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).