Skip to content

Commit

Permalink
push: ignore finish_connect() error for dry-run mode
Browse files Browse the repository at this point in the history
Signed-off-by: Jiang Xin <[email protected]>
  • Loading branch information
jiangxin committed Nov 14, 2024
1 parent 5851db0 commit 84c77a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ static int git_transport_push(struct transport *transport, struct ref *remote_re
* which may cause an error for `finish_connect()`. Ignore this error
* for atomic git-push.
*/
if (ret || args.atomic)
if (ret || (args.atomic && args.dry_run))
finish_connect(data->conn);
else
ret = finish_connect(data->conn);
Expand Down

0 comments on commit 84c77a9

Please sign in to comment.