{"thread":{"id":"48731","subject":"Git diff --no-index --no-prefix output loses leading slash in paths","startedAt":"2018-06-18T14:33:37Z","lastAt":"2018-06-18T15:01:20Z","messageCount":3,"participants":["George King","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"350383","messageId":"DFDB0568-9543-4135-A56D-821D4244DC8A@gmail.com","threadId":"48731","inReplyTo":null,"subject":"Git diff --no-index --no-prefix output loses leading slash in paths","fromName":"George King","fromEmail":"george.w.king@gmail.com","sentAt":"2018-06-18T14:33:16Z","receivedAt":"2018-06-18T14:33:37Z","isPatch":false,"sender":{"key":"george.w.king@gmail.com","avatar":"https://gravatar.com/avatar/9f94a4a17188bfe407b5d04a8d2563760028f802a0536e61c076dcb806f23226?d=mp&s=160"},"body":"As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following:\n\ndiff --git relative/path absolute/path\nindex XXXXXXX..YYYYYYY ZZZZZZ\n--- relative/path\n+++ absolute/path\n\nThe leading slash on `absolute/path` is lost. This is unfortunate; my use case is a diff highlighter that parses and reformats paths so that code editors can autodetect them and link to the files. \n\nWould the maintainers please consider fixing the output to preserve absolute paths?\n\nThank you,\nGeorge King\n\n"},{"id":"350384","messageId":"CACsJy8Cgm6gryO=X2GmztynbkkEEV=nz_J+QZG-93fS7D4eDRQ@mail.gmail.com","threadId":"48731","inReplyTo":"DFDB0568-9543-4135-A56D-821D4244DC8A@gmail.com","subject":"Re: Git diff --no-index --no-prefix output loses leading slash in paths","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2018-06-18T14:59:01Z","receivedAt":"2018-06-18T14:59:32Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Jun 18, 2018 at 4:36 PM George King <george.w.king@gmail.com> wrote:\n>\n> As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following:\n\nI checked as far back as v1.4.0 and git behaved the same way too. What\nversion did it work for you? Or is this not a regression, rather a\nfeature request?\n\n> diff --git relative/path absolute/path\n> index XXXXXXX..YYYYYYY ZZZZZZ\n> --- relative/path\n> +++ absolute/path\n>\n> The leading slash on `absolute/path` is lost. This is unfortunate; my use case is a diff highlighter that parses and reformats paths so that code editors can autodetect them and link to the files.\n>\n> Would the maintainers please consider fixing the output to preserve absolute paths?\n>\n> Thank you,\n> George King\n>\n-- \nDuy\n"},{"id":"350385","messageId":"9852F27B-0FB8-4A7E-97C1-52B5D0D9377E@gmail.com","threadId":"48731","inReplyTo":"CACsJy8Cgm6gryO=X2GmztynbkkEEV=nz_J+QZG-93fS7D4eDRQ@mail.gmail.com","subject":"Re: Git diff --no-index --no-prefix output loses leading slash in paths","fromName":"George King","fromEmail":"george.w.king@gmail.com","sentAt":"2018-06-18T15:01:11Z","receivedAt":"2018-06-18T15:01:20Z","isPatch":false,"sender":{"key":"george.w.king@gmail.com","avatar":"https://gravatar.com/avatar/9f94a4a17188bfe407b5d04a8d2563760028f802a0536e61c076dcb806f23226?d=mp&s=160"},"body":"This is a feature request; sorry for the confusion. My guess is that it's a corner case that was not considered due to the default prefixing.\n\n\n> On Jun 18, 2018, at 10:59 AM, Duy Nguyen <pclouds@gmail.com> wrote:\n> \n> On Mon, Jun 18, 2018 at 4:36 PM George King <george.w.king@gmail.com> wrote:\n>> \n>> As of 2.17.1, `git diff --no-index --no-prefix relative/path /absolute/path` produces the following:\n> \n> I checked as far back as v1.4.0 and git behaved the same way too. What\n> version did it work for you? Or is this not a regression, rather a\n> feature request?\n> \n>> diff --git relative/path absolute/path\n>> index XXXXXXX..YYYYYYY ZZZZZZ\n>> --- relative/path\n>> +++ absolute/path\n>> \n>> The leading slash on `absolute/path` is lost. This is unfortunate; my use case is a diff highlighter that parses and reformats paths so that code editors can autodetect them and link to the files.\n>> \n>> Would the maintainers please consider fixing the output to preserve absolute paths?\n>> \n>> Thank you,\n>> George King\n>> \n> -- \n> Duy\n\n"}]}