Thread (1 message) 1 message, 1 author, 2025-08-01

Re: [GSoC PATCH v7 5/5] repo: add the --format flag

From: Junio C Hamano <hidden>
Date: 2025-08-01 19:25:59

Lucas Seiki Oshiro [off-list ref] writes:
Add the --format flag to git-repo-info. By using this flag, the users
can choose the format for obtaining the data they requested.

Given that this command can be used for generating input for other
applications and for being read by end users, it requires at least two
formats: one for being read by humans and other for being read by
machines. Some other Git commands also have two output formats, notably
git-config which was the inspiration for the two formats that were
chosen here:

- keyvalue, where the retrieved data is printed one per line, using =
  for delimiting the key and the value. This is the default format,
  targeted for end users.
- nul, where the retrieved data is separated by null characters, using
  the newline character for delimiting the key and the value. This
  format is targeted for being read by machines.

Helped-by: Phillip Wood [off-list ref]
Helped-by: Junio C Hamano [off-list ref]
Helped-by: Justin Tobler [off-list ref]
Helped-by: Eric Sunshine [off-list ref]
Mentored-by: Karthik Nayak [off-list ref]
Mentored-by: Patrick Steinhardt [off-list ref]
Signed-off-by: Lucas Seiki Oshiro <redacted>
---
 Documentation/git-repo.adoc | 31 +++++++++++++++++++-
 builtin/repo.c              | 58 +++++++++++++++++++++++++++++++------
 t/t1900-repo.sh             | 21 ++++++++++++--
 3 files changed, 97 insertions(+), 13 deletions(-)
This will break t0450, won't it?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help