git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cherry-pick dangles and forgets helpful advice in next
@ 2012-05-23 20:31 Phil Hord
  2012-05-23 21:20 ` Junio C Hamano
  2012-05-23 22:44 ` Junio C Hamano
  0 siblings, 2 replies; 10+ messages in thread
From: Phil Hord @ 2012-05-23 20:31 UTC (permalink / raw)
  To: git, gitster, Neil Horman

In git.git 'master' when I cherry-pick a commit which is eventually
empty, git gives me a friendly description of my supposed error, leaves
my cherry-pick "pending" and exits with an error code.


$ git cherry-pick a0aff2d                          
# On branch master
nothing to commit (working directory clean)
The previous cherry-pick is now empty, possibly due to conflict resolution.
If you wish to commit it anyway, use:

    git commit --allow-empty

Otherwise, please use 'git reset'


In 'next' this is broken.  Now git does not tell me anything and it does
not exit with an error code.  It does still leave the cherry-pick
pending, though.


$ git cherry-pick a0aff2d
$ cat /tmp/repo/.git/CHERRY_PICK_HEAD
a0aff2da3d12a9a097c02e39570611f359433c23



It bisects to this commit:

commit b27cfb0d8d4cbb6d079c70ffeadac9c0dcfff250
Author: Neil Horman <nhorman@tuxdriver.com>
Date:   Fri Apr 20 10:36:15 2012 -0400

    git-cherry-pick: Add keep-redundant-commits option
   
    The git-cherry-pick --allow-empty command by default only preserves
empty
    commits that were originally empty, i.e only those commits for which
    <commit>^{tree} and <commit>^^{tree} are equal.  By default commits
which are
    non-empty, but were made empty by the inclusion of a prior commit on
the current
    history are filtered out.  This option allows us to override that
behavior and
    include redundant commits as empty commits in the change history.
   
    Note that this patch changes the default behavior of git cherry-pick
slightly.
    Prior to this patch all commits in a cherry-pick sequence were
applied and git
    commit was run.  The implication here was that, if a commit was
redundant, and
    the commit did not trigger the fast forward logic, the git commit
operation, and
    therefore the git cherry-pick operation would fail, displaying the
cherry pick
    advice (i.e. run git commit --allow-empty).  With this patch
however, such
    redundant commits are automatically skipped without stopping, unless
    --keep-redundant-commits is specified, in which case, they are
automatically
    applied as empty commits.
   
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>


I don't have time to chase it any further today.  Hopefully someone can
see the flub and straighten it out before I get a chance to look again. 
If not, I'll probably forget anyway.

Phil

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-05-31 17:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-23 20:31 Cherry-pick dangles and forgets helpful advice in next Phil Hord
2012-05-23 21:20 ` Junio C Hamano
2012-05-23 22:44 ` Junio C Hamano
2012-05-23 22:47   ` Junio C Hamano
2012-05-23 22:58     ` Junio C Hamano
2012-05-23 23:12     ` Phil Hord
2012-05-23 23:22       ` Junio C Hamano
2012-05-30  2:59         ` Junio C Hamano
2012-05-30 23:40           ` Phil Hord
2012-05-31 17:29             ` Junio C Hamano

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).