Re: [PATCH 1/6] rebase -i: Add the "ref" command

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

 



Greg Price <price@xxxxxxx> writes:

> ...
> +		if ! grep -Fq " $refname" "$state_dir"/oldrefs 2>/dev/null
> +		then
> +			echo "$sha1 $refname" >> "$state_dir"/oldrefs

(Style) Extra SP between ">>" and "$state_dir/oldrefs"

> diff --git a/git-rebase.sh b/git-rebase.sh
> index d7855ea..1bfe6a8 100755
> --- a/git-rebase.sh
> +++ b/git-rebase.sh
> @@ -118,6 +118,8 @@ read_basic_state () {
>  		strategy_opts="$(cat "$state_dir"/strategy_opts)"
>  	test -f "$state_dir"/allow_rerere_autoupdate &&
>  		allow_rerere_autoupdate="$(cat "$state_dir"/allow_rerere_autoupdate)"
> +	test -f "$state_dir"/oldrefs &&
> +		oldrefs="$(cat "$state_dir"/oldrefs)"
>  }
>  
>  write_basic_state () {
> @@ -332,6 +334,15 @@ skip)
>  abort)
>  	git rerere clear
>  	read_basic_state
> +	[ -n "$oldrefs" ] && echo "$oldrefs" | while read sha1 ref

(Style) I think almost everybody else spells out "test".  Also please
break line before the while, like this:

	test -n "$oldrefs" &&
	echo "$oldrefs" |
	while read sha1 ref
        do
        	...

> +	do
> +		if test "(null)" = $sha1

Who is giving you "(null)"???
--
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]