Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0e967ff

Browse files
committedApr 17, 2025··
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

Lines changed: 1 addition & 1 deletion
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)
Please sign in to comment.