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

[PATCH] builtin-commit.c: Remove a redundant assignment.

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
Apr 10, 2008, 11:33 UTC
Message-ID
<1207827189-7509-1-git-send-email-johannes.sixt@telecom.at>
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
	I noticed this while looking how --only is implemented.
	-- Hannes
 builtin-commit.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/builtin-commit.c b/builtin-commit.c
index 660a345..e3adfdf 100644
--- a/builtin-commit.c
+++ b/builtin-commit.c
@@ -745,10 +745,8 @@ static int parse_and_validate_options(int argc, const char *argv[],
 		die("No paths with --include/--only does not make sense.");
 	if (argc == 0 && only && amend)
 		only_include_assumed = "Clever... amending the last one with dirty index.";
-	if (argc > 0 && !also && !only) {
+	if (argc > 0 && !also && !only)
 		only_include_assumed = "Explicit paths specified without -i nor -o; assuming --only paths...";
-		also = 0;
-	}
 	if (!cleanup_arg || !strcmp(cleanup_arg, "default"))
 		cleanup_mode = use_editor ? CLEANUP_ALL : CLEANUP_SPACE;
 	else if (!strcmp(cleanup_arg, "verbatim"))
-- 
1.5.5.33.g376d1
Next: Johannes Sixt
Message 1 of 3 in “builtin-commit.c: Remove a redundant assignment.”
  1. builtin-commit.c: Remove a redundant assignment.Johannes Sixt, Apr 10, 2008
  2. Document option --only of git commitJohannes Sixt, Apr 10, 2008
  3. Pieter de BieApr 18, 2008

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.