1

If I run

git -c diff.mnemonicprefix=true diff stash@{0} $(git branch --show-current)

the first line in the output is still

diff --git a/file.txt b/file.txt

as if I hadn't used diff.mnemonicPrefix.

Why is this? And can it be "fixed"?

1
  • you are comparing two commits (stash@{0} and the head of your active branch), I think mnemonicprefix keeps the standard a/... b/... in this case. Commented Aug 22, 2024 at 16:45

1 Answer 1

1

A stash is not one of the cases listed in https://git-scm.com/docs/diff-config#Documentation/diff-config.txt-diffmnemonicPrefix where this option would change the output.

Sign up to request clarification or add additional context in comments.

1 Comment

But isn't a stash ultimately implemented as a commit? See here e.g. stackoverflow.com/questions/18527171/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.