On Sun, 22 Jan 2017 13:53:51 -0800 Michael <keybou...@gmail.com> wrote:
> I'm trying to find something that did not get committed into master. > > I'm working on a mod for minecraft. At some point in the past, on one > of the branches, I made a change to replace tests for Blocks.AIR (a > constant referring to a single block) with block.isAir() (a method > call to ask blocks if they should be treated as air). > > I've just found that this isn't on master, so at some point, either > something did not merge, or else it did not merge properly. > > What I want to do: Starting from a specific commit, search any/all > branches after that looking for "isAir" to see where it was added, so > I can figure out what got lost / mis-merged. > > How do I do this? git log -SisAir --branches ^offending_commit should do the trick. It says «find all commits reachable from all branches but excluding the commits also reachable from offending_commit, whose changesets have a string containing "isAir" added or deleted». In particular, refer to: * the `git log` manual for the description of the "-Sstring" command-line option (the mode it enables is called "pickaxe"; see also "--pickaxe-regex" and "--pickage-all" modifiers to it, and the "-G" command-line option); * to the `git rev-list` manual for the "--branches" option; * and the gitrevisions manual for the ^commit notation. BTW you might be interested in this recent thread [1] on the main Git list which features both Torvalds and Hamano having chimed in with their insights of this history digging facilities. 1. http://public-inbox.org/git/0b6e3682-9575-7b4c-6cde-7b914364a...@synopsys.com/T/#t -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.