* maint:
  Fix describe --tags --long so it does not segfault
This commit is contained in:
Junio C Hamano 2008-07-02 21:57:50 -07:00
Родитель 8cb560fc47 182c5afa6c
Коммит 7d3580d74c
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -204,7 +204,7 @@ static void describe(const char *arg, int last_one)
*/
display_name(n);
if (longformat)
show_suffix(0, n->tag->tagged->sha1);
show_suffix(0, n->tag ? n->tag->tagged->sha1 : sha1);
printf("\n");
return;
}

Просмотреть файл

@ -139,4 +139,6 @@ check_describe "test1-lightweight-*" --tags --match="test1-*"
check_describe "test2-lightweight-*" --tags --match="test2-*"
check_describe "test2-lightweight-*" --long --tags --match="test2-*" HEAD^
test_done