Merge branch 'nd/submodule-status-fix'
"git submodule status" did not check the symbolic revision name it computed for the submodule HEAD is not the NULL, and threw it at printf routines, which has been corrected. * nd/submodule-status-fix: submodule--helper: don't print null in 'submodule status'maint
commit
0cd58d8ba9
|
@ -596,8 +596,12 @@ static void print_status(unsigned int flags, char state, const char *path,
|
||||||
|
|
||||||
printf("%c%s %s", state, oid_to_hex(oid), displaypath);
|
printf("%c%s %s", state, oid_to_hex(oid), displaypath);
|
||||||
|
|
||||||
if (state == ' ' || state == '+')
|
if (state == ' ' || state == '+') {
|
||||||
printf(" (%s)", compute_rev_name(path, oid_to_hex(oid)));
|
const char *name = compute_rev_name(path, oid_to_hex(oid));
|
||||||
|
|
||||||
|
if (name)
|
||||||
|
printf(" (%s)", name);
|
||||||
|
}
|
||||||
|
|
||||||
printf("\n");
|
printf("\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue