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

[PATCH 0/5] git-add/git-rm updates

From
Junio C Hamano <junkio@cox.net>
Date
Dec 25, 2006, 11:09 UTC
Message-ID
<7vr6uomdul.fsf@assigned-by-dhcp.cox.net>

This series futzes with a pair of functions in dir.c machinery and enhances git-add and git-rm command.

[PATCH 1/5] match_pathspec() -- return how well the spec matched

The function match_pathspec() takes the pathspec given from the command line and tells if a given name matches it. This enhances its return value so that the command can tell how well the name matches. Earlier, the caller could not tell if matched pathspec was exactly the same as the name, was a fileglob that matched the name, or was a leading directory.

[PATCH 2/5] git-rm: update to saner semantics [PATCH 3/5] t3600: update the test for updated git rm

This updates git-rm to saner semantics Linus suggested on the list earlier, and updates the tests. When a path is removed, it is removed both from the working tree and from the index. As a safety measure, the path is required to be cache-clean, and also must match the HEAD (unless it is before the initial commit on the branch).

[PATCH 4/5] read_directory: show_both option.

The function read_directory() is the workhorse to traverse working tree while taking '.gitignore' into account. This updates the function to allow callers that are interested in both ignored and non-ignored paths to get both paths so that it can do its own filtering on the result.

[PATCH 5/5] git-add: add ignored files when asked explicitly.

One thing many people found confusing about git-add was that a file whose name matches an ignored pattern could not be added. This is an RFC fix for the problem.

Message 1 of 1 in “git-add/git-rm updates”
  1. 0/5 git-add/git-rm updatesJunio C Hamano, Dec 25, 2006

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.