git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Daniel Barkalow <barkalow@iabervon.org>
Cc: Steven Grimm <koreth@midwinter.com>, git@vger.kernel.org
Subject: Re: [PATCH] Allow update hooks to update refs on their own
Date: Tue, 27 Nov 2007 19:49:31 -0800	[thread overview]
Message-ID: <7vzlwz9ghg.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0711272143470.5349@iabervon.org> (Daniel Barkalow's message of "Tue, 27 Nov 2007 22:25:32 -0500 (EST)")

Daniel Barkalow <barkalow@iabervon.org> writes:

> On Tue, 27 Nov 2007, Steven Grimm wrote:
>
>> On Nov 27, 2007, at 5:19 PM, Junio C Hamano wrote:
>> 
>> >How does this interact with the "pretend to have fetched back
>> >immediately" supported by modern git-push?
>> 
>> 
>> That continues to fire, but it updates the local tracking ref to point to the
>> SHA1 that was pushed, which isn't the actual remote ref. So you have to do a
>> real fetch to get the local tracking ref pointed to the right place. In other
>> words, that feature doesn't do any good in this context, but it doesn't really
>> hurt anything either.
>> 
>> It would of course be better if git-push could notice that it needs to do an
>> actual fetch. I think it'd be sufficient to transmit the final remote ref SHA1
>> back to git-push, and if it doesn't match what was pushed, that's a sign that
>> a fetch is needed. But that change wouldn't be mutually exclusive with this
>> patch, I believe.
>
> Couldn't you do this with a status message? ("ok <refname> changed by 
> hook" or something.)
>
> I disagree that the feature doesn't do any good; it records that the state 
> of the remote is at least as new as the local state, so you can tell 
> without a network connection that you don't have any local changes you 
> haven't sent off.

Yeah, and I am wondering why update hook needs to be changed for this.
Didn't we introduce post-receive exactly for this sort of thing?

  reply	other threads:[~2007-11-28 11:19 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27 21:17 [PATCH] Allow update hooks to update refs on their own Steven Grimm
2007-11-27 21:21 ` Jakub Narebski
2007-11-27 21:23   ` Steven Grimm
2007-11-28  1:19 ` Junio C Hamano
2007-11-28  2:40   ` Steven Grimm
2007-11-28  3:25     ` Daniel Barkalow
2007-11-28  3:49       ` Junio C Hamano [this message]
2007-11-28  5:20         ` Steven Grimm
2007-11-28 16:10       ` Jeff King
2007-11-28 19:00         ` Junio C Hamano
2007-11-28 19:41           ` Steven Grimm
2007-11-28 19:49             ` Jeff King
2007-11-28 20:16               ` Steven Grimm
2007-11-28 20:22                 ` Jeff King
2007-11-28 22:01                 ` Junio C Hamano
2007-11-28 22:14                 ` [PATCH v3] " Steven Grimm
2007-11-28 23:03                   ` Jeff King
2007-11-28 23:42                     ` Junio C Hamano
2007-11-29  6:44                       ` Steven Grimm
2007-11-30  1:06                         ` Junio C Hamano
2007-12-02 21:22                           ` [PATCH v4] " Steven Grimm
2007-12-02 21:56                             ` Junio C Hamano
2007-12-03  2:13                             ` Jeff King
2007-12-03  2:16                               ` Junio C Hamano
2007-12-03  3:45                                 ` Junio C Hamano
2007-12-05 22:14                                 ` Steven Grimm
2007-12-05 22:19                                   ` Junio C Hamano
2007-12-05 22:29                                     ` Junio C Hamano
2007-12-06  5:57                                     ` Jeff King
2007-12-06  6:30                                       ` Junio C Hamano
2007-12-06  6:36                                         ` Jeff King
2007-12-06  7:50                                           ` Steven Grimm
2007-12-03  4:01                             ` Shawn O. Pearce
2007-12-03  5:25                               ` Junio C Hamano
2007-12-04  1:55                                 ` Shawn O. Pearce
2007-12-03 11:47                               ` Johannes Schindelin
2007-12-04  1:51                                 ` Shawn O. Pearce
2007-12-04  2:12                                   ` Johannes Schindelin
2007-12-04  2:20                                     ` Shawn O. Pearce
2007-12-04  2:25                                       ` Johannes Schindelin
2007-12-04  2:33                                         ` Steven Grimm
2007-12-04  2:34                                         ` Shawn O. Pearce
2007-11-28 21:49               ` [PATCH] " Junio C Hamano
2007-11-28 22:37                 ` Jeff King

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=7vzlwz9ghg.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=barkalow@iabervon.org \
    --cc=git@vger.kernel.org \
    --cc=koreth@midwinter.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).