git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kyle Moffett" <kyle@moffetthome.net>
To: "Junio C Hamano" <gitster@pobox.com>
Cc: "Jeff King" <peff@peff.net>,
	git@vger.kernel.org, "Sam Vilain" <sam@vilain.net>
Subject: Re: [RFC PATCH 0/4] deny push to current branch of non-bare repo
Date: Thu, 13 Nov 2008 08:58:50 -0500	[thread overview]
Message-ID: <f73f7ab80811130558h34cb1220q76ef5536e853151c@mail.gmail.com> (raw)
In-Reply-To: <7vhc6ci24o.fsf@gitster.siamese.dyndns.org>

On Thu, Nov 13, 2008 at 1:14 AM, Junio C Hamano <gitster@pobox.com> wrote:
> Jeff King <peff@peff.net> writes:
>> And then the "push to current branch" problem is neatly solved: you have
>> no current branch.
>>
>> So:
>>
>>   $ git checkout new/branch/to/test^0
>>   $ make, configure, etc
>
> Exactly.
>
> I keep a handful pseudo worktrees around (created with git-new-workdir on
> top of a single repository) for quick patch test and build purposes.  I do
> not push into them but pushing into a non-bare repository and checking out
> the same branch twice in such a setup share exactly the same issue, and I
> keep their HEADs all detached for exactly the same reason.

I guess the issue comes down to a UI complication.  It would very easy
for me to tell somebody how to check out and test their branch in my
testbed if I'm not around, except for that little bit of arcane
syntax.  Moreover, the consequences if they forget are really
frustrating and hard to figure out.  It's also very easy with a GUI to
do the simple *rightclick branch, click "Checkout"*, but would be much
harder to do the detached HEAD checkout correctly.

If it didn't involve reconfiguring a lot of other people's
repositories, I might consider having them push to "refs/remotes/*".
In theory that's actually much closer to what I'm doing anyways.  That
would force any checkouts to be bare, but it would require lots of
git-foo on the pushing side.  Perhaps some way to "git push" which
asks the remote repository where it wants the stuff?

Alternatively, it might be possible to add ref attributes or a config
option to force detached HEAD checkouts.

Cheers,
Kyle Moffett

  reply	other threads:[~2008-11-13 14:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-07 22:07 [RFC PATCH 0/4] deny push to current branch of non-bare repo Jeff King
2008-11-07 22:09 ` [PATCH 1/4] t5400: expect success for denying deletion Jeff King
2008-11-09 10:38   ` Jan Krüger
2008-11-07 22:20 ` [PATCH 2/4] t5516: refactor oddball tests Jeff King
2008-11-07 22:22 ` [PATCH 3/4] tests: avoid pushing to current branch of non-bare repo Jeff King
2008-11-07 22:28 ` [PATCH 4/4] receive-pack: deny push " Jeff King
2008-11-07 22:39 ` [RFC PATCH 0/4] " Mark Burton
2008-11-07 23:16 ` Junio C Hamano
2008-11-08 14:27   ` Jeff King
2008-11-08 15:12     ` Johannes Schindelin
2008-11-08 20:49     ` Junio C Hamano
2008-11-09  1:49       ` Jeff King
2008-11-09 22:12         ` Junio C Hamano
2008-11-12  0:44         ` Kyle Moffett
2008-11-12  8:44           ` Jeff King
2008-11-13  5:22             ` Kyle Moffett
2008-11-13  5:37               ` Jeff King
2008-11-13  6:14                 ` Junio C Hamano
2008-11-13 13:58                   ` Kyle Moffett [this message]
2008-11-14  6:37                     ` Jeff King
2008-12-02  2:22     ` Leo Razoumov
2008-12-02  2:29       ` Junio C Hamano
2008-12-02  2:41         ` Leo Razoumov
2008-12-02  2:48       ` Jeff King
2008-12-02  3:08         ` Leo Razoumov

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=f73f7ab80811130558h34cb1220q76ef5536e853151c@mail.gmail.com \
    --to=kyle@moffetthome.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=sam@vilain.net \
    /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).