From: Junio C Hamano <gitster@pobox.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH 0/3] Fixing volatile HEAD in push.default = current
Date: Tue, 21 May 2013 13:24:29 -0700 [thread overview]
Message-ID: <7vppwkm682.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CALkWK0m3QP_eE14y8UoJ+HeFzkKM=1nVKAnYJcTrwQMp+Atphg@mail.gmail.com> (Ramkumar Ramachandra's message of "Wed, 22 May 2013 01:22:45 +0530")
Ramkumar Ramachandra <artagnon@gmail.com> writes:
> Junio C Hamano wrote:
>> Is there? I do not think "volatile" is particularly a good
>> description for this, but showing what is pushed as a concrete
>> branch name feels like a good improvement to me, at least in
>> principle.
>
> Okay. I used "volatile", because push does not lock HEAD when the
> operation begins, even though it performs a super-late resolution (in
> the transport-layer); HEAD is not guaranteed to remain invariant in
> that time. Suggest nicer wording?
In general, when a command is working in your repository with a
working tree, we do not make any such promise that it keeps
operationg normally when you pull the rug under its feet from
another terminal ("git checkout maint" running at the same time "git
pull" would not have a chance to work correctly). Some are safe
(like "git push" racing with "git checkout maint" that would not
have to look at what the current branch is) and some are not (like
"git push github" racing with "git checkout maint && git push
origin HEAD:preview").
I view the value of this topic purely as "showing a real branch name
when that is what we actually pushed is a lot more preferrable than
showing HEAD, especially because the user may see it in the terminal
scrollback buffer hours after it happened". Explaining this patch
as "we avoid issues from simultaneously flipping HEAD by resolving
early" gives a false sense of security to the reader, as "early" has
to happen early enough for the patch to really avoid the issue, but
you are not in control of when the user does that flipping in the
other terminal.
next prev parent reply other threads:[~2013-05-21 20:24 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-21 18:23 [PATCH 0/3] Fixing volatile HEAD in push.default = current Ramkumar Ramachandra
2013-05-21 18:23 ` [PATCH 1/3] push: factor out the detached HEAD error message Ramkumar Ramachandra
2013-05-21 18:23 ` [PATCH 2/3] push: fail early with detached HEAD and current Ramkumar Ramachandra
2013-05-21 18:23 ` [PATCH 3/3] push: don't push the volatile HEAD with current Ramkumar Ramachandra
2013-05-21 19:13 ` [PATCH 0/3] Fixing volatile HEAD in push.default = current Junio C Hamano
2013-05-21 19:52 ` Ramkumar Ramachandra
2013-05-21 20:04 ` Junio C Hamano
2013-05-21 20:24 ` Junio C Hamano [this message]
2013-05-21 21:09 ` Ramkumar Ramachandra
2013-05-22 14:26 ` Junio C Hamano
2013-05-22 14:43 ` Ramkumar Ramachandra
2013-05-22 17:11 ` Junio C Hamano
2013-05-23 7:55 ` Ramkumar Ramachandra
2013-05-23 8:53 ` Andreas Krey
2013-05-23 14:45 ` Junio C Hamano
2013-05-23 19:27 ` Andreas Krey
2013-05-23 14:49 ` 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=7vppwkm682.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.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).