Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add worktree option to fast forwarding operation #4051

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

john-mutuma
Copy link

@john-mutuma john-mutuma commented Nov 8, 2024

  • PR Description

Fix a reported issue regarding Fast-forwarding a branch that is checked out in a different worktree. It's reported, and I could repro, that whenever such an action is taken, the current worktree is polluted with unwanted File changes related to the Fast-forward operation.

A solution is suggested – and tested to produce expected results – that adding --work-tree option to the generated command should fix the issue.

Issue: 2957

I'm proposing to merge these changes as it produces expected results:
Screenshot 2024-11-08 at 19 55 31

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@jesseduffield
Copy link
Owner

Thanks for raising this. I'd copy+paste this test and tweak it for this PR.

@jesseduffield jesseduffield added the bug Something isn't working label Nov 9, 2024
@john-mutuma john-mutuma marked this pull request as draft November 21, 2024 10:23
@john-mutuma john-mutuma marked this pull request as ready for review November 21, 2024 14:33
Copy link
Owner

@jesseduffield jesseduffield left a comment

Choose a reason for hiding this comment

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

LGTM. Will merge after tests pass

@john-mutuma
Copy link
Author

LGTM. Will merge after tests pass

There was a linting fault caught, now corrected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants