Re: [PATCH 2/2] Improve "move the whole tree into a subdirectory" example.

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

 



Ville Skyttä <ville.skytta@xxxxxx> writes:

> Using "/" as the sed substitution delimiter is less likely to clash
> with desired subdirectory names than "-".

Sign-off?

The standard substitution in a case like this where you want to avoid
using "/" is "|", not "-".

> ---
>  Documentation/git-filter-branch.txt |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index 020028c..a90e2dd 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -354,11 +354,12 @@ git filter-branch ... C..H --not D
>  git filter-branch ... D..H --not C
>  ----------------------------------------
>  
> -To move the whole tree into a subdirectory, or remove it from there:
> +To move the whole tree into a subdirectory named newsubdir, or remove
> +it from there:
>  
>  ---------------------------------------------------------------
>  git filter-branch --index-filter \
> -	'git ls-files -s | sed "s-\t\"*-&newsubdir/-" |
> +	'git ls-files -s | sed "s/\t\"*/&newsubdir\//" |
>  		GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
>  			git update-index --index-info &&
>  	 mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' HEAD
> -- 
> 1.7.1.1
--
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]