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

Conversation

jume-dev
Copy link
Contributor

Description
This fixes a problem with detached heads, where glab tries to find a branch even though an MR ID was given and a branch is not necessary to execute the command.

(also fixes a minor documentation issue I found while trying to setup things to get started)

Related Issue
I can't reopen the issue #735 but as stated there, it was not fixed with the latest release
Resolves #735

How Has This Been Tested?
Manually executing glab mr diff with an ID on a git setup with a detached head

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)

- ensures that mr operations also work on detached heads
@codecov
Copy link

codecov bot commented Jun 10, 2021

Codecov Report

Merging #763 (925a61a) into trunk (f62e2fb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##            trunk     #763   +/-   ##
=======================================
  Coverage   58.47%   58.47%           
=======================================
  Files          93       93           
  Lines        6681     6681           
=======================================
  Hits         3907     3907           
  Misses       2395     2395           
  Partials      379      379           
Impacted Files Coverage Δ
commands/mr/mrutils/mrutils.go 66.45% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f62e2fb...925a61a. Read the comment docs.

Copy link
Owner

@profclems profclems left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch @jume-dev!

Thanks for fixing this… I’m glad to do a patch release tonight with this fix

@profclems profclems merged commit a7d2cf2 into profclems:trunk Jun 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't merge a Merge Request if I am in detached HEAD state
2 participants