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

Re: [PATCH (resend)] gitweb: Use --no-commit-id in git_commit and git_commitdiff

From
Junio C Hamano <junkio@cox.net>
Date
Oct 26, 2006, 08:59 UTC
Message-ID
<7vejsvpi4d.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<200610261050.21214.jnareb@gmail.com>
Jakub Narebski <jnareb@gmail.com> writes:
Show 6 quoted lines
> Use --no-commit-id option to git-diff-tree command in git_commit and
> git_commitdiff to filter out commit ID output that git-diff-tree adds
> when called with only one <tree-ish> (not only for --stdin). Remove
> filtering commit IDs from git-diff-tree output.
>
> This option is in git since at least v1.0.0, so make use of it.
*BLUSH*

I think we would need something like this, if only for completeness.

-- >8 -- [PATCH] combine-diff: honour --no-commit-id

Somehow we forgot to look at no_commit_id flag in these codepaths.

Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 combine-diff.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/combine-diff.c b/combine-diff.c
index 01a8437..8ff46e8 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -737,7 +737,7 @@ static void show_patch_diff(struct combi
 		int added = 0;
 		int deleted = 0;
 
-		if (rev->loginfo)
+		if (rev->loginfo && !rev->no_commit_id)
 			show_log(rev, opt->msg_sep);
 		dump_quoted_path(dense ? "diff --cc " : "diff --combined ",
 				 elem->path, c_meta, c_reset);
@@ -815,7 +815,7 @@ static void show_raw_diff(struct combine
 	if (!line_termination)
 		inter_name_termination = 0;
 
-	if (rev->loginfo)
+	if (rev->loginfo && !rev->no_commit_id)
 		show_log(rev, opt->msg_sep);
 
 	if (opt->output_format & DIFF_FORMAT_RAW) {
@@ -887,7 +887,7 @@ void diff_tree_combined(const unsigned c
 	diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
 	diffopts.recursive = 1;
 
-	show_log_first = !!rev->loginfo;
+	show_log_first = !!rev->loginfo && !rev->no_commit_id;
 	needsep = 0;
 	/* find set of paths that everybody touches */
 	for (i = 0; i < num_parent; i++) {
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 3 in “gitweb: Use --no-commit-id in git_commit and git_commitdiff”
  1. gitweb: Use --no-commit-id in git_commit and git_commitdiffJakub Narebski, Oct 26, 2006
  2. Junio C HamanoOct 26, 2006
  3. Jakub NarebskiOct 26, 2006

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.