Re: [StGit PATCH 1/2] Update the bash prompt from 'applied' instead of the obsolete 'current'

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

 



Note that "tail -1" gives a warning with newer versions, "tail -n 1"
should be the proper call.

Also I'm not sure it is a good way to look at "applied" file, since
Karl IIRC has plans to change this.  Better call "stg top" and not
touch that again :)

On Sun, May 20, 2007 at 10:04:03PM +0200, Robin Rosenberg wrote:
> Signed-off-by: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
> ---
> 
>  contrib/stgbashprompt.sh |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/contrib/stgbashprompt.sh b/contrib/stgbashprompt.sh
> index 16bb39b..7c5dc76 100755
> --- a/contrib/stgbashprompt.sh
> +++ b/contrib/stgbashprompt.sh
> @@ -8,8 +8,8 @@ if [ "$PS1" ]; then
>  		git_dir=$(git-rev-parse --git-dir 2> /dev/null) || return
>  		ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
>  		br=${ref#refs/heads/}
> -		top=$(cat $git_dir/patches/$br/current 2>/dev/null) \
> -			&& top="/$top"
> +		top=$(tail -1 $git_dir/patches/$br/applied 2>/dev/null) \
> +			&& top="/$top";
>  		echo "[$br$top]"
>  	}
>  	PS1='\u@\h:$(__prompt_git)\W\$ '
> 
> -
> 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
> 
> !DSPAM:4650aff673931961316905!
> 
-
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