Skip to content

Introduce Git Standard Library

Calvin Wan git 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest3 patches 19 repliesIn review
  2. v3 posting 2/26 patches 10 repliesApplied
  3. v3 posting 1/20 of 6 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 RFC7 patches18 repliesSuperseded
v1 RFC8 patches20 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3pager: include stdint.h because uintmax_t is usedpager.h+2 -012 replies
2/3git-std-lib: introduce Git Standard LibraryDocumentation/Makefile Documentation/technical/git-std-lib.txt Makefile +3 more+274 -115 replies
3/3test-stdlib: show that git-std-lib is independentMakefile strbuf.h stubs/misc.c +3 more+299 -52 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchPhillip Wood
1/3
2/3Helped-by
3/3Helped-by

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/3] Introduce Git Standard Library

While it has been a while since the last reroll of this series[1], the contents and boundaries of git-std-lib have not changed. The focus for this reroll are improvements to the Makefile, test file, and documentation. Patch 1 contains a small fix for a missing include discovered by Jonathan Tan. Patch 2 introduces the Git Standard Library. And patch 3 introduces preliminary testing and usage examples for the Git Standard Library.

One important piece of feedback I received from the previous series is that Git should be the first consumer of its own libraries. Objects in git-std-lib.a are no longer contained in LIB_OBJS, but rather directly built into git-std-lib.a and then linked into git.a. There is some functionality that is used by git-std-lib.a that's not included in git-std-lib.a, such as tracing support. These have been stubbed out into git-stub-lib.a and can be built with git-std-lib.a to be used externally. Thank you to Philip Wood for these suggestions[2]!

The test file and Makefile have been updated to include cleanups suggested by Junio. Since git-std-lib.a is now a dependency of Git, the test file has also been included as part of the test suite. The series has been rebased onto a recent version of next and function calls that have been added/changed since the last reroll have also been included into the test file.

Finally, through our libification syncs, there have been various topics and questions brought up that would be better clarified with additional documentation in technical/git-std-lib.txt.

[1]
https://lore.kernel.org/git/[email protected]/
[2]
https://lore.kernel.org/git/[email protected]/

Calvin Wan (2):
git-std-lib: introduce Git Standard Library
test-stdlib: show that git-std-lib is independent

Jonathan Tan (1):
pager: include stdint.h because uintmax_t is used

 Documentation/Makefile                  |   1 +
 Documentation/technical/git-std-lib.txt | 170 +++++++++++++++
 Makefile                                |  71 +++++--
 pager.h                                 |   2 +
 strbuf.h                                |   2 +
 stubs/misc.c                            |  34 +++
 stubs/pager.c                           |   6 +
 stubs/trace2.c                          |  27 +++
 t/helper/.gitignore                     |   1 +
 t/helper/test-stdlib.c                  | 266 ++++++++++++++++++++++++
 t/t0082-std-lib.sh                      |  11 +
 11 files changed, 575 insertions(+), 16 deletions(-)
 create mode 100644 Documentation/technical/git-std-lib.txt
 create mode 100644 stubs/misc.c
 create mode 100644 stubs/pager.c
 create mode 100644 stubs/trace2.c
 create mode 100644 t/helper/test-stdlib.c
 create mode 100755 t/t0082-std-lib.sh

Range-diff against v4:

1:  2f99eb2ca4 < -:  ---------- hex-ll: split out functionality from hex
2:  7b2d123628 < -:  ---------- wrapper: remove dependency to Git-specific internal file
3:  b37beb206a < -:  ---------- config: correct bad boolean env value error message
4:  3a827cf45c < -:  ---------- parse: create new library for parsing strings and env values
5:  f8e4ac50a0 < -:  ---------- git-std-lib: introduce git standard library
6:  7840e1830a < -:  ---------- git-std-lib: add test file to call git-std-lib.a functions
-:  ---------- > 1:  57b751a497 pager: include stdint.h because uintmax_t is used
-:  ---------- > 2:  e64f3c73c2 git-std-lib: introduce Git Standard Library
-:  ---------- > 3:  e2d930f729 test-stdlib: show that git-std-lib is independent
Signature · 1 line
2.44.0.rc0.258.g7320e95886-goog