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.newwhich in sh/bash is (you can fancy this up some):
rev=$(git rev-parse "$1") || exit
path=$2followed 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