All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>,
	Steven Grimm <koreth@midwinter.com>,
	git@vger.kernel.org
Subject: Re: Pushing to a non-bare repository
Date: Sat, 03 Feb 2007 13:18:04 -0800	[thread overview]
Message-ID: <7vd54r2b5f.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0702031146050.8424@woody.linux-foundation.org> (Linus Torvalds's message of "Sat, 3 Feb 2007 11:48:46 -0800 (PST)")

(sorry, resending to avoid vger spam filter)

Linus Torvalds <torvalds@linux-foundation.org> writes:

> On Sat, 3 Feb 2007, Simon 'corecode' Schubert wrote:
>> 
>> However, your suggestion does not help people who don't know better.  Pushing
>> into the HEAD branch of another repo breaks stuff there.  Badly.  This should
>> be prevented, really.
>
> No, please don't break it. I do it all the time.
>
> I just do "git push remote".
>
> And then eventually on the remote end I do end up having to "update", but 
> that's a simple "git checkout -f".

I do not think anybody is disputing the fact that the current
git-push does work as expected.

But expectation is a relative thing.  The current behaviour is
likely to confuse new people; it is like a sharp-edged razor
that can cut through fingers if the user does not know which end
is the handle and which end is the blade.

I sent a "if Simon wanted to do it, it is simple" concept patch,
but obviously Simon or anybody can do the same check in the
update hook if needed.  However, that would make the newbie
safety opt_in, and there inevitably will come a discussion on
what should be the default.

And I suspect that the recent trend is that people would want
the default to be more newbie friendly, while leaving an opt_in
escape hatch for power-user convenience.  Obviously my patch
does not have that escape hatch, and as such it is not meant for
inclusion as-is.

      reply	other threads:[~2007-02-03 21:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-03  3:01 Pushing to a non-bare repository Steven Grimm
2007-02-03  3:26 ` Junio C Hamano
2007-02-03  9:46   ` Simon 'corecode' Schubert
2007-02-03 19:42     ` Junio C Hamano
2007-02-03 19:48     ` Linus Torvalds
2007-02-03 21:18       ` Junio C Hamano [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=7vd54r2b5f.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=corecode@fs.ei.tum.de \
    --cc=git@vger.kernel.org \
    --cc=koreth@midwinter.com \
    --cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.