Re: [PATCHv2 6/7] builtin/describe.c: describe a blob
- From
Stefan Beller <sbeller@google.com>
- Date
- Nov 1, 2017, 22:21 UTC
- Message-ID
- <CAGZ79kbOEM_W65Rym4yiDNHpFGTNWMYdh=aVPjThNWjEHPQong@mail.gmail.com>
- In-Reply-To
- <alpine.DEB.2.21.1.1711012310250.6482@virtualbox>
Show 16 quoted lines
>> 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).