From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Jay Soffian <jaysoffian@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Switch receive.denyCurrentBranch to "refuse"
Date: Fri, 30 Jan 2009 18:01:15 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.1.00.0901301756560.3586@pacific.mpi-cbg.de> (raw)
In-Reply-To: <76718490901300817x3f31460k59b6fe75d136372d@mail.gmail.com>
Hi,
On Fri, 30 Jan 2009, Jay Soffian wrote:
> On Thu, Jan 29, 2009 at 7:34 PM, Johannes Schindelin
> <johannes.schindelin@gmx.de> wrote:
> > Many, many users set up non-bare repositories on their server, and are
> > confused that the working directory is not updated.
>
> This comes up on the list from time-to-time and is even in the FAQ.
So much so that it is high time we admitted that we have a design bug
there.
> It has even been suggested that HEAD be detached when pushing into a
> non-bare repository, but I am not suggesting that again.
No, because that would be as wrong as trying to update the working
directory in any other way. (Not only is it possible that you are a
git-shell user, in which case you have no business meddling with the
working directory -- or the symbolic ref HEAD -- to begin with, but you
also run into the problem that you might not know where the working
directory is at all, let alone if there is one.)
So it is a good thing you are not suggesting it again.
> I wonder if it might be helpful to teach clone to setup a push line in
> the cloned repo. i.e.:
>
> [remote "origin"]
> url = ...
> fetch = +refs/heads/*:refs/remotes/origin/*
> push = refs/heads/*:refs/remotes/origin/*
>
> This could be a configurable default behavior when cloning from a
> non-bare repo (can that be determined?) and/or as a switch
> (--satellite perhaps?).
As Peff commented, this would be horribly wrong if the remote has a
different "origin" remote. Not forcing the push does not help either, it
is still wrong.
But I think there is an even more fundamental problem: You do not want
that default push. We have "push only those refs the remote and the local
repository share" rule for a reason. It is way too easy to publish
something you did not mean to publish otherwise.
Ciao,
Dscho
next prev parent reply other threads:[~2009-01-30 17:02 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1233275583u.git.johannes.schindelin@gmx.de>
2009-01-30 0:34 ` [PATCH] Switch receive.denyCurrentBranch to "refuse" Johannes Schindelin
2009-01-30 1:28 ` Jay Soffian
2009-01-30 1:32 ` Asheesh Laroia
2010-04-13 16:42 ` [PATCH] Switch receive.denyCurrentBranch to "refuse" Dave Abrahams
2010-04-13 17:57 ` [PATCH] Switch receive.denyCurrentBranch to "refuse" Junio C Hamano
[not found] ` <7v4ozhd1wp.fsf@gitster.siamese.dyndns.org>
2009-01-30 2:18 ` Junio C Hamano
2009-01-30 13:24 ` Johannes Schindelin
2009-01-30 16:33 ` Jeff King
2009-01-30 16:55 ` Johannes Schindelin
2009-01-30 2:30 ` Miklos Vajna
2009-01-30 13:28 ` Johannes Schindelin
2009-02-11 0:11 ` Miklos Vajna
2009-02-11 1:04 ` Junio C Hamano
2009-01-30 2:55 ` Jeff King
2009-01-30 14:11 ` Johannes Schindelin
2009-01-30 7:17 ` Johannes Sixt
2009-01-30 7:34 ` Jeff King
2009-01-30 13:23 ` Johannes Schindelin
2009-01-30 14:35 ` Jeff King
2009-01-30 16:17 ` Jay Soffian
2009-01-30 16:28 ` Jeff King
2009-01-30 17:01 ` Johannes Schindelin [this message]
2009-01-30 18:50 ` Jay Soffian
2009-01-30 19:03 ` Johannes Schindelin
2009-01-31 0:56 ` Nanako Shiraishi
2009-02-01 1:27 ` Junio C Hamano
2009-02-01 1:39 ` Junio C Hamano
2009-02-02 12:41 ` Jeff King
2009-02-03 4:30 ` Junio C Hamano
2009-02-03 17:45 ` Junio C Hamano
2009-02-06 14:06 ` Jeff King
2009-02-07 7:51 ` Junio C Hamano
2009-02-03 8:01 ` Junio C Hamano
2009-02-03 8:07 ` Jeff King
2009-02-03 9:22 ` Junio C Hamano
2009-02-01 2:06 ` Junio C Hamano
2009-02-01 3:37 ` Sam Vilain
2009-02-01 21:33 ` Junio C Hamano
2009-02-02 7:00 ` Sam Vilain
2009-02-02 8:32 ` Junio C Hamano
2009-02-02 10:50 ` Sam Vilain
2009-02-01 22:59 ` Johannes Schindelin
2009-02-01 23:56 ` Junio C Hamano
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=alpine.DEB.1.00.0901301756560.3586@pacific.mpi-cbg.de \
--to=johannes.schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jaysoffian@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).