From: Jay Soffian <jaysoffian@gmail.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
George Spelvin <linux@horizon.com>,
gitster@pobox.com, git@vger.kernel.org
Subject: Re: receive.denyCurrentBranch
Date: Mon, 9 Feb 2009 10:43:31 -0500 [thread overview]
Message-ID: <76718490902090743j6f1bfdcdkdf9f64ca51c4a0af@mail.gmail.com> (raw)
In-Reply-To: <20090209050659.GA12655@mini-me.lan>
On Mon, Feb 9, 2009 at 12:06 AM, Theodore Tso <tytso@mit.edu> wrote:
> On Sun, Feb 08, 2009 at 08:47:26PM -0500, Jay Soffian wrote:
>>
>> [receive]
>> prefix = refs/remotes/incoming
>>
>> Then a push to refs/heads/master was automatically stored as
>> refs/remotes/incoming/master instead.
>
> What happens when the next person pushes to the same remote repo, and
> their refs/heads/master push is not a fast-forward merge of the
> current refs/remotes/incoming/master?
>
> Do you lose the first user's push at that point? Or do you refuse the
> push?
The idea initially was to give a place to store the push head for the
checked-out branch, but that isn't what HEAD points to. But it seemed
confusing to do this for just the checked-out branch, so I was playing
with having all incoming pushes go into their own namespace, hence the
prefix.
Also, the use case I have in mind here is an individual with a
workstation and a laptop, and the repository on the workstation and
its clone on the laptop are both non-bare. There are not multiple
individuals pushing to the non-bare repo. Someone please correct me if
I'm wrong, but it is my impression that these are the users that have
motivated the receive.denyCurrentBranch option (and its eventual
default changing to refuse) in the first place.
In that case, the work-flow is typically:
server$ mkdir repo && cd repo && git init
server$ ... add, commit, add, commit ...
[...time passes...]
laptop$ git clone ssh://server/~/repo
laptop$ ... add, commit, add, commit ...
laptop$ git push
laptop$ ssh server
server$ cd repo
server$ git merge incoming/master
server$ git branch -dr incoming/master
But, to answer your question, the non-fast-forward push is rejected,
unless the user forces it, unless receive.denyNonFastForwards prevents
the force.
j.
next prev parent reply other threads:[~2009-02-09 15:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-08 4:29 receive.denyCurrentBranch George Spelvin
2009-02-08 6:43 ` receive.denyCurrentBranch Junio C Hamano
2009-02-08 10:30 ` receive.denyCurrentBranch Johannes Schindelin
2009-02-08 17:50 ` receive.denyCurrentBranch Jay Soffian
2009-02-08 20:54 ` receive.denyCurrentBranch Johannes Schindelin
2009-02-08 22:16 ` receive.denyCurrentBranch Jay Soffian
2009-02-08 22:51 ` receive.denyCurrentBranch Jay Soffian
2009-02-08 23:41 ` receive.denyCurrentBranch Johannes Schindelin
2009-02-09 1:38 ` receive.denyCurrentBranch Junio C Hamano
2009-02-09 1:47 ` receive.denyCurrentBranch Jay Soffian
2009-02-09 5:06 ` receive.denyCurrentBranch Theodore Tso
2009-02-09 11:06 ` receive.denyCurrentBranch Johannes Schindelin
2009-02-09 15:46 ` receive.denyCurrentBranch Jay Soffian
2009-02-09 15:43 ` Jay Soffian [this message]
2009-02-08 22:03 ` receive.denyCurrentBranch Jakub Narebski
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=76718490902090743j6f1bfdcdkdf9f64ca51c4a0af@mail.gmail.com \
--to=jaysoffian@gmail.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=linux@horizon.com \
--cc=tytso@mit.edu \
/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).