mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-28 01:45:55 +08:00
gj_common: Avoid returning a NULL shorthand
It's not what we expect and was causing crashes on some repos.
This commit is contained in:
@ -360,7 +360,7 @@ char *gj_branch_name(git_repository *repo)
|
|||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
git_reference *ref = NULL;
|
git_reference *ref = NULL;
|
||||||
char *shorthand = NULL;
|
char *shorthand = "master";
|
||||||
|
|
||||||
err = git_repository_head(&ref, repo);
|
err = git_repository_head(&ref, repo);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
Reference in New Issue
Block a user