Re: [PATCH] git-filter-branch.txt: mention absolute path for scripts in --tree-filter

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

 



Jari Aalto schrieb:
> Signed-off-by: Jari Aalto <jari.aalto@xxxxxxxxx>
> ---
>  Documentation/git-filter-branch.txt |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index 020028c..01bd0ad 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -91,6 +91,9 @@ OPTIONS
>  	is then used as-is (new files are auto-added, disappeared files
>  	are auto-removed - neither .gitignore files nor any other ignore
>  	rules *HAVE ANY EFFECT*!).
> ++
> +In case the <command> is a shell script, provide an absolute path.
> +An example: --tree-filter 'sh /path/to/filter.sh'

Your choice of words is ambiguous: The --tree-filter is not the name of a
shell script, but rather the shell script itself; the example you gave is
just a shell script that happens to run only a shell on a file whose name
must be specified as an absolute path.

But doesn't the recommendation to use absolute paths apply not only to
--tree-filters, but

- to all filters;

- to all references to external files that the filters make.

I'm saying "recommendation" because git-filter-branch does not switch
directory ad lib., so theoretically, it would be possible to use relative
paths, even though the base of the relative paths would be non-obvious
because it is from inside a temporary directory named ".git-rewrite/t"
that is allocated next to .git.

-- Hannes

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