News for hackers. Stuff that matters.
Re:Show HN: Hiding code from Git diff by grkvlt on Thursday December 14, 2017 @12:09AM (#15920086)
But if the idea is that I want `foo6()` etc to always be executed, wouldn't I just handle the rebase from master by resolving the conflict as follows, instead?

  foo():
      foo1()
      foo2()
      foo4()
      foo5()
      foo6()
      if (!foo3()): return 0
Re:Show HN: Hiding code from Git diff by mehrdadn on Thursday December 14, 2017 @01:46AM (#15920398)
> wouldn't I just handle the rebase from master by resolving the conflict

(a) No, because there is no conflict. It gets merged "cleanly" without you realizing it. (Let me emphasize this: merge is NOT guaranteed give a correct result if it happens cleanly. This is just one example.)

(b) No, obviously in general doing foo3() at the end will not give the same result as doing it in the middle.