Re: [PATCH] Introduce <branch>@{tracked} as shortcut to the tracked branch

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

 



Hi,

On Thu, 10 Sep 2009, Jeff King wrote:

> On Thu, Sep 10, 2009 at 10:16:18AM -0400, Jeff King wrote:
> 
> diff --git a/sha1_name.c b/sha1_name.c
> index a886846..ef4ec11 100644
> --- a/sha1_name.c
> +++ b/sha1_name.c
> @@ -276,7 +276,7 @@ static char *substitute_branch_name(const char **string, int *len)
>  		struct branch *tracking = branch_get(*ref ? ref : NULL);
>  
>  		free(ref);
> -		if (tracking->merge && tracking->merge[0]->dst) {
> +		if (tracking && tracking->merge && tracking->merge[0]->dst) {

Almost.

My version dies if tracking is NULL.

Ciao,
Dscho
--
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]