Glad you got it working! A few notes, just in the interests of sharing git war stories...
On Fri, Aug 28, 2015 at 3:06 PM, Yingyi Bu <[email protected]> wrote: > I tried Chris' method but the format-patch (step 1) somehow doesn't seem to > give me the right patch --- maybe it's because I have created multiple > Gerrit CLs on the branch --- though the earlier CLs were merged, they seem > to go into the generated patch anyway... > That's not completely surprising if you made the branch some time ago and hadn't run "git gerrit update" in a while. I really do recommend getting into the habit of not re-using branches for separate changes if you can avoid it. Either "git checkout master; git checkout -b newbranch" for new stuff, or else "git checkout master; git checkout -B branch" to force-reset your branch to the tip after you've committed a change through Gerrit. In this case, of course, "git gerrit update" wouldn't have worked after the big repackaging changes went in. It may be necessary to rebase your local branch to Till's commit before running the "git format-patch" command. (git rebase 95350e2) > I slightly modified Chris' steps and it works for me now: > > 1. On your local master, manually revert the master to the commit (Till's) > before the packaging change, by: > git reset --soft HEAD~1 > Do that iteratively until the head is Till's commit (using "git log" to > check that). > Then, > git reset --hard #clear all staged files > FYI, you could do this in one step with "git checkout master; git reset --hard 95350e2". (After you reset, an annoying file > "asterix-app/src/test/resources/AQLTS/queries/IfThenElse.aql" will show up, > just commit it temporarily... It seems the file has some OS-dependent > formatting issue and "git checkout" couldn't clear it...) > Ah, yeah, Ian and I ran into that too. I found a work-around, I'll send a separate email about that. > 2. Switch to your branch and merge master. That makes your branch good up > to Till's commit. > I *think* your steps 1 + 2 together could be accomplished by "git rebase 95350e2" on your topic branch. That should be equivalent. Although it might not have worked if you had committed IfThenElse.aql change... hm. I think it was bad luck that that issue is showing up at the same time. Git certainly gives you more than one way to approach problems, though! (And many more than one way to create new ones...) Ceej aka Chris Hillery
