mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 01:02:14 +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;
|
||||
git_reference *ref = NULL;
|
||||
char *shorthand = NULL;
|
||||
char *shorthand = "master";
|
||||
|
||||
err = git_repository_head(&ref, repo);
|
||||
if (err < 0)
|
||||
|
Reference in New Issue
Block a user