Removing merge commits that could have been fast-forward #424
Unanswered
raphaelcoeffic
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here is the setup:
filter-branch
(and very slow)git-filter-repo
to help me obtaining the exact same result (important for me)The script used for the last pass is listed here (the first 2 use regular
git-filter-repo
command line):The small issue here is that it seems I should not be using
metadata
, as it seems to be part of the private API, and is thus not available when passing the function directly in the command line with--commit-callback
(argument is generated as_do_not_use_this_var
in_handle_arg_callbacks()
/make_callback()
).For reference here is that what I think would be better for me to use (which seems quite odd and risky for compatibility with future versions):
So I guess the basic question is: how can I find out that one of the parents of a merge commit has a common ancestor with the other, and I shall thus evict this commit?
Edit: just found this (
git blame
is cool :-)): 0b70b72It suggests I should continue to use my separate Python script rather than using vanilla command line, is that correct?
Beta Was this translation helpful? Give feedback.
All reactions