Re: [RFC v3 3/3] diff: Add diff.orderfile configuration variable

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

 



Samuel Bronson <naesten@xxxxxxxxx> writes:

> diff.orderfile acts as a default for the -O command line option.
>
> [sb: split up aw's original patch; reworked tests and docs]
>
> [FIXME: Relative paths should presumably be interpreted relative to
> repository root; how should this be accomplished?]

Do you mean something like this?

    $ cd docs
    $ edit orderfile
    $ git diff -Oordefile
    $ cd subdir
    $ git diff -O../orderfile

Path-like parameters and values given by the end user should be
relative to the directory where the end user is (i.e. both -O
parameters in the above example name docs/orderfile).  All Git
processes, even the ones that are capable of being run from a
subdirectory, are supposed to first chdir to the top level of the
working tree before doing anything else, and adjust the path-like
things they get from the end user from the command line accordingly.
By the time diffcore_order() to prepare_order() callchain is called,
we certainly should have passed that chdir already, so the value of
the option needs to be prepended with the "prefix" when parsed.

The value specified for the diff.orderfile configuration can just be
a path relative to the top level of the working tree, I think.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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]