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

[PATCH 4/8] merge: rename variable

From
Tay Ray Chuan <rctay89@gmail.com>
Date
May 10, 2010, 17:17 UTC
Message-ID
<1273511872-4924-5-git-send-email-rctay89@gmail.com>
In-Reply-To
<1273511872-4924-1-git-send-email-rctay89@gmail.com>

It is more accurate to call it 'merge_names' instead of 'msg', as it does not contain the final message.

Signed-off-by: Tay Ray Chuan <rctay89@gmail.com>
---
 builtin/merge.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/builtin/merge.c b/builtin/merge.c
index c2691e8..bc7e5e7 100644
--- a/builtin/merge.c
+++ b/builtin/merge.c
@@ -982,7 +982,7 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		reset_hard(remote_head->sha1, 0);
 		return 0;
 	} else {
-		struct strbuf msg = STRBUF_INIT;
+		struct strbuf merge_names = STRBUF_INIT;
 
 		/* We are invoked directly as the first-class UI. */
 		head_arg = "HEAD";
@@ -997,8 +997,8 @@ int cmd_merge(int argc, const char **argv, const char *prefix)
 		 */
 		if (!have_message) {
 			for (i = 0; i < argc; i++)
-				merge_name(argv[i], &msg);
-			fmt_merge_msg(option_log, &msg, &merge_msg);
+				merge_name(argv[i], &merge_names);
+			fmt_merge_msg(option_log, &merge_names, &merge_msg);
 			if (merge_msg.len)
 				strbuf_setlen(&merge_msg, merge_msg.len-1);
 		}
-- 
1.7.1.189.g07419
Previous: Tay Ray ChuanNext: Tay Ray Chuan
Message 5 of 9 in “merge: allow --log to append shortlog to -m”
  1. 0/8 merge: allow --log to append shortlog to -mTay Ray Chuan, May 10, 2010
  2. 1/8 t7604-merge-custom-message: shift expected output creationTay Ray Chuan, May 10, 2010
  3. 2/8 t7604-merge-custom-message: show that --log doesn't append to -mTay Ray Chuan, May 10, 2010
  4. 3/8 merge: update commentTay Ray Chuan, May 10, 2010
  5. 4/8 merge: rename variableTay Ray Chuan, May 10, 2010
  6. 5/8 fmt-merge-msg: minor refactor of fmt_merge_msg()Tay Ray Chuan, May 10, 2010
  7. 6/8 fmt-merge-msg: refactor merge title formattingTay Ray Chuan, May 10, 2010
  8. 7/8 fmt-merge-msg: add function to append shortlog onlyTay Ray Chuan, May 10, 2010
  9. 8/8 merge: --log appends shortlog to message if specifiedTay Ray Chuan, May 10, 2010

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.