git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Pearce <spearce@spearce.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Petr Baudis <pasky@suse.cz>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: git pull for update of netdev fails.
Date: Wed, 20 Sep 2006 13:10:12 -0400	[thread overview]
Message-ID: <20060920171012.GF23260@spearce.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0609200942550.4388@g5.osdl.org>

Linus Torvalds <torvalds@osdl.org> wrote:
> On Wed, 20 Sep 2006, Shawn Pearce wrote:
> > I worked on a project not to long ago in which a user tried `git
> > push`, received a "not a fast-forward" error, didn't know what it
> > meant, tried `git push --force`, found that worked, and proceeded
> > to force every push he did from then on.  To much gnashing of teeth
> > from everyone else.
> 
> Ouch. That implies that we made it a bit too easy to force things, or that 
> we have an insufficiently clear error message.

I've been lucky that I've only run into two people in my life that
when faced with an error message they don't understand immediately
try adding "-f" and "--force" to the command line until something
happens.  Its entertaining to read their terminal scrollback and
see what they did in response to errors; its less so when they've
done mildy destructive things that you now must cleanup.

Sometimes I wonder if they've managed to reformat their root
filesystem while they had it mounted.  Never asked.  Not sure I
want to hear the answer.
 
> I think the current error message is fairly good: it says
> 
> 	"remote '%s' is not a strict subset of local ref '%s'. maybe you 
> 	 are not up-to-date and need to pull first?"
> 
> which should be clear enough, but I'm hoping this was a long time ago when 
> we weren't as clear (we added the "maybe you're not up-to-date .." 
> language later)

Yes; this problem was back with Git 1.2 so the newer language is
much better and should help new users better.
 
> > Of course an update hook finally took care of the problem, but having
> > non fast-forward pushs be permitted on a shared, bare repository
> > by default is interesting to say the least.  :-)
> 
> Yeah, well, it's not permitted "by default", but obviously "--force" ends 
> up being a client-side decision, so with clueless clients, the default 
> behaviour may not be enough to save you.

I'm wondering if maybe git-receive-pack should deny forcing an
update in a shared repository unless there's either an update hook
that its going to run (which would get to vote yea or neigh) or
there's a configuration setting enabled which isn't set by default.

I'd think most users of a shared repository wouldn't want to allow
forcing an update except in some very special cases.  For those
they could install an update hook or just push a new temporary
branch name and then use git-update-ref or git-branch directly on
the remote repository.

-- 
Shawn.

  reply	other threads:[~2006-09-20 17:10 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 [this message]
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
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=20060920171012.GF23260@spearce.org \
    --to=spearce@spearce.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=pasky@suse.cz \
    --cc=torvalds@osdl.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).