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

non-recursive path limits

From
MPMartinolich Paul <goldenautumnday@gmail.com>
Date
Aug 4, 2009, 12:10 UTC
Message-ID
<3E7A2158-B7F8-4A75-902E-25A21E4D87D6@gmail.com>

Is there a way to perform non-recursive path limiting on functions like 'git log', 'git format-patch', etc.

Each of these functions can limit to a path using the '-- <path>' notation. By default, it recursively goes down the directory tree. I would like to limit the tree descent to one level. For example,

repos/a-dir/a1.c repos/a-dir/a2.c repos/a-dir/a-lib/alib1.c repos/a-dir/a-lib/alib2.c

If we are in repos, then 'git log -- a-dir' will show all four files. However, I only wish to see the output for all files that are the 'a-dir' level. For the above, that would consist of a1.c and a2.c. However, I also wish to see any files that might have existed in the history at this level. I know I can do 'git log -- a-dir/a1.c' to search all history for the a1.c file, but I want the history of the a-dir directory (only).

Is there a way to accomplish this?
Thanks,
Paul
Message 1 of 1 in “non-recursive path limits”
  1. Martinolich PaulAug 4, 2009

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.