Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Fix MR operations for detached heads #763

Merged
merged 2 commits into from
Jun 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Please avoid:
Prerequisites:
- Go 1.13+

Build with: `make` or `go build -o bin/glab ./cmd/main.go`
Build with: `make` or `go build -o bin/glab ./cmd/glab/main.go`

Run the new binary as: `./bin/glab`

Expand Down
2 changes: 1 addition & 1 deletion commands/mr/mrutils/mrutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func MRFromArgsWithOpts(
}
}

if branch == "" {
if branch == "" && mrID == 0 {
branch, err = f.Branch()
if err != nil {
return nil, nil, err
Expand Down