git-describe deals gracefully with broken submodules
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | submodule.c: port is_submodule_modified to use porcelain 2submodule.c | +49 | 0 replies | |
| 2/3 | revision machinery: gentle submodule errorsdiff-lib.c diff.h diffcore.h +4 more | +52 | 0 replies | |
| 3/3 | builtin/describe: introduce --submodule-error-as-dirty flagbuiltin/ t/ | +27 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] git-describe deals gracefully with broken submodules
Our own version generation in GIT-VERSION-GEN is somewhat sane by testing if we have a .git dir, and use that as a signal whether the obtained copy of git was obtained using git (clone/fetch) or if it is just a downloaded tar ball.
Other scripts to generate a version are not as cautious and just run "git describe". An error from git-describe is treated as a sufficient signal to assume it is not a git repository.
When submodules come into play, this is not true, as a submodule may be damaged instead, such that we're still in a git repository but error out for the sake of reporting a severly broken submodule.
Add a flag to git-describe that instructs it to treat severe submodule errors as "dirty" instead of erroring out.
Thanks,
Stefan
Stefan Beller (3):
submodule.c: port is_submodule_modified to use porcelain 2 revision machinery: gentle submodule errors builtin/describe: introduce --submodule-error-as-dirty flag
builtin/describe.c | 17 ++--- diff-lib.c | 10 ++- diff.h | 1 + diffcore.h | 3 +- revision.c | 2 + submodule.c | 94 +++++++++++++++++----------- submodule.h | 10 ++- t/t4060-diff-submodule-option-diff-format.sh | 22 +++++++ t/t6120-describe.sh | 17 +++++ 9 files changed, 128 insertions(+), 48 deletions(-)
Signature · 1 line
2.12.0.402.g4b3201c2d6.dirty