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

Re: [PATCH] diff: add --no-indicators option

From
Chris Torek <chris.torek@gmail.com>
Date
Dec 19, 2025, 15:02 UTC
Message-ID
<CAPx1Gvcc6P08F=HiqWOMcWjGtv1TsqeS3aR=GtzVxpMBzorqFw@mail.gmail.com>
In-Reply-To
<20251219145447.22234-1-haraldnordgren@gmail.com>

On Fri, Dec 19, 2025 at 6:54 AM Harald Nordgren <haraldnordgren@gmail.com> wrote:

> Hi Chris!
>
> Thanks for the idea, but that doesn't seem fast at all 😅
It's terrifically easy to script. Instead of:
    git show $rev -- $path
you need:
    git show ${rev}^:$path >$path.old
    git show ${rev}:$path >$path.new
which in sh/bash is (you can fancy this up some):
    rev=$(git rev-parse "$1") || exit
    path=$2

followed by the two "git show" commands. Using ${rev}^ gets you the raw hash ID of the specified revision followed by the caret / hat suffix, which means "parent of the given rev", so all you need to specify to the mini-script is the same rev you'd pass to "git show" and the path name.

(I don't need this often enough to bother with the script, I just type in the commands.)

Chris
Previous: Harald NordgrenNext: Harald Nordgren
Message 11 of 18 in “diff: add --no-indicators option”
  1. diff: add --no-indicators optionHarald Nordgren via GitGitGadget, Dec 19, 2025
  2. Collin FunkDec 19, 2025
  3. Harald NordgrenDec 19, 2025
  4. Ben KnobleDec 19, 2025
  5. Harald NordgrenDec 19, 2025
  6. Phillip WoodDec 19, 2025
  7. Harald NordgrenDec 19, 2025
  8. Phillip WoodDec 19, 2025
  9. Chris TorekDec 19, 2025
  10. Harald NordgrenDec 19, 2025
  11. Chris TorekDec 19, 2025
  12. Harald NordgrenDec 19, 2025
  13. Harald NordgrenDec 19, 2025
  14. Johannes SixtDec 20, 2025
  15. Junio C HamanoDec 19, 2025
  16. Harald NordgrenDec 19, 2025
  17. Junio C HamanoDec 20, 2025
  18. Harald NordgrenDec 20, 2025

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.