From: Lucas Seiki Oshiro <lucasseikioshiro@gmail•com>
To: git@vger•kernel.org
Cc: ps@pks•im, karthik.188@gmail•com, gitster@pobox•com,
Lucas Seiki Oshiro <lucasseikioshiro@gmail•com>
Subject: [GSoC PATCH v2 0/2] repo: add -z and objects.format
Date: Tue, 26 Aug 2025 15:32:03 -0300 [thread overview]
Message-ID: <20250826183205.19566-1-lucasseikioshiro@gmail.com> (raw)
In-Reply-To: <20250820144247.79197-1-lucasseikioshiro@gmail.com>
Hi!
This v2 contains small fixes pointed in the last version:
1. Adding two extra spaces in the usage string
2. Use `object.format` instead of `objects.format`
Here's the range-diff versus v1:
1: 4cb193f59c ! 1: 3ea40b1572 repo: add the flag -z as an alias for --format=nul
@@ Documentation/git-repo.adoc: git-repo - Retrieve information about the repositor
--------
[synopsis]
-git repo info [--format=(keyvalue|nul)] [<key>...]
-+git repo info [--format=(keyvalue|nul)|-z] [<key>...]
++git repo info [--format=(keyvalue|nul) | -z] [<key>...]
DESCRIPTION
-----------
@@ Documentation/git-repo.adoc: THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHAN
COMMANDS
--------
-`info [--format=(keyvalue|nul)] [<key>...]`::
-+`info [--format=(keyvalue|nul)|-z] [<key>...]`::
++`info [--format=(keyvalue|nul) | -z] [<key>...]`::
Retrieve metadata-related information about the current repository. Only
the requested data will be returned based on their keys (see "INFO KEYS"
section below).
@@ builtin/repo.c
static const char *const repo_usage[] = {
- "git repo info [--format=(keyvalue|nul)] [<key>...]",
-+ "git repo info [--format=(keyvalue|nul)|-z] [<key>...]",
++ "git repo info [--format=(keyvalue|nul) | -z] [<key>...]",
NULL
};
2: 37087dcc17 ! 2: 1d062e690e repo: add the field objects.format
@@ Documentation/git-repo.adoc: values that they return:
`layout.shallow`::
`true` if this is a shallow repository, otherwise `false`.
-+`objects.format`::
++`object.format`::
+ The object format (hash algorithm) used in the repository.
+
`references.format`::
@@ builtin/repo.c: static int get_layout_shallow(struct repository *repo, struct st
return 0;
}
-+static int get_objects_format(struct repository *repo, struct strbuf *buf)
++static int get_object_format(struct repository *repo, struct strbuf *buf)
+{
+ strbuf_addstr(buf, repo->hash_algo->name);
+ return 0;
@@ builtin/repo.c: static int get_references_format(struct repository *repo, struct
static const struct field repo_info_fields[] = {
{ "layout.bare", get_layout_bare },
{ "layout.shallow", get_layout_shallow },
-+ { "objects.format", get_objects_format},
++ { "object.format", get_object_format },
{ "references.format", get_references_format },
};
@@ t/t1900-repo.sh: test_expect_success 'setup remote' '
test_repo_info 'shallow repository = true is retrieved correctly' \
'git clone --depth 1 "file://$PWD/remote"' 'shallow' 'layout.shallow' 'true'
-+test_repo_info 'objects.format = sha1 is retrieved correctly' \
-+ 'git init --object-format=sha1' 'sha1' 'objects.format' 'sha1'
++test_repo_info 'object.format = sha1 is retrieved correctly' \
++ 'git init --object-format=sha1' 'sha1' 'object.format' 'sha1'
+
-+test_repo_info 'objects.format = sha256 is retrieved correctly' \
-+ 'git init --object-format=sha256' 'sha256' 'objects.format' 'sha256'
++test_repo_info 'object.format = sha256 is retrieved correctly' \
++ 'git init --object-format=sha256' 'sha256' 'object.format' 'sha256'
+
test_expect_success 'values returned in order requested' '
cat >expect <<-\EOF &&
Lucas Seiki Oshiro (2):
repo: add the flag -z as an alias for --format=nul
repo: add the field objects.format
Documentation/git-repo.adoc | 9 +++++++--
builtin/repo.c | 24 +++++++++++++++++++-----
t/t1900-repo.sh | 18 ++++++++++++++++++
3 files changed, 44 insertions(+), 7 deletions(-)
--
2.39.5 (Apple Git-154)
next prev parent reply other threads:[~2025-08-26 18:32 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 14:42 [GSoC PATCH 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-08-20 14:42 ` [GSoC PATCH 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-08-21 10:12 ` Karthik Nayak
2025-08-21 16:09 ` Junio C Hamano
2025-08-21 16:52 ` Karthik Nayak
2025-08-21 10:29 ` Patrick Steinhardt
2025-08-21 13:29 ` Lucas Seiki Oshiro
2025-08-21 17:28 ` Junio C Hamano
2025-08-21 20:57 ` Lucas Seiki Oshiro
2025-08-21 21:50 ` Junio C Hamano
2025-08-21 18:23 ` Jean-Noël AVILA
2025-08-21 19:52 ` Junio C Hamano
2025-08-20 14:42 ` [GSoC PATCH 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-08-21 10:29 ` Patrick Steinhardt
2025-08-21 19:44 ` Junio C Hamano
2025-08-26 14:51 ` Lucas Seiki Oshiro
2025-08-21 10:14 ` [GSoC PATCH 0/2] repo: add -z and objects.format Karthik Nayak
2025-08-21 16:12 ` Junio C Hamano
2025-08-21 10:29 ` Patrick Steinhardt
2025-08-21 13:23 ` Lucas Seiki Oshiro
2025-08-21 14:55 ` Patrick Steinhardt
2025-08-21 17:28 ` Junio C Hamano
2025-08-26 18:13 ` Lucas Seiki Oshiro
2025-08-26 18:32 ` Lucas Seiki Oshiro [this message]
2025-08-26 18:32 ` [GSoC PATCH v2 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-08-28 23:08 ` Junio C Hamano
2025-09-01 13:50 ` Lucas Seiki Oshiro
2025-08-26 18:32 ` [GSoC PATCH v2 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-01 17:27 ` [GSoC PATCH v3 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-09-01 17:27 ` [GSoC PATCH v3 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-09-02 16:21 ` Junio C Hamano
2025-09-02 21:51 ` Lucas Seiki Oshiro
2025-09-01 17:27 ` [GSoC PATCH v3 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-04 13:40 ` [GSoC PATCH v4 0/2] repo: add -z and objects.format Lucas Seiki Oshiro
2025-09-04 13:40 ` [GSoC PATCH v4 1/2] repo: add the flag -z as an alias for --format=nul Lucas Seiki Oshiro
2025-09-04 13:40 ` [GSoC PATCH v4 2/2] repo: add the field objects.format Lucas Seiki Oshiro
2025-09-04 18:40 ` [GSoC PATCH v4 0/2] repo: add -z and objects.format Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250826183205.19566-1-lucasseikioshiro@gmail.com \
--to=lucasseikioshiro@gmail$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=karthik.188@gmail$(echo .)com \
--cc=ps@pks$(echo .)im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox