From: Eyvind Bernhardsen <eyvind-git@orakel.ntnu.no>
To: Jeff King <peff@peff.net>
Cc: "Randal L. Schwartz" <merlyn@stonehenge.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: I want "fast forward my workdir to upstream if it's safe"
Date: Fri, 8 May 2009 14:34:12 +0200 [thread overview]
Message-ID: <F871F2A1-DFCF-4642-BB53-7BE483A93271@orakel.ntnu.no> (raw)
In-Reply-To: <20090508023028.GA1218@coredump.intra.peff.net>
On 8. mai. 2009, at 04.30, Jeff King wrote:
> On Thu, May 07, 2009 at 02:40:00PM -0700, Randal L. Schwartz wrote:
>
>> So, what I need is a command, likely an option to "git merge" that
>> says "do
>> everything that a git merge would do except abort if it would have
>> been a
>> merge commit". In other words, abort if the workdir is dirty or is
>> not a
>> fast-forward update to the upstream. Bonus if it exits non-zero if
>> something went wrong.
>
> Can you define more clearly what you want, because you are asking for
> conflicting things. "abort if it would have been a merge commit" is
> purely about fast forward. But it sounds like you also care about
> "would
> merge have succeeded". So I think you are asking for:
>
> 1. There are no local commits on the branch.
>
> and one of:
>
> 2a. There are no local edits.
>
> 2b. There are no local edits in the same files as those that are
> affected by any new commits from upstream.
>
> 2c. Any local edits you have done would not cause a conflict if
> merged
> with what's in upstream.
I read it as a request for pull/merge --ff-only (based on "abort if
the workdir is dirty or is not a fast-forward update"). This feature
has been implemented twice, but never included:
http://article.gmane.org/gmane.comp.version-control.git/76787
http://article.gmane.org/gmane.comp.version-control.git/107768
http://article.gmane.org/gmane.comp.version-control.git/80284
--
Eyvind Bernhardsen
next prev parent reply other threads:[~2009-05-08 12:55 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-07 21:40 I want "fast forward my workdir to upstream if it's safe" Randal L. Schwartz
2009-05-07 23:18 ` Wincent Colaiuta
2009-05-07 23:20 ` Randal L. Schwartz
2009-05-08 2:30 ` Jeff King
2009-05-08 6:53 ` Andreas Ericsson
2009-05-08 7:01 ` Jeff King
2009-05-08 12:34 ` Eyvind Bernhardsen [this message]
2009-05-08 14:02 ` Randal L. Schwartz
2009-05-08 15:57 ` Junio C Hamano
2009-05-08 16:15 ` Jakub Narebski
2009-05-11 20:11 ` Eyvind Bernhardsen
2009-05-08 21:34 ` Miles Bader
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F871F2A1-DFCF-4642-BB53-7BE483A93271@orakel.ntnu.no \
--to=eyvind-git@orakel.ntnu.no \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=merlyn@stonehenge.com \
--cc=peff@peff.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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).