git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Pearce <spearce@spearce.org>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: git pull for update of netdev fails.
Date: Wed, 20 Sep 2006 17:49:03 -0400	[thread overview]
Message-ID: <20060920214903.GF24415@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.63.0609202333320.19042@wbgn013.biozentrum.uni-wuerzburg.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> On Wed, 20 Sep 2006, Shawn Pearce wrote:
> > The server side could also check if the current value in the ref
> > (if it exists) is contained within the new value of the ref.  Yes,
> > I know it doesn't today, but the point is it could.  And I was
> > saying maybe it should when there is no update hook present.
> 
> The point being that this check is not necessarily inexpensive.

But its not _that_ expensive.  If the option is set to refuse
non-fast forwards then you take the hit and do the check; if its
set to allow them then you can bypass the check entirely and let
the client direct it (like it does today).  Speed vs. safety.

I currently use "git rev-list $2..$1" in my update hooks to make sure
the update is strictly a fast-foward type update for all branches.
Enabling this option and having the check run in receive-pack would
be faster than what I'm doing now (one less fork).

> But you 
> are right, we could introduce this as a security measure. But is it really 
> intuitive to skip this test when an update hook is added?

Now that you say it, no.  These two things (update hook and non-fast
forward update) are unrelated.  If the update hook wants to make
the decision on a per branch basis then the option to allow a
non-fast forward push must be enabled in the config file.
 
> I'd rather set another config variable with --shared, which tells git to 
> refuse receiving non-fast-forwards. This could be a sensible setting in 
> other setups than shared ones after all. Thoughts?

Agree completely.

-- 
Shawn.

  parent reply	other threads:[~2006-09-20 21:49 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-20 15:03 git pull for update of netdev fails Stephen Hemminger
2006-09-20 15:28 ` Linus Torvalds
2006-09-20 15:54   ` Petr Baudis
2006-09-20 16:02     ` Johannes Schindelin
2006-09-20 16:07       ` Petr Baudis
2006-09-20 16:19         ` Linus Torvalds
2006-09-20 16:26           ` Linus Torvalds
2006-09-20 16:34             ` Shawn Pearce
2006-09-20 16:49               ` Linus Torvalds
2006-09-20 17:10                 ` Shawn Pearce
2006-09-20 21:23               ` Johannes Schindelin
2006-09-20 21:27                 ` Shawn Pearce
2006-09-20 21:37                   ` Johannes Schindelin
2006-09-20 21:42                     ` Junio C Hamano
2006-09-20 21:53                       ` Johannes Schindelin
2006-09-20 21:53                       ` Shawn Pearce
2006-09-20 21:49                     ` Shawn Pearce [this message]
2006-09-20 16:28           ` Shawn Pearce
2006-09-20 16:38             ` Linus Torvalds
2006-09-20 21:14           ` Johannes Schindelin
2006-09-20 21:21             ` Shawn Pearce
2006-09-20 21:27               ` Johannes Schindelin
2006-09-20 21:40                 ` Shawn Pearce
2006-09-20 22:34             ` Jakub Narebski
2006-09-23  3:44             ` Petr Baudis
2006-09-23  4:00               ` Shawn Pearce
2006-09-23  4:09                 ` Petr Baudis
2006-09-23 13:15                   ` Catalin Marinas
2006-09-23 13:10               ` Catalin Marinas
2006-09-24 20:54                 ` Petr Baudis
2006-09-25 12:47                   ` Catalin Marinas
2006-09-20 16:05     ` Junio C Hamano
2006-09-20 16:18       ` Petr Baudis
2006-09-20 16:33         ` Linus Torvalds
2006-09-20 20:01         ` Jakub Narebski
2006-09-20 16:15     ` Linus Torvalds
2006-09-20 16:59       ` Shawn Pearce
2006-09-20 17:34         ` Linus Torvalds
2006-09-20 23:12         ` Krzysztof Halasa
2006-09-23  4:18       ` Petr Baudis
2006-09-20 19:58     ` Jakub Narebski
2006-09-21  9:14       ` Johannes Schindelin
2006-09-20 19:24   ` Jeff Garzik

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=20060920214903.GF24415@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    /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).