From: Tait <gnu...@t4...> - 2019-02-23 08:05:09
|
Ethan A Merritt <sf...@us...> said (on 2019/02/22): > After some delving I have discovered that [cherry-pick -x] used to be the > default in git but for some reason it was removed! > > The current documentation suggests that "git cherry-pick -x" may save the > history I want. So I will use that going forward. A cherry-pick could come from an entirely different repository (added as a remote), and with -n and the possibility of conflict, what's committed might not be the same as what was picked, so I'd speculate that's why -x was dropped from being a default. The -x adds a "(cherry picked from commit hhhh...)" to the commit message. It may be useful for humans, but I'm not aware of anything that automatically processes the added comment. That is, git log will still show the cherry-picked commit in both master..stable and stable..master. There is another tool, though, and I should have mentioned it earlier but forgot it until now: git cherry. I think it's exactly what Dima wants. And in poking at git-cherry, I learned that git-log actually has options for this, too, now. So I think we could have solved the problem without even needing this discussion. I'll let you read about git-cherry, but here's the git-log version: git log --left-right --graph --cherry-mark --date-order \ --oneline branch-5-2-stable...master # note, three dots, not two. See "dotted range notations" # under man git-rev-parse for details = 0a7b9a57e (origin/branch-5-2-stable, branch-5-2-stable) pm: restore binary backward compatibility for s... = 4146f1db2 pm: ignore alpha channel of RGBA colors = e73c08cb2 pm: reinitialize font on codepage change = 017c230c6 pm: remove help text of obsolete options = ca06c4ea1 Add a block for OS/2 code = fad43b5ad Fix glitch in toolbar icons on qt terminal | = 7bd40380f (HEAD -> master, origin/master, origin/HEAD) | Fix glitch in toolbar icons on qt terminal | > ef90e907b new function trim(" padded string ") strips l... | > b83c88bb8 Parse numeric timezone UTC offset (format %z)... < | f5585bdb0 Extend the conditions under which ungetc() is... | = 32c048991 pm: restore binary backward compatibility for... | = 28d0fe668 pm: ignore alpha channel of RGBA colors | = 2446baa32 pm: reinitialize font on codepage change | > 6ac277288 pm: the EAM_BOXED_TEXT conditional is gone | = 47d2f151e pm: remove help text of obsolete options ... etc ... You'll notice all the common cherry-picked commits are now marked with =. By changing --cherry-mark to --cherry-pick --right-only, they will be entirely excluded and only the un-picked commits on the master side will be shown: * ef90e907b new function trim(" padded string ") strips lea... * b83c88bb8 Parse numeric timezone UTC offset (format %z) ... * 6ac277288 pm: the EAM_BOXED_TEXT conditional is gone ... In all, I believe that makes 831 commits on master not on branch-5-2-stable. |