mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Show the current checked out HEAD if no branch is selected
This commit is contained in:
+7
-1
@@ -29,7 +29,13 @@
|
||||
// We use refparse to get the commit sha that we will parse. That way,
|
||||
// we can check if the current branch is the same as the previous one
|
||||
// and in that case we don't have to reload the revision list.
|
||||
NSString* newRef = [repository parseReference:[repository currentBranch]];
|
||||
|
||||
// If no branch was selected, use the current HEAD
|
||||
NSString* newRef = [repository currentBranch];
|
||||
if (!newRef || [newRef isEqualToString:@""])
|
||||
newRef = @"HEAD";
|
||||
newRef = [repository parseReference:newRef];
|
||||
|
||||
if ([newRef isEqualToString:currentRef])
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user