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

git log --patch for a particular file

From
VPVictor Porton <porton.victor@gmail.com>
Date
Oct 16, 2023, 10:20 UTC
Message-ID
<75545e1c-ce62-4b49-983e-1e7b1afb2fab@gmail.com>
I want this:
git log --patch -- server/src/api/docs.py
to print changes only for the file server/src/api/docs.py.

Currently, it in some reasons outputs nothing (this seems not to be an intended behavior and could be counted as a bug).

More generally, git log --patch -- A B C could log changes in files A, B, C (only).

It is questionable, whether to output commit information (commit hash, user email, etc.) for commits that don't change specified file(s). I would vote to indeed output this information, not to confuse the user about the order of commits.

Next: Kristoffer Haugsbakk
Message 1 of 2 in “git log --patch for a particular file”
  1. Victor PortonOct 16, 2023
  2. Kristoffer HaugsbakkOct 16, 2023

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.