Re: [PATCH v5] diff: add config option relative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2020-05-18 09:57:09-0700, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Hmph, what do you exactly mean by "broken patch"?
> 
> I actually do not mind people who set "diff.relative" to do
> 
>     $ git config diff.relative true
>     $ cd t && git format-patch -1 --stdout
> 
> to get an incomplete patch that covers only the t/ subdirectory, as
> long as they can ask Git to optionally get the full view with
> 
>     $ cd t && git format-patch -1 --stdout --no-relative

Well, git-format-patch has never understood --relative,
which I think is a sane behaviour,
hence git-format-patch will never understand --no-relative after this
patch.

Oh no, to my surprise, git-format-patch does accept --[no-]relative, now.

We don't document --relative for git-format-patch, the --relative
documentation is placed under the guard, for that matter:

Documentation/diff-options.txt 


ifndef::git-format-patch[]
-R::
        Swap two inputs; that is, show differences from index or
        on-disk file to tree contents.

--relative[=<path>]::
        When run from a subdirectory of the project, it can be
        told to exclude changes outside the directory and show
        pathnames relative to it with this option.  When you are
        not in a subdirectory (e.g. in a bare repository), you
        can name which subdirectory to make the output relative
        to by giving a <path> as an argument.
endif::git-format-patch[]

Maybe time to fix the documentation.

-- 
Danh



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux