{"thread":{"id":"64733","subject":"How is git diff --relative supposed to work?","startedAt":"2026-01-06T08:15:14Z","lastAt":"2026-01-06T10:22:22Z","messageCount":2,"participants":["Johannes Sixt","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"533114","messageId":"f1cd3ca7-9b31-45b0-b990-05f4d1f6b4f2@kdbg.org","threadId":"64733","inReplyTo":null,"subject":"How is git diff --relative supposed to work?","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2026-01-06T08:15:03Z","receivedAt":"2026-01-06T08:15:14Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Try this in your favorite repository:\n\n$ echo foo >> Makefile\n$ git -P diff --name-only --relative=Ma\nkefile\n\nThis doesn't look right. Shouldn't the path specified with --relative be\ninterpreted as a directory instead of an arbitrary textual prefix?\n\n-- Hannes\n\n"},{"id":"533123","messageId":"xmqqfr8jjb1g.fsf@gitster.g","threadId":"64733","inReplyTo":"f1cd3ca7-9b31-45b0-b990-05f4d1f6b4f2@kdbg.org","subject":"Re: How is git diff --relative supposed to work?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-01-06T10:22:19Z","receivedAt":"2026-01-06T10:22:22Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n> Try this in your favorite repository:\n>\n> $ echo foo >> Makefile\n> $ git -P diff --name-only --relative=Ma\n> kefile\n>\n> This doesn't look right. Shouldn't the path specified with --relative be\n> interpreted as a directory instead of an arbitrary textual prefix?\n\nSounds like an utter nonsense to me, too.  If we assume Ma were a\ndirectory, would the result be \"../Makefile\" relative to the Ma\ndirectory?\n\n"}]}