{"thread":{"id":"49199","subject":"how to output absolute paths in git diff?","startedAt":"2018-08-23T09:14:23Z","lastAt":"2018-08-23T09:14:23Z","messageCount":1,"participants":["Timothee Cour"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"356349","messageId":"CANri+EwMTwtmg9NMe6XBg=wVdsmW51MbkpfWtBQ+KT8KMjJryQ@mail.gmail.com","threadId":"49199","inReplyTo":null,"subject":"how to output absolute paths in git diff?","fromName":"Timothee Cour","fromEmail":"timothee.cour@gmail.com","sentAt":"2018-08-23T09:13:54Z","receivedAt":"2018-08-23T09:14:23Z","isPatch":false,"sender":{"key":"timothee.cour@gmail.com","avatar":null},"body":"This has all the context:\nhttps://stackoverflow.com/questions/22698505/how-to-show-full-paths-in-git-diff\n\nI'd like `--show-abs-path` to show absolute paths in:\ngit diff --show-abs-path args...\n\neg:\ngit diff --no-index `get_file1` `get_file2`\ncould show:\n--- a/Users/timothee/temp/ripgrep/help0.txt\n+++ b/help1.txt\n\n* passing '--dst-prefix=$PWD' and '--src-prefix=$PWD' doesn't help\nbecause path arguments could be absolute, so it'll create\n$PWD/Users/timothee/temp/ripgrep/help0.txt (wrong)\n\n* passing '--dst-prefix=.' will behave weirdly, replacing leading `/`\nby `.` (seems wrong)\ndiff --git .Users/timothee/temp/ripgrep/help0.txt b/help1.txt\n\nNOTE: I'm invoking the `git diff` command via a more complicated case\n(with multiple arguments including git diff flags and git diff files),\nso it's awkward for me to parse which arguments correspond to a file\nvs a flag (ie prevents easily converting input file arguments to\nabsolute paths), but `git` could do it easily via a flag, eg\n`--show-abs-path`\n"}]}