On Wed, Nov 1, 2017 at 3:41 PM, Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > Hi Stefan, > > On Wed, 1 Nov 2017, Stefan Beller wrote: > >> >> I know id prefer the first commit that introduced the blob. That's >> >> what describing a commit does, it finds the oldest tag prior to the >> >> commit, while --contains finds the first tag that contains the commit >> >> as an ancestor. >> > >> > It is very easy to wish for "the oldest commit introducing a blob". But >> > since we're in a DAG, this question is not necessarily easy to answer: >> > >> > - A - B - C >> > \ / >> > D >> > >> > Let's assume that all commits except A have the blob, and that B and D >> > (for some reason) have the same author/committer dates. >> > >> > Do you identify B or D as the commit introducing the blob? >> >> The current implementation gives C, though. >> (assuming C is HEAD, and A is ancient) >> >> With the --reverse flag one of B or D is given (not sure which, >> depends on the exact order). > > Sure, but it is still a tricky thing. Imagine > > - A1 - B1 - A2 - B2 - B3 > > where all the B* commits have the blob. Do you really want to report B1 > rather than B2 as the commit introducing the blob? (I would prefer B2...) > > Ciao, > Dscho Yes, but I'd rather we find either B1 or B2, rather than B3, or in the first case, I'd rather we *at least* provide B or D, rather than C. Or: A - B1 - C -E - ... - Z \ B2 / In this example, if everything except a had the blob, we'd find z, which I think isn't as useful as finding one of B or D. Sure we can't find a perfect answer, but I'd rather find a commit which introduced as blob as one that adds the blob, rather than one that happens to point to it because it has history which includes it. I think both questions are valuable, the first is "which commit last had this blob", the second is "which commit first introduced this blob", neither of which can always give a definitive answer. It really depends on what question you're asking up front. Thanks, Jake