[PATCHv2 0/7] git describe blob
- From
Stefan Beller <sbeller@google.com>
- Date
- Oct 31, 2017, 21:18 UTC
- Message-ID
- <20171031211852.13001-1-sbeller@google.com>
- In-Reply-To
- <20171031003351.22341-1-sbeller@google.com>
v2:
* other variable names in patch v1, the commit message explains the unusual strategy for the scratch pad variable, + assert * less ugly test in p2 * typofix in p3 commit msg * patch 4 (debug printing) unchanged, awaiting discussion to start/settle. * rephrased the man page in p6.
Thanks, Stefan
v1: This is not an RFC any more, but a serious series.
Occasionally a user is given an object hash from a blob as an error message or other output (e.g. [1]).
It would be useful to get a further description of such a blob, such as the (commit, path) tuple where this blob was introduced.
This implements the answer in builtin/describe, however the heuristics are weak. See patch 6 for details.
Any feedback welcome,
Thanks, Stefan
Stefan Beller (7): list-objects.c: factor out traverse_trees_and_blobs revision.h: introduce blob/tree walking in order of the commits builtin/describe.c: rename `oid` to avoid variable shadowing builtin/describe.c: print debug statements earlier builtin/describe.c: factor out describe_commit builtin/describe.c: describe a blob t6120: fix typo in test name
Documentation/git-describe.txt | 13 +++- Documentation/rev-list-options.txt | 5 ++ builtin/describe.c | 125 ++++++++++++++++++++++++++++--------- list-objects.c | 52 +++++++++------ revision.c | 2 + revision.h | 3 +- t/t6100-rev-list-in-order.sh | 46 ++++++++++++++ t/t6120-describe.sh | 17 ++++- 8 files changed, 213 insertions(+), 50 deletions(-) create mode 100755 t/t6100-rev-list-in-order.sh
-- 2.15.0.rc2.443.gfcc3b81c0a