Re: [PATCH 1/2] filter-branch: provide the convenience functions also for commit filters

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

 



Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes:

> +this_script="$(cd "$(dirname "$0")"; pwd)"/$(basename "$0")
> ...
> +		filter_commit="SOURCE_FUNCTIONS=1 . \"$this_script\"; $OPTARG"

Hmmmmmm.

Care to enlighten why this is not just:

	filter_commit="SOURCE_FUNCTIONS=1 . \"$0\"; $OPTARG"

Is it because you cd(1) around in the script, and it can be
relative to where you started?

In either case, are you quoting potential funnies (such as '"'
or '\\') in "$0" sufficiently?  Exporting this_script variable,
and changing the above to

	filter_commit='SOURCE_FUNCTIONS=1 . "$this_script";'" $OPTARG"

to arrange the shell that is invoked with 'sh -c' to expand its
value would make it smaller problem, I suspect.


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

  Powered by Linux