All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Hord <hordp@cisco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>
Subject: Re: Cherry-pick dangles and forgets helpful advice in next
Date: Wed, 23 May 2012 19:12:02 -0400	[thread overview]
Message-ID: <4FBD6EC2.3000804@cisco.com> (raw)
In-Reply-To: <7vehqazf9d.fsf@alter.siamese.dyndns.org>

Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Phil Hord <hordp@cisco.com> writes:
>>
>>> 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.
>> ...  The test
>> t3505.2 is about failing an attempt to cherry-pick an empty commit:
> Ahh, disregard that one.  It is not testing the case where a cherry-pick
> results in empty.
>

Yes, but the last one checks for something similar.  However, I tried
this and it does not trigger the same failure.

$ git cherry-pick HEAD^                              
# 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'



So I think I need to be more specific about the error condition I am seeing.

mkdir repo && cd repo && git init &&
touch foo && git add foo && git commit -mfoo &&
echo foo > foo && git add foo && git commit -mnewfoo && git branch newfoo &&
git commit --amend -m"new foo" &&
git cherry-pick newfoo

This sequence fails to report an error as of 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

But it does report the problem and 'exit 1' prior to that.

Phil

  parent reply	other threads:[~2012-05-23 23:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=4FBD6EC2.3000804@cisco.com \
    --to=hordp@cisco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=nhorman@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.