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

[PATCH v2 2/3] cherry: don't set ignored rev_info options

From
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
Date
Jul 29, 2012, 23:25 UTC
Message-ID
<1343604336-7966-3-git-send-email-martin.von.zweigbergk@gmail.com>
In-Reply-To
<1343604336-7966-1-git-send-email-martin.von.zweigbergk@gmail.com>

Ever since cherry was built-in in e827633 (Built-in cherry, 2006-10-24), it has set a bunch of options on the the rev_info that are only used while outputting a patch. But since the built-in cherry command never needs to output any patch (it uses add_commit_patch_id and has_commit_patch_id instead), these options are just distractions, so remove them.

Signed-off-by: Martin von Zweigbergk <martin.von.zweigbergk@gmail.com>
---
 builtin/log.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/builtin/log.c b/builtin/log.c
index 7a92e3f..8cea1e5 100644
--- a/builtin/log.c
+++ b/builtin/log.c
@@ -1508,10 +1508,6 @@ int cmd_cherry(int argc, const char **argv, const char *prefix)
 	}
 
 	init_revisions(&revs, prefix);
-	revs.diff = 1;
-	revs.combine_merges = 0;
-	revs.ignore_merges = 1;
-	DIFF_OPT_SET(&revs.diffopt, RECURSIVE);
 
 	if (add_pending_commit(head, &revs, 0))
 		die(_("Unknown commit %s"), head);
-- 
1.7.11.1.104.ge7b44f1
Previous: Martin von ZweigbergkNext: Martin von Zweigbergk
Message 3 of 4 in “Small log simplifications”
  1. 0/3 Small log simplificationsMartin von Zweigbergk, Jul 29, 2012
  2. 1/3 remove unnecessary parameter from get_patch_ids()Martin von Zweigbergk, Jul 29, 2012
  3. 2/3 cherry: don't set ignored rev_info optionsMartin von Zweigbergk, Jul 29, 2012
  4. 3/3 log: remove redundant check for merge commitMartin von Zweigbergk, Jul 29, 2012

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.