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

[PATCH 3/3] add: remove dead code

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Apr 29, 2014, 21:49 UTC
Message-ID
<1398808178-3703-4-git-send-email-felipe.contreras@gmail.com>
In-Reply-To
<1398808178-3703-1-git-send-email-felipe.contreras@gmail.com>
addremove is already 1 by default.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 builtin/add.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/builtin/add.c b/builtin/add.c
index ac10bab..980e247 100644
--- a/builtin/add.c
+++ b/builtin/add.c
@@ -329,10 +329,6 @@ int cmd_add(int argc, const char **argv, const char *prefix)
 	if (addremove && take_worktree_changes)
 		die(_("-A and -u are mutually incompatible"));
 
-	if (!take_worktree_changes && addremove_explicit < 0 && argc)
-		/* Turn "git add pathspec..." to "git add -A pathspec..." */
-		addremove = 1;
-
 	if (!show_only && ignore_missing)
 		die(_("Option --ignore-missing can only be used together with --dry-run"));
 
-- 
1.9.2+fc1.3.gade8541
Previous: Felipe Contreras
Message 4 of 4 in “Trivial cleanups”
  1. 0/3 Trivial cleanupsFelipe Contreras, Apr 29, 2014
  2. 1/3 config: avoid yoda conditionsFelipe Contreras, Apr 29, 2014
  3. 2/3 add: avoid yoda conditionFelipe Contreras, Apr 29, 2014
  4. 3/3 add: remove dead codeFelipe Contreras, Apr 29, 2014

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.