git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] cherry-pick: don't barf when there's nothing to do

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 30, 2013, 13:49 UTC
Message-ID
<1369921781-30667-1-git-send-email-felipe.contreras@gmail.com>

If the user set --ff, it's expected that if theres's nothing to do we fast-forward our current HEAD, which is a no-op.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 sequencer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sequencer.c b/sequencer.c
index d8f9d30..b9d4b48 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -749,7 +749,7 @@ static void prepare_revs(struct replay_opts *opts)
 	if (prepare_revision_walk(opts->revs))
 		die(_("revision walk setup failed"));
 
-	if (!opts->revs->commits)
+	if (!opts->revs->commits && !opts->allow_ff)
 		die(_("empty commit set passed"));
 }
 
-- 
1.8.3.rc3.312.g47657de
Next: Junio C Hamano
Message 1 of 2 in “cherry-pick: don't barf when there's nothing to do”
  1. cherry-pick: don't barf when there's nothing to doFelipe Contreras, May 30, 2013
  2. Junio C HamanoJun 3, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.