-
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/mr_checkout: fix fetch reference existence check
When the tracking mode was enabled (`-t`) the reference being passed to `git show-ref` was being wrongly composed, since the code was always expecting a simple branch name instead of a full remote ref. This patch fixes it by separating the check in two steps: 1) check if the local branch to which the MR will be checked-out exists and 2) if tracking is enabled, check if the remote ref already exists. Both are influenced by `--force`. Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
- Loading branch information
Showing
2 changed files
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters