Generalization of the `.git/MERGE_MSG' path #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Generalization of the
.git/MERGE_MSGpathIn general the
MERGE_MSGfile doesn't need to be located under the local.gitdirectory. In these cases the scriptciq-cherry-pick.pywill fail.An example would be a git repository created with
git-worktree. Assume the current directory contains a regular git repositorysome-projectwith a branchbranch-xand some commit with a hash ‹some-commit›. Without this change the last command would fail while it shouldn'tIn case of the
some-project-branch-xrepository theMERGE_MSGfile is undersome-project/.git/worktrees/some-project-branch-x/MERGE_MSG.While the
git worktreemay seem an exotic feature of git, it lends itself perfectly to making the same logical change across multiple branches, like the task of backporting bug fixes to different Rocky versions - a motivation for theciq-cherry-pick.pyprogram. It may therefore be expected to be used more often than usual in conjunction with this tool.