Re: [GUILT 1/2] guilt graph: Simplify getfiles.

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

 



Neat.

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@xxxxxxxxxxxxxx>

On Fri, Jan 23, 2015 at 03:21:06PM +0100, Per Cederqvist wrote:
> git diff-tree by default emits TAB-separated fields.  cut by defaults
> processes TAB-separated fields.  Simplify getfiles() by using TAB as
> the separator.
> 
> Signed-off-by: Per Cederqvist <cederp@xxxxxxxxx>
> ---
>  guilt-graph | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/guilt-graph b/guilt-graph
> index 0857e0d..d90c2f1 100755
> --- a/guilt-graph
> +++ b/guilt-graph
> @@ -36,7 +36,7 @@ fi
>  
>  getfiles()
>  {
> -	git diff-tree -r "$1^" "$1" | tr '\t' ' ' | cut -d' ' -f6
> +	git diff-tree -r "$1^" "$1" | cut -f2
>  }
>  
>  cache="$GUILT_DIR/$branch/.graphcache.$$"
> -- 
> 2.1.0
> 

-- 
C is quirky, flawed, and an enormous success.
		- Dennis M. Ritchie.
--
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]