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

Re: [PATCH] git-add: allow path limiting with -u

From
Jeff King <peff@peff.net>
Date
May 14, 2007, 00:39 UTC
Message-ID
<20070514003910.GA6689@coredump.intra.peff.net>
In-Reply-To
<200705131235.25281.jnareb@gmail.com>
On Sun, May 13, 2007 at 12:35:24PM +0200, Jakub Narebski wrote:
> Do git-add *needs* path specifier (even if it is '.') also for `-u'?
> The changes in documentation were to reflect that `-u' is incompatibile
> with explicit paths, or that `-u' does not require explicit paths
> contrary to git-add without `-u'.

Sorry, I don't understand if you are asking that question, or if you are asking if the documentation needs to clarify that point.

The answer to the first is "no", the path limiting works exactly as it does for every other command: no path specifier indicates the whole tree.

If you are concerned about the latter, do you mean something like this:

-- >8 -- Documentation/git-add: clarify -u with path limiting

Signed-off-by: Jeff King <peff@peff.net>
---
diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt
index ea27018..27b9c0f 100644
--- a/Documentation/git-add.txt
+++ b/Documentation/git-add.txt
@@ -57,8 +57,11 @@ OPTIONS
 	the index.
 
 -u::
-	Update all files that git already knows about. This is what
-	"git commit -a" does in preparation for making a commit.
+	Update only files that git already knows about. This is similar
+	to what "git commit -a" does in preparation for making a commit,
+	except that the update is limited to paths specified on the
+	command line. If no paths are specified, all tracked files are
+	updated.
 
 \--::
 	This option can be used to separate command-line options from
Previous: Jakub NarebskiNext: Jakub Narebski
Message 4 of 9 in “git-add: allow path limiting with -u”
  1. git-add: allow path limiting with -uJeff King, May 12, 2007
  2. Junio C HamanoMay 12, 2007
  3. Jakub NarebskiMay 13, 2007
  4. Jeff KingMay 14, 2007
  5. Jakub NarebskiMay 14, 2007
  6. Jeff KingMay 14, 2007
  7. Junio C HamanoMay 14, 2007
  8. Jeff KingMay 14, 2007
  9. Junio C HamanoMay 14, 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.