Skip to content

feat(stacked-diffs): Add origin fetch so sync will fully pull+push

Description

As mentioned in #7473 (comment 1954678638), glab stack sync will not get changes added in the Web UI (suggestions, for example). sync will pull in changes if it detects them with git status, but it would need to git fetch [remote] first. That's what this MR adds.

Related Issues

Resolves #7575 (closed)

How has this been tested?

Run the following commands (borrowed from #7473 (comment 1954678638)):

In a testing git repo:

  • glab stack create stack-test
  • echo foo > test-file
  • git add test-file
  • glab stack save -m "change"
  • echo bar > test-file
  • glab stack save -m "change2"
  • glab stack sync
  • Now, in the Web UI, add a suggestion in one of the lines of the file on the first MR glab creates
  • Run glab stack sync again and confirm it pulls the changes for the first MR.

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)
  • Test gap

Closes #7575 (closed)

Edited by Gary Holtz

Merge request reports

Loading