From: Jonathan Nieder <jrnieder@gmail.com>
To: Martin Langhoff <martin.langhoff@gmail.com>
Cc: Johannes Sixt <j6t@kdbg.org>, Git Mailing List <git@vger.kernel.org>
Subject: Re: Pitfalls in auto-fast-forwarding heads that are not checked out?
Date: Sat, 4 May 2013 11:51:46 -0700 [thread overview]
Message-ID: <20130504185146.GD25863@elie.Belkin> (raw)
In-Reply-To: <CACPiFCK=8KFX++Bg+LhymorSMnWgrj5Js+-f=UYyZnNY=n9WiA@mail.gmail.com>
Martin Langhoff wrote:
> On Sat, May 4, 2013 at 3:34 AM, Johannes Sixt <j6t@kdbg.org> wrote:
>> Since git 1.8.0 you can express this check as
>>
>> if git merge-base --is-ancestor $production_sha1 refs/heads/master
>
> Ah, that's great! Unfortunate it's not there in earlier / more widely
> used releases of git.
Another trick is to use "git push":
git push . $production_sha1:refs/heads/master
This advances the "master" branch if
(1) it is not the current branch, and
(2) that update is a fast-forward
It can be convenient sometimes.
Hope that helps,
Jonathan
next prev parent reply other threads:[~2013-05-04 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-03 22:46 Pitfalls in auto-fast-forwarding heads that are not checked out? Martin Langhoff
2013-05-04 7:34 ` Johannes Sixt
2013-05-04 11:35 ` Martin Langhoff
2013-05-04 13:17 ` John Szakmeister
2013-05-04 18:51 ` Jonathan Nieder [this message]
2013-05-07 14:27 ` Martin Langhoff
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=20130504185146.GD25863@elie.Belkin \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=j6t@kdbg.org \
--cc=martin.langhoff@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).