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

Re: [PATCH] Make builtin-tag.c use parse_options.

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 10, 2007, 09:26 UTC
Message-ID
<7vhcjuo3h9.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vabpmpr9y.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> While I freely admit that I do not particularly find the "One -m
> introduces one new line, concatenated to form the final
> paragraph" handling of multiple -m options done by git-commit
> nice nor useful, I suspect that it would make more sense to make
> git-tag and git-commit handle multiple -m option consistently,
> if you are going to change the existing semantics.  Since some
> people really seem to like multiple -m handling of git-commit,
> the avenue of the least resistance for better consistency would
> be to accept and concatenate (with LF in between) multiple -m
> options.
>
> With multiple -F, I think erroring out would be the sensible
> thing to do, but some people might prefer concatenation.  I do
> not care either way as long as commit and tag behave
> consistently.
Alas, this exposes a regression in kh/commit series.
 t/t7501-commit.sh |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/t/t7501-commit.sh b/t/t7501-commit.sh
index 1b444d4..bf5dd86 100644
--- a/t/t7501-commit.sh
+++ b/t/t7501-commit.sh
@@ -178,4 +178,27 @@ test_expect_success 'amend commit to fix author' '
 	diff expected current
 
 '
+
+test_expect_success 'sign off' '
+
+	>positive &&
+	git add positive &&
+	git commit -s -m "thank you" &&
+	actual=$(git cat-file commit HEAD | sed -ne "s/Signed-off-by: //p") &&
+	expected=$(git var GIT_COMMITTER_IDENT | sed -e "s/>.*/>/") &&
+	test "z$actual" = "z$expected"
+
+'
+
+test_expect_success 'multiple -m' '
+
+	>negative &&
+	git add negative &&
+	git commit -m "one" -m "two" -m "three" &&
+	actual=$(git cat-file commit HEAD | sed -e "1,/^\$/d") &&
+	expected=$(echo one; echo; echo two; echo; echo three) &&
+	test "z$actual" = "z$expected"
+
+'
+
 test_done
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 11 in “Make builtin-tag.c use parse_options.”
  1. Make builtin-tag.c use parse_options.Carlos Rica, Nov 9, 2007
  2. Jakub NarebskiNov 9, 2007
  3. Johannes SchindelinNov 9, 2007
  4. Junio C HamanoNov 10, 2007
  5. Junio C HamanoNov 10, 2007
  6. Junio C HamanoNov 10, 2007
  7. Carlos RicaNov 10, 2007
  8. Pierre HabouzitNov 10, 2007
  9. Carlos RicaNov 12, 2007
  10. Pierre HabouzitNov 12, 2007
  11. Kristian HøgsbergNov 12, 2007

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.