Skip to content

Conversation

pmiossec
Copy link
Member

@pmiossec pmiossec commented Nov 21, 2023

by parsing correctly the output of the command
git branch --list --merged HEAD
that contains "+ " prefix in front of branch names checked out in git worktrees

  • add support of some other edge cases

Fixes #11375

Screenshots

Before

image

After

image

Test methodology

  • unit tests
  • manual

Test environment(s)

  • GIT
  • Windows

Merge strategy

I agree that the maintainer squash merge this PR (if the commit message is clear).


✒️ I contribute this code under The Developer Certificate of Origin.

@ghost ghost assigned pmiossec Nov 21, 2023
@pmiossec pmiossec changed the title Delete unused branch olugin: Makes GetBranchNames() support worktrees Delete unused branch plugin: Makes GetBranchNames() support worktrees Nov 21, 2023
@pmiossec pmiossec force-pushed the fix_delete_unused_branch_when_worktree branch 2 times, most recently from 7c0f6cb to 55c2a2a Compare November 21, 2023 14:45
@pmiossec
Copy link
Member Author

@jonnydee You could test the fix in the portable version built and please confirm that it solves the issue:

https://ci.appveyor.com/project/gitextensions/gitextensions/builds/48578287/artifacts

Copy link
Member

@mstv mstv left a comment

Choose a reason for hiding this comment

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

looks sensible, have only run the changed "git log" command

Copy link
Member

@RussKie RussKie left a comment

Choose a reason for hiding this comment

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

👍 modulo the outstanding feedback

@RussKie
Copy link
Member

RussKie commented Nov 22, 2023

Should we patch 4.2?

@RussKie RussKie added the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Nov 22, 2023
@jonnydee
Copy link

@jonnydee You could test the fix in the portable version built and please confirm that it solves the issue:

https://ci.appveyor.com/project/gitextensions/gitextensions/builds/48578287/artifacts

@pmiossec I can confirm that the fix solves the issue. That was pretty fast, thank you very much!

@jonnydee
Copy link

Should we patch 4.2?

Yes, please!

by parsing correctly the output of the command
`git branch --list --merged HEAD`
that contains "+ " prefix in front of branch names
checked out in git worktrees

+ add support of some other edge cases

Fixes gitextensions#11375

+ makes git log command a little more resilient by appending '--' like done in gitextensions#11277
@pmiossec pmiossec force-pushed the fix_delete_unused_branch_when_worktree branch from 55c2a2a to 88e76fc Compare November 22, 2023 09:15
@ghost ghost removed the 📭 needs: author feedback More info/confirmation awaited from OP; issues typically get closed after 30 days of inactivity label Nov 22, 2023
@pmiossec pmiossec changed the base branch from master to release/4.0 November 22, 2023 09:16
@pmiossec pmiossec closed this Nov 22, 2023
@pmiossec pmiossec reopened this Nov 22, 2023
@pmiossec
Copy link
Member Author

Fixed everything (I think). Rebased on and targeted release/4.0.

@RussKie RussKie added this to the 4.2.1 milestone Nov 23, 2023
@RussKie RussKie merged commit 5d6b4a6 into gitextensions:release/4.0 Nov 23, 2023
@RussKie
Copy link
Member

RussKie commented Nov 23, 2023

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use of git worktrees breaks "Delete obsolete branches" plugin
5 participants