Thread (18 messages) flat view 18 messages, 5 authors, 2016-06-15

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

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:47:23

Possibly related (same subject, not in this thread)

Hi,

On Thu, 10 Sep 2009, Jeff King wrote:
quoted hunk ↗ jump to hunk
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help