Re: [PATCH] Introduce <branch>@{tracked} as shortcut to the tracked branch
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Sep 10, 2009, 15:24 UTC
- Message-ID
- <alpine.DEB.1.00.0909101723260.8306@pacific.mpi-cbg.de>
- In-Reply-To
- <20090910142628.GA7275@coredump.intra.peff.net>
Hi,
On Thu, 10 Sep 2009, Jeff King wrote:
Show 12 quoted lines
> 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