All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: How is git diff --relative supposed to work?
Date: Tue, 06 Jan 2026 19:22:19 +0900	[thread overview]
Message-ID: <xmqqfr8jjb1g.fsf@gitster.g> (raw)
In-Reply-To: <f1cd3ca7-9b31-45b0-b990-05f4d1f6b4f2@kdbg.org> (Johannes Sixt's message of "Tue, 6 Jan 2026 09:15:03 +0100")

Johannes Sixt <j6t@kdbg.org> writes:

> Try this in your favorite repository:
>
> $ echo foo >> Makefile
> $ git -P diff --name-only --relative=Ma
> kefile
>
> This doesn't look right. Shouldn't the path specified with --relative be
> interpreted as a directory instead of an arbitrary textual prefix?

Sounds like an utter nonsense to me, too.  If we assume Ma were a
directory, would the result be "../Makefile" relative to the Ma
directory?


      reply	other threads:[~2026-01-06 10:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06  8:15 How is git diff --relative supposed to work? Johannes Sixt
2026-01-06 10:22 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqfr8jjb1g.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.