From: Johannes Sixt <j.sixt@viscovery.net>
To: Jari Aalto <jari.aalto@cante.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-filter-branch.txt: mention absolute path for scripts in --tree-filter
Date: Mon, 15 Mar 2010 12:57:49 +0100 [thread overview]
Message-ID: <4B9E20BD.3090705@viscovery.net> (raw)
In-Reply-To: <87k4td95xm.fsf@jondo.cante.net>
Jari Aalto schrieb:
> J6t:
>> 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.
>
> Full context was:
>
> --tree-filter <command>::
> This is the filter for rewriting the tree and its contents.
> The argument is evaluated in shell with the working
> directory set to the root of the checked out tree. The new tree
> 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'
I am complaining that you say "In case the <command> is a shell
script...". There are no other cases; <command> is always a shell script.
What you meant to say is: "If you have your filter written down in a
separate shell script, you must invoke it using an absolute path, for
example, --tree-filter '/path/to/filter.sh'".
>> 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 don't know.
It was a rethoric question. The hint about paths to files outside the
working directory should go to the general description of filters.
> cd <gir repo>
> git filter-branch --tree-filter "sh $(pwd)/filter.sh" HEAD
>
> And that didn't work quit either. Script was run, but paths weren't no
> longer relative to the "working dir" I was cd'd to:
>
> rm file \
> dir/file \
> dir/file \
> ..
I don't understand what you are trying to say, and I don't understand why
it helped to run
git filter-branch --tree-filter "sh /the/git/repo/filter.sh" HEAD
when the above did not work - from filter-branch's POV there is simply no
difference between the two invocations.
-- Hannes
PS: Please keep Cc list.
next prev parent reply other threads:[~2010-03-15 11:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 8:26 [PATCH] git-filter-branch.txt: mention absolute path for scripts in --tree-filter Jari Aalto
2010-03-15 9:30 ` Johannes Sixt
2010-03-15 11:32 ` Jari Aalto
2010-03-15 11:57 ` Johannes Sixt [this message]
2010-03-15 17:14 ` Junio C Hamano
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=4B9E20BD.3090705@viscovery.net \
--to=j.sixt@viscovery.net \
--cc=git@vger.kernel.org \
--cc=jari.aalto@cante.net \
/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.