Skip to content

Commit 0e967ff

Browse files
committed
fix: pressing Alt+Enter to commit and push in a repository that has no remotes will crash (#1205)
Signed-off-by: leo <[email protected]>
1 parent c231772 commit 0e967ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ViewModels/WorkingCopy.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1735,7 +1735,7 @@ private void DoCommit(bool autoStage, bool autoPush, bool allowEmpty = false, bo
17351735
CommitMessage = string.Empty;
17361736
UseAmend = false;
17371737

1738-
if (autoPush)
1738+
if (autoPush && _repo.Remotes.Count > 0)
17391739
_repo.ShowAndStartPopup(new Push(_repo, null));
17401740
}
17411741

0 commit comments

Comments
 (0)