Handle case where new repo has no HEAD.
This commit is contained in:
parent
d4bcaf4398
commit
80cdc566cb
1 changed files with 5 additions and 1 deletions
|
@ -207,7 +207,11 @@ def checkup_committed():
|
||||||
def checkup_pushed():
|
def checkup_pushed():
|
||||||
details = dotdict.DotDict(default=None)
|
details = dotdict.DotDict(default=None)
|
||||||
|
|
||||||
my_head = git_rev_parse('@')
|
try:
|
||||||
|
my_head = git_rev_parse('@')
|
||||||
|
except subprocess.CalledProcessError as exc:
|
||||||
|
details.error = 'No HEAD'
|
||||||
|
return details
|
||||||
|
|
||||||
try:
|
try:
|
||||||
remote_head = git_rev_parse('@{u}')
|
remote_head = git_rev_parse('@{u}')
|
||||||
|
|
Loading…
Reference in a new issue