Git development
 help / color / mirror / Atom feed
* Re: [PATCH v2 1/1] config: learn the "hostname:" includeIf condition
From: Junio C Hamano @ 2024-03-10 16:59 UTC (permalink / raw)
  To: Ignacio Encinas; +Cc: git
In-Reply-To: <20240309181828.45496-2-ignacio@iencinas.com>

Ignacio Encinas <ignacio@iencinas.com> writes:

> +test_expect_success 'conditional include, hostname' '
> +	cat >>.git/config <<-EOF &&
> +	[includeIf "hostname:$(hostname)a"]

This unconditionally runs the $(hostname) command assuming it exists
everywhere, but

    $ git grep '$(hostname' t/
    t/t6500-gc.sh:	hostname=$(hostname || echo unknown) &&

tells us that we should be prepared to meet a platform where such a
command does not exist.

I have a feeling that it is better done with a test prerequisite
than hardcoded "unknown", as xgethostname() at C level may come up
with some random string but it is not guaranteed to be "unknown".

Perhaps have one instance of this before these added tests

	test_lazy_prereq WORKING_HOSTNAME '
		hostname >/dev/null 2>&1
	'

and then start them with

	test_expect_success WORKING_HOSTNAME 'hostname: includeIf' '
		...
	'

or something?  Others may think of a better way to make sure this
test does not cause false failures on platforms only because they
lack working hostname(1) but have a working gethostname(2) and their
xgethostname() may be working fine.

Thanks.



^ permalink raw reply

* Re: unintelligible error fatal: empty ident name (for <>) not allowed
From: Michal Suchánek @ 2024-03-10 16:42 UTC (permalink / raw)
  To: Torsten Bögershausen; +Cc: git
In-Reply-To: <20240310160338.GA7953@tb-raspi4>

[-- Attachment #1: Type: text/plain, Size: 880 bytes --]

On Sun, Mar 10, 2024 at 05:03:38PM +0100, Torsten Bögershausen wrote:
> On Sun, Mar 10, 2024 at 04:15:33PM +0100, Michal Suchánek wrote:
> > git version 2.44.0
> >
> > git am -3
> > ../linux-6.8~rc1/debian/patches/rk3588/dw-hdmi-rockchip-avoid-tmds-spam.patch
> > Applying: dw-hdmi-rockchip: avoid spamming 'use tmds mode' in dmesg
> > fatal: empty ident name (for <>) not allowed
> >
> >
> > What's wrong with that patch, specifically?
> >
> > Can you tell?
> 
> The message seems to come from ident.c
> 
> Is there any chance to get a copy of that very file ?

Sure, I can get a file that reproduces the problem.

> Or more details ?

I would like to know more details as well.

When gcc gives an error it tells me exactly on what line and what
character the error is, giving the errorneous text in question.

Here I have absolutely no idea what the problem is.

Thanks

Michal

[-- Attachment #2: dw-hdmi-rockchip-avoid-tmds-spam.patch --]
[-- Type: text/x-patch, Size: 802 bytes --]

From f3b68d2a91d3f443a8b86173c9cac01897075b84
Author: Lukas F. Hartmann <lukas@mntre.com>
Date:   Tue Mar 5 21:07:08 2024 +0100
Subject: dw-hdmi-rockchip: avoid spamming 'use tmds mode' in dmesg

diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
index dd154855a38a..b10a70870a10 100644
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
@@ -737,7 +737,7 @@ static void hdmi_select_link_config(struct rockchip_hdmi *hdmi,
 	hdmi->link_cfg.rate_per_lane = max_rate_per_lane;
 
 	if (!max_frl_rate || (tmdsclk < HDMI20_MAX_RATE && mode.clock < HDMI20_MAX_RATE)) {
-		dev_info(hdmi->dev, "use tmds mode\n");
+		//dev_info(hdmi->dev, "use tmds mode\n");
 		hdmi->link_cfg.frl_mode = false;
 		return;
 	}

^ permalink raw reply related

* [GSoC][PATCH 1/1] add zero count optimization in ewah_bitmap.c
From: Aryan Gupta @ 2024-03-10 16:26 UTC (permalink / raw)
  To: git; +Cc: Aryan Gupta
In-Reply-To: <20240310162614.62691-1-garyan447@gmail.com>

Signed-off-by: Aryan Gupta <garyan447@gmail.com>
---
 ewah/ewah_bitmap.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/ewah/ewah_bitmap.c b/ewah/ewah_bitmap.c
index 8785cbc54a..9056829572 100644
--- a/ewah/ewah_bitmap.c
+++ b/ewah/ewah_bitmap.c
@@ -257,10 +257,11 @@ void ewah_each_bit(struct ewah_bitmap *self, void (*callback)(size_t, void*), vo
 		for (k = 0; k < rlw_get_literal_words(word); ++k) {
 			int c;
 
-			/* todo: zero count optimization */
-			for (c = 0; c < BITS_IN_EWORD; ++c, ++pos) {
-				if ((self->buffer[pointer] & ((eword_t)1 << c)) != 0)
-					callback(pos, payload);
+			if(self->buffer[pointer]) {
+				for (c = 0; c < BITS_IN_EWORD; ++c, ++pos) {
+					if (((eword_t)1 << c) != 0)
+						callback(pos, payload);
+				}
 			}
 
 			++pointer;
-- 
2.25.1


^ permalink raw reply related

* [GSoC][PATCH 0/1] add zero count optimization in ewah_bitmap.c
From: Aryan Gupta @ 2024-03-10 16:26 UTC (permalink / raw)
  To: git; +Cc: Aryan Gupta

Hey everyone

I hope you are doing great. I came across a "todo" in the code base 
which was based on zero count optimization. I tried to fix do it but
I am not sure if this was the required this or not. I would love your 
guidance on this. 

Thank you. Have a nice day!

Regards
Aryan Gupta


Aryan Gupta (1):
  add zero count optimization in ewah_bitmap.c

 ewah/ewah_bitmap.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

-- 
2.25.1


^ permalink raw reply

* Re: unintelligible error fatal: empty ident name (for <>) not allowed
From: Torsten Bögershausen @ 2024-03-10 16:03 UTC (permalink / raw)
  To: Michal Suchánek; +Cc: git
In-Reply-To: <20240310151533.GF23839@kitsune.suse.cz>

On Sun, Mar 10, 2024 at 04:15:33PM +0100, Michal Suchánek wrote:
> git version 2.44.0
>
> git am -3
> ../linux-6.8~rc1/debian/patches/rk3588/dw-hdmi-rockchip-avoid-tmds-spam.patch
> Applying: dw-hdmi-rockchip: avoid spamming 'use tmds mode' in dmesg
> fatal: empty ident name (for <>) not allowed
>
>
> What's wrong with that patch, specifically?
>
> Can you tell?

The message seems to come from ident.c

Is there any chance to get a copy of that very file ?

Or more details ?


^ permalink raw reply

* unintelligible error fatal: empty ident name (for <>) not allowed
From: Michal Suchánek @ 2024-03-10 15:15 UTC (permalink / raw)
  To: git

git version 2.44.0

git am -3
../linux-6.8~rc1/debian/patches/rk3588/dw-hdmi-rockchip-avoid-tmds-spam.patch
Applying: dw-hdmi-rockchip: avoid spamming 'use tmds mode' in dmesg
fatal: empty ident name (for <>) not allowed


What's wrong with that patch, specifically?

Can you tell?

I cannot, at all.

Already applied 70 other patches so it's not git configuration.

Thanks

Michal

^ permalink raw reply

* [Outreachy][PATCH] Port helper/test-strcmp-offset.c to unit-tests/t-strcmp-offset.c
From: Achu Luma @ 2024-03-10 14:48 UTC (permalink / raw)
  To: git; +Cc: christian.couder, Achu Luma, Christian Couder

In the recent codebase update (8bf6fbd (Merge branch
'js/doc-unit-tests', 2023-12-09)), a new unit testing framework was
merged, providing a standardized approach for testing C code. Prior to
this update, some unit tests relied on the test helper mechanism,
lacking a dedicated unit testing framework. It's more natural to perform
these unit tests using the new unit test framework.

Let's migrate the unit tests for strcmp-offset functionality from the
legacy approach using the test-tool command `test-tool strcmp-offset` in
helper/test-strcmp-offset.c to the new unit testing framework
(t/unit-tests/test-lib.h).

The migration involves refactoring the tests to utilize the testing
macros provided by the framework (TEST() and check_*()).

Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Achu Luma <ach.lumap@gmail.com>
---
 Makefile                       |  2 +-
 t/helper/test-strcmp-offset.c  | 23 -----------------------
 t/helper/test-tool.c           |  1 -
 t/helper/test-tool.h           |  1 -
 t/t0065-strcmp-offset.sh       | 22 ----------------------
 t/unit-tests/t-strcmp-offset.c | 31 +++++++++++++++++++++++++++++++
 6 files changed, 32 insertions(+), 48 deletions(-)
 delete mode 100644 t/helper/test-strcmp-offset.c
 delete mode 100755 t/t0065-strcmp-offset.sh
 create mode 100644 t/unit-tests/t-strcmp-offset.c

diff --git a/Makefile b/Makefile
index 4e255c81f2..b8d7019ad7 100644
--- a/Makefile
+++ b/Makefile
@@ -850,7 +850,6 @@ TEST_BUILTINS_OBJS += test-sha1.o
 TEST_BUILTINS_OBJS += test-sha256.o
 TEST_BUILTINS_OBJS += test-sigchain.o
 TEST_BUILTINS_OBJS += test-simple-ipc.o
-TEST_BUILTINS_OBJS += test-strcmp-offset.o
 TEST_BUILTINS_OBJS += test-string-list.o
 TEST_BUILTINS_OBJS += test-submodule-config.o
 TEST_BUILTINS_OBJS += test-submodule-nested-repo-config.o
@@ -1347,6 +1346,7 @@ UNIT_TEST_PROGRAMS += t-mem-pool
 UNIT_TEST_PROGRAMS += t-strbuf
 UNIT_TEST_PROGRAMS += t-ctype
 UNIT_TEST_PROGRAMS += t-prio-queue
+UNIT_TEST_PROGRAMS += t-strcmp-offset
 UNIT_TEST_PROGS = $(patsubst %,$(UNIT_TEST_BIN)/%$X,$(UNIT_TEST_PROGRAMS))
 UNIT_TEST_OBJS = $(patsubst %,$(UNIT_TEST_DIR)/%.o,$(UNIT_TEST_PROGRAMS))
 UNIT_TEST_OBJS += $(UNIT_TEST_DIR)/test-lib.o
diff --git a/t/helper/test-strcmp-offset.c b/t/helper/test-strcmp-offset.c
deleted file mode 100644
index d8473cf2fc..0000000000
--- a/t/helper/test-strcmp-offset.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include "test-tool.h"
-#include "read-cache-ll.h"
-
-int cmd__strcmp_offset(int argc UNUSED, const char **argv)
-{
-	int result;
-	size_t offset;
-
-	if (!argv[1] || !argv[2])
-		die("usage: %s <string1> <string2>", argv[0]);
-
-	result = strcmp_offset(argv[1], argv[2], &offset);
-
-	/*
-	 * Because different CRTs behave differently, only rely on signs
-	 * of the result values.
-	 */
-	result = (result < 0 ? -1 :
-			  result > 0 ? 1 :
-			  0);
-	printf("%d %"PRIuMAX"\n", result, (uintmax_t)offset);
-	return 0;
-}
diff --git a/t/helper/test-tool.c b/t/helper/test-tool.c
index 482a1e58a4..3d56de82fd 100644
--- a/t/helper/test-tool.c
+++ b/t/helper/test-tool.c
@@ -76,7 +76,6 @@ static struct test_cmd cmds[] = {
 	{ "sha256", cmd__sha256 },
 	{ "sigchain", cmd__sigchain },
 	{ "simple-ipc", cmd__simple_ipc },
-	{ "strcmp-offset", cmd__strcmp_offset },
 	{ "string-list", cmd__string_list },
 	{ "submodule", cmd__submodule },
 	{ "submodule-config", cmd__submodule_config },
diff --git a/t/helper/test-tool.h b/t/helper/test-tool.h
index b1be7cfcf5..8d76a8c1e1 100644
--- a/t/helper/test-tool.h
+++ b/t/helper/test-tool.h
@@ -69,7 +69,6 @@ int cmd__oid_array(int argc, const char **argv);
 int cmd__sha256(int argc, const char **argv);
 int cmd__sigchain(int argc, const char **argv);
 int cmd__simple_ipc(int argc, const char **argv);
-int cmd__strcmp_offset(int argc, const char **argv);
 int cmd__string_list(int argc, const char **argv);
 int cmd__submodule(int argc, const char **argv);
 int cmd__submodule_config(int argc, const char **argv);
diff --git a/t/t0065-strcmp-offset.sh b/t/t0065-strcmp-offset.sh
deleted file mode 100755
index 94e34c83ed..0000000000
--- a/t/t0065-strcmp-offset.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-test_description='Test strcmp_offset functionality'
-
-TEST_PASSES_SANITIZE_LEAK=true
-. ./test-lib.sh
-
-while read s1 s2 expect
-do
-	test_expect_success "strcmp_offset($s1, $s2)" '
-		echo "$expect" >expect &&
-		test-tool strcmp-offset "$s1" "$s2" >actual &&
-		test_cmp expect actual
-	'
-done <<-EOF
-abc abc 0 3
-abc def -1 0
-abc abz -1 2
-abc abcdef -1 3
-EOF
-
-test_done
diff --git a/t/unit-tests/t-strcmp-offset.c b/t/unit-tests/t-strcmp-offset.c
new file mode 100644
index 0000000000..176d2ed04a
--- /dev/null
+++ b/t/unit-tests/t-strcmp-offset.c
@@ -0,0 +1,31 @@
+#include "test-lib.h"
+#include "read-cache-ll.h"
+
+static void check_strcmp_offset(const char *string1, const char *string2, int expect_result,  uintmax_t expect_offset)
+{
+	int result;
+	size_t offset;
+
+	result = strcmp_offset(string1, string2, &offset);
+
+	/* Because different CRTs behave differently, only rely on signs of the result values. */
+	result = (result < 0 ? -1 :
+			  result > 0 ? 1 :
+			  0);
+
+	check_int(result, ==, expect_result);
+	check_uint((uintmax_t)offset, ==, expect_offset);
+}
+
+#define TEST_STRCMP_OFFSET(string1, string2, expect_result, expect_offset) \
+		TEST(check_strcmp_offset(string1, string2, expect_result, expect_offset), \
+			"strcmp_offset(%s, %s) works", #string1, #string2)
+
+int cmd_main(int argc, const char **argv) {
+	TEST_STRCMP_OFFSET("abc", "abc", 0, 3);
+	TEST_STRCMP_OFFSET("abc", "def", -1, 0);
+	TEST_STRCMP_OFFSET("abc", "abz", -1, 2);
+	TEST_STRCMP_OFFSET("abc", "abcdef", -1, 3);
+
+	return test_done();
+}
--
2.43.0.windows.1


^ permalink raw reply related

* "git maintenance start" adds entry to the main config file, not to already existing maintenance section in included file
From: Jan Katins @ 2024-03-10 13:12 UTC (permalink / raw)
  To: git

Hello!

What did you do before the bug happened? (Steps to reproduce your issue)

I've a git config (in ~/.config/git/config) which reads:

```ini
...
[include]
    path = git_config_local_maintenance
....
```

In ~/.config/git/git_config_local_maintenance I have:

```ini
[maintenance]
    repo =/User/jankatins/projects/whatever
```

ran `git maintenance start` in a new repo.

What did you expect to happen? (Expected behavior)

That the new repo gets appended in
~/.config/git/git_config_local_maintenance to the already existing
maintenance section.

What happened instead? (Actual behavior)

An additional maintenance section was added in the main config file
with the repo key added there.

What's different between what you expected and what actually happened?

The additional maintenance section in the main config file instead of
appending the repo in the already existing section in the included
file.

This is "undesired", as I have my main git config file in a dotfile
manager, but don't want to have the (much more frequently changing and
laptop specific) maintenance entries in the dotfile repo.

```
[System Info]
git version: git version 2.44.0
cpu: x86_64
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
feature: fsmonitor--daemon
uname: Darwin 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:31
PST 2024; root:xnu-10063.101.15~2/RELEASE_X86_64 x86_64
compiler info: clang: 15.0.0 (clang-1500.1.0.2.5)
libc info: no libc information available
$SHELL (typically, interactive shell): /usr/local/bin/zsh
```

Kind regards

Jan
--
jasc@gmx.net

^ permalink raw reply

* Re: [PATCH v2 4/4] t-ctype: avoid duplicating class names
From: René Scharfe @ 2024-03-10 12:48 UTC (permalink / raw)
  To: phillip.wood, git; +Cc: Josh Steadmon, Achu Luma, Christian Couder
In-Reply-To: <4f41f509-1d44-4476-92b0-9bb643f64576@gmail.com>

Hi Phillip,

Am 09.03.24 um 12:28 schrieb Phillip Wood:
> On reflection I don't think I'm objecting to allowing statements,
> only the use of the private functions to do so. If we tweak
> test__run_begin() and test__run_end() so that the description is
> passed to test__run_begin() and we invert the return value of that
> function to match what test__run_end() is expecting then we can have
>
> #define TEST_BEGIN(...)                        \
>     do {                            \
>         int run__ = test__run_begin(__VA_ARGS__);    \
>         if (run__)
>
> #define TEST_END                \
>         test_run_end(run__);        \
>     } while (0)
>
> Which allow test authors to write
>
>     TEST_BEGIN("my test") {
>         /* test body here */
>     } TEST_END;
>
> The macros insulate the test code from having to worry about
> test_skip_all() and the "do { ... } while (0)" means that the
> compiler will complain if the author forgets TEST_END.

the location information is missing, but I get the idea.  That would
certainly work for t-ctype.

> I'm slightly on the fence about including the braces in the macros
> instead as that would make them harder to misuse but it would be less
> obvious that the test body is run in its own block. The compiler will
> allow the test author to accidentally nest two calls to TEST_BEGIN()
> but there is an assertion in test__run_begin() which will catch that
> at run time.

Thought about that as well, and I'd also be wary of including any of the
control statements.  Custom syntax requires learning, can have weird
side-effects and may be misunderstood by editors.

Below is a patch that adds the function test_start() and its companion
macro TEST_START, which allow defining tests with minimal ceremony,
similarly as in the shell-based test suite:

	#include "test-lib.h"

	int cmd_main(int argc, const char **argv)
	{
		if (TEST_START("something works"))
			check(something());
		if (TEST_START("something else works"))
			check(something_else());
		return test_done();
	}

It requires storing string copies and sits between the states of the
original test machinery, so it's a bit complicated.

The biggest downside so far, though, is that I couldn't find an example
in the other unit tests that it would simplify significantly.  At least
it would allow getting rid of the void pointers in t-strbuf, however.

> The slight downside compared to TEST() is that it is harder to return
> early if a check fails - we'd need something like
>
>     TEST_BEGIN("my test") {
>         if (!check(0))
>             goto fail
>         /* more checks */
>      fail:
>         ;
>     } TEST_END;

TEST is worse in this regard, as it doesn't allow "if" directly at all.
You can use short-circuiting, of course:

	TEST(check(!!ptr) && check(*ptr == value), "ptr points to value");

But you can do that with TEST_BEGIN as well.  In a function you can
return early, but you can use functions with both, too.

In your example you can use "continue" instead of "goto fail".  And with
"break" you can skip the test_run_end() call.  I consider both to be
downsides, though -- the abstraction is leaky.

> Also unlike TEST(), TEST_END does not indicate to the caller whether
> the test failed or not but I'm not sure that matters in practice.

Most TEST invocations out of t-basic ignore its return value so far.

ctx.result is left unchanged by test__run_end(), so we could still
access it if really needed.  Perhaps through a sanctioned function,
last_test_result() or similar.

René



diff --git a/t/unit-tests/t-ctype.c b/t/unit-tests/t-ctype.c
index d6ac1fe678..e7c846814e 100644
--- a/t/unit-tests/t-ctype.c
+++ b/t/unit-tests/t-ctype.c
@@ -4,15 +4,13 @@
 	size_t len = ARRAY_SIZE(string) - 1 + \
 		BUILD_ASSERT_OR_ZERO(ARRAY_SIZE(string) > 0) + \
 		BUILD_ASSERT_OR_ZERO(sizeof(string[0]) == sizeof(char)); \
-	int skip = test__run_begin(); \
-	if (!skip) { \
+	if (TEST_START(#class " works")) { \
 		for (int i = 0; i < 256; i++) { \
 			if (!check_int(class(i), ==, !!memchr(string, i, len)))\
 				test_msg("      i: 0x%02x", i); \
 		} \
 		check(!class(EOF)); \
 	} \
-	test__run_end(!skip, TEST_LOCATION(), #class " works"); \
 } while (0)

 #define DIGIT "0123456789"
diff --git a/t/unit-tests/test-lib.c b/t/unit-tests/test-lib.c
index 66d6980ffb..bc484c92da 100644
--- a/t/unit-tests/test-lib.c
+++ b/t/unit-tests/test-lib.c
@@ -16,6 +16,8 @@ static struct {
 	unsigned running :1;
 	unsigned skip_all :1;
 	unsigned todo :1;
+	char *desc;
+	char *location;
 } ctx = {
 	.lazy_plan = 1,
 	.result = RESULT_NONE,
@@ -123,9 +125,45 @@ void test_plan(int count)
 	ctx.lazy_plan = 0;
 }

+static void test_run_maybe_end(void)
+{
+	if (ctx.running) {
+		assert(ctx.location);
+		assert(ctx.desc);
+		test__run_end(0, ctx.location, "%s", ctx.desc);
+		FREE_AND_NULL(ctx.location);
+		FREE_AND_NULL(ctx.desc);
+	}
+	assert(!ctx.running);
+	assert(!ctx.location);
+	assert(!ctx.desc);
+}
+
+int test_start(const char *location, const char *format, ...)
+{
+	va_list ap;
+	char *desc;
+
+	test_run_maybe_end();
+
+	va_start(ap, format);
+	desc = xstrvfmt(format, ap);
+	va_end(ap);
+
+	if (test__run_begin()) {
+		test__run_end(1, location, "%s", desc);
+		free(desc);
+		return 0;
+	} else {
+		ctx.location = xstrdup(location);
+		ctx.desc = desc;
+		return 1;
+	}
+}
+
 int test_done(void)
 {
-	assert(!ctx.running);
+	test_run_maybe_end();

 	if (ctx.lazy_plan)
 		test_plan(ctx.count);
diff --git a/t/unit-tests/test-lib.h b/t/unit-tests/test-lib.h
index a8f07ae0b7..2be95b3ab8 100644
--- a/t/unit-tests/test-lib.h
+++ b/t/unit-tests/test-lib.h
@@ -21,6 +21,15 @@
  */
 void test_plan(int count);

+/*
+ * Start a test.  It ends when the next test starts or test_done()
+ * is called.  Returns 1 if the test was actually started, 0 if it was
+ * skipped because test_skip_all() had been called.
+ */
+int test_start(const char *location, const char *format, ...);
+
+#define TEST_START(...) test_start(TEST_LOCATION(), __VA_ARGS__)
+
 /*
  * test_done() must be called at the end of main(). It will print the
  * plan if plan() was not called at the beginning of the test program

^ permalink raw reply related

* Products Enquiry
From: Piaskowiec Handel-AB Group @ 2024-03-10 12:16 UTC (permalink / raw)
  To: git

Hello,



We would like to purchase your product. Are you still exporting?



Best Regards,

Piaskowiec Handel / AB Group
Import / Export Operations
AB GROUP

^ permalink raw reply

* [GSOC][PATCH v4 1/1] t7301: use test_path_is_(missing|file)
From: Vincenzo Mezzela @ 2024-03-10 11:43 UTC (permalink / raw)
  To: gitster; +Cc: git, Vincenzo Mezzela
In-Reply-To: <20240310114311.598681-1-vincenzo.mezzela@gmail.com>

Replace use of 'test -f' with 'test_path_is_file' helper functions from
test-lib-functions.sh. These functions perform identical operations
while enhancing debugging capabilities in case of test failures.

In the context of this file, 'test ! -f' is meant to check if the file
has been correctly cleaned, so it should be 'test ! -e'.
Thus its usage is replaced with 'test_path_is_missing' instead of 
'! test_path_is_file'.

Signed-off-by: Vincenzo Mezzela <vincenzo.mezzela@gmail.com>
---
 t/t7301-clean-interactive.sh | 490 +++++++++++++++++------------------
 1 file changed, 245 insertions(+), 245 deletions(-)

diff --git a/t/t7301-clean-interactive.sh b/t/t7301-clean-interactive.sh
index d82a3210a1..4afe53c66a 100755
--- a/t/t7301-clean-interactive.sh
+++ b/t/t7301-clean-interactive.sh
@@ -25,18 +25,18 @@ test_expect_success 'git clean -i (c: clean hotkey)' '
 	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
 	docs/manual.txt obj.o build/lib.so &&
 	echo c | git clean -i &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test ! -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_missing src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -46,18 +46,18 @@ test_expect_success 'git clean -i (cl: clean prefix)' '
 	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
 	docs/manual.txt obj.o build/lib.so &&
 	echo cl | git clean -i &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test ! -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_missing src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -67,18 +67,18 @@ test_expect_success 'git clean -i (quit)' '
 	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
 	docs/manual.txt obj.o build/lib.so &&
 	echo quit | git clean -i &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -88,18 +88,18 @@ test_expect_success 'git clean -i (Ctrl+D)' '
 	touch a.out src/part3.c src/part3.h src/part4.c src/part4.h \
 	docs/manual.txt obj.o build/lib.so &&
 	echo "\04" | git clean -i &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -110,18 +110,18 @@ test_expect_success 'git clean -id (filter all)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines f "*" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -132,18 +132,18 @@ test_expect_success 'git clean -id (filter patterns)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines f "part3.* *.out" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test ! -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test ! -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_missing src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -154,18 +154,18 @@ test_expect_success 'git clean -id (filter patterns 2)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines f "* !*.out" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -176,18 +176,18 @@ test_expect_success 'git clean -id (select - all)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "*" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test ! -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test ! -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_missing src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -198,18 +198,18 @@ test_expect_success 'git clean -id (select - none)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -220,18 +220,18 @@ test_expect_success 'git clean -id (select - number)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s 3 "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -242,18 +242,18 @@ test_expect_success 'git clean -id (select - number 2)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "2 3" 5 "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test ! -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -264,18 +264,18 @@ test_expect_success 'git clean -id (select - number 3)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "3,4 5" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -285,11 +285,11 @@ test_expect_success 'git clean -id (select - filenames)' '
 	touch a.out foo.txt bar.txt baz.txt &&
 	test_write_lines s "a.out fo ba bar" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test ! -f a.out &&
-	test ! -f foo.txt &&
-	test ! -f bar.txt &&
-	test -f baz.txt &&
+	test_path_is_file Makefile &&
+	test_path_is_missing a.out &&
+	test_path_is_missing foo.txt &&
+	test_path_is_missing bar.txt &&
+	test_path_is_file baz.txt &&
 	rm baz.txt
 
 '
@@ -301,18 +301,18 @@ test_expect_success 'git clean -id (select - range)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "1,3-4" 2 "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test ! -f docs/manual.txt &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -323,18 +323,18 @@ test_expect_success 'git clean -id (select - range 2)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "4- 1" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test ! -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_missing src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -345,18 +345,18 @@ test_expect_success 'git clean -id (inverse select)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines s "*" "-5- 1 -2" "" c |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -367,18 +367,18 @@ test_expect_success 'git clean -id (ask)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines a Y y no yes bad "" |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test ! -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -389,18 +389,18 @@ test_expect_success 'git clean -id (ask - Ctrl+D)' '
 	docs/manual.txt obj.o build/lib.so &&
 	test_write_lines a Y no yes "\04" |
 	git clean -id &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -412,18 +412,18 @@ test_expect_success 'git clean -id with prefix and path (filter)' '
 	(cd build/ &&
 	 test_write_lines f docs "*.h" "" c |
 	 git clean -id ..) &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_file docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -435,18 +435,18 @@ test_expect_success 'git clean -id with prefix and path (select by name)' '
 	(cd build/ &&
 	 test_write_lines s ../docs/ ../src/part3.c ../src/part4.c "" c |
 	 git clean -id ..) &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test -f a.out &&
-	test ! -f docs/manual.txt &&
-	test ! -f src/part3.c &&
-	test -f src/part3.h &&
-	test ! -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_file a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_missing src/part3.c &&
+	test_path_is_file src/part3.h &&
+	test_path_is_missing src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
@@ -458,18 +458,18 @@ test_expect_success 'git clean -id with prefix and path (ask)' '
 	(cd build/ &&
 	 test_write_lines a Y y no yes bad "" |
 	 git clean -id ..) &&
-	test -f Makefile &&
-	test -f README &&
-	test -f src/part1.c &&
-	test -f src/part2.c &&
-	test ! -f a.out &&
-	test ! -f docs/manual.txt &&
-	test -f src/part3.c &&
-	test ! -f src/part3.h &&
-	test -f src/part4.c &&
-	test -f src/part4.h &&
-	test -f obj.o &&
-	test -f build/lib.so
+	test_path_is_file Makefile &&
+	test_path_is_file README &&
+	test_path_is_file src/part1.c &&
+	test_path_is_file src/part2.c &&
+	test_path_is_missing a.out &&
+	test_path_is_missing docs/manual.txt &&
+	test_path_is_file src/part3.c &&
+	test_path_is_missing src/part3.h &&
+	test_path_is_file src/part4.c &&
+	test_path_is_file src/part4.h &&
+	test_path_is_file obj.o &&
+	test_path_is_file build/lib.so
 
 '
 
-- 
2.34.1


^ permalink raw reply related

* [GSOC][PATCH v4 0/1] microproject: use test_path_is_* functions in test scripts
From: Vincenzo Mezzela @ 2024-03-10 11:43 UTC (permalink / raw)
  To: gitster; +Cc: git, Vincenzo Mezzela
In-Reply-To: <20240304171732.64457-1-vincenzo.mezzela@gmail.com>

Hi,
Following previous discussions[1][2][3][4], this patch is submitted as a microproject
for the application to the GSOC.

Thanks,
Vincenzo

Changes in V2:
* Fixed commit message[2].
Changes in V3:
* Fixed commit message[3].
Changes in V4:
* Fixed commit message[4].

[1] https://lore.kernel.org/git/xmqqy1bo5k5h.fsf@gitster.g/
[2] https://lore.kernel.org/git/20240219172214.7644-1-vincenzo.mezzela@gmail.com/
[3] https://lore.kernel.org/git/ZeWVB5uKLONfp6cO@tanuki/
[4] https://lore.kernel.org/git/xmqqcys9oedq.fsf@gitster.g/

Vincenzo Mezzela (1):
  t7301: use test_path_is_(missing|file)

 t/t7301-clean-interactive.sh | 490 +++++++++++++++++------------------
 1 file changed, 245 insertions(+), 245 deletions(-)

-- 
2.34.1


^ permalink raw reply

* Re: Discuss GSoC: Implement consistency checks for refs
From: shejialuo @ 2024-03-10 10:01 UTC (permalink / raw)
  To: Patrick Steinhardt; +Cc: git

Thanks for you help. I'm sorry for the delay in resonding to your email
due to my internship.

> I know this is splitting hairs, but git-fsck(1) doesn't give us the
> tools to avoid corruption. It only gives us the tools to detect it after
> the fact.

I DO misundestood the `git-fsck(1)`.

This time, I have read more source codes about `git-fsck` and refs
internal. So I wanna discuss some implementation of the infrastructure
this time.

I am inspired by `refs-internal.h`, this file declares `ref_storage_be`,
and for every backend, it should implement the interfaces like
`ref_store_init_fn`, `ref_init_db_fn` and etc. And in `refs.h`, it
provides the interfaces to other modules.

Based above idea, I think we could just create files in `refs` directory
and we could implement a file called `ref-check.h`, we design the
interfaces for different backends.

After that, we could compose this structure into `ref_storage_be` and we
could call these interfaces in `fsck.c`. If there are some different
interfaces, we could downcast to a specified type to call the specified
functions. (Actually, I have learned a lot how OOP is implemented in C).

> For what it's worth, not all of the checks need to be implemented as
> part of GSoC. At a minimum, it should result in the infra to allow for
> backend-specific checks and a couple of checks for at least one of the
> backends.

I think using the above idea, we could provide an infrastructure to allow
more checks later.

> You will certainly need to learn about ref internals a bit. There are
> some common rules and restrictions that are important in order to figure
> out what we want to check in the first place. Understanding the
> "reftable" format would be great, but you may also get away with only
> implementing generic or "files"-backend specific consistency checks.
> This depends on the scope you are aiming for.

I think I will at least implement the generic part and files-backend
consistency check. I will then read some specs about the reftable and the
source code of it. If there is sufficient time available, I think I
could implement all of them. However, I am currently interning remotely,
the response may slow.

^ permalink raw reply

* Informative: git-options.txt v2
From: Dirk Gouders @ 2024-03-09 23:30 UTC (permalink / raw)
  To: git
In-Reply-To: <ghedcj11oe.fsf@gouders.net>

[-- Attachment #1: Type: text/plain, Size: 160 bytes --]

Sorry, somehow, I created two versions of that file.

I noticed that, because I didn't found --no-deref which was mentioned in
[1].  Now, it's included.

Dirk


[-- Attachment #2: git-options.txt v2 --]
[-- Type: text/plain, Size: 89519 bytes --]

<args>...
        git-rev-parse(1)

<archive>/<branch>
        git-archimport(1)

base-name
        git-pack-objects(1)

<base> <rev1> <rev2>
        git-range-diff(1)

<branch>
        git-checkout(1)
        git-rebase(1)
        git-switch(1)

<branchname>
        git-branch(1)

<command> [<args>]
        git(1)

<commit>, <object>
        git-tag(1)

<commit>...
        git-cherry-pick(1)
        git-merge(1)
        git-revert(1)
        git-verify-commit(1)

commit-id
        git-http-fetch(1)

<commit-ish>...
        git-describe(1)

<CVS-module>
        git-cvsimport(1)

<directory>
        git-clone(1)
        git-cvsserver(1)
        git-daemon(1)
        git-send-pack(1)
        git-upload-pack(1)

<end>
        git-request-pull(1)

<file>
        git-ls-files(1)
        git-update-index(1)

<git-dir>
        git-receive-pack(1)

[<git-rev-list-args>...]
        git-fast-export(1)

<git-rev-list-args>
        git-bundle(1)

<glob>
        git-show-branch(1)

<group>
        git-fetch(1)

<head>
        git-cherry(1)

<head>...
        git-prune(1)

<host>
        git-send-pack(1)

<limit>
        git-cherry(1)

<Maildir>
        git-mailsplit(1)

<mbox>
        git-mailsplit(1)

(<mbox>|<Maildir>)...
        git-am(1)

<msg>
        git-mailinfo(1)

<new-branch>
        git-checkout(1)
        git-switch(1)

<newbranch>
        git-branch(1)

<object>
        git-cat-file(1)
        git-fsck(1)

<object>...
        git-show(1)

<oldbranch>
        git-branch(1)

<pack>.idx ...
        git-verify-pack(1)

<patch>
        git-mailinfo(1)

<patch>...
        git-apply(1)

<pathspec>...
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-grep(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)
        git-stash(1)
        git-status(1)

<path>
        git-archive(1)

[<path>...]
        git-ls-tree(1)

<path>...
        git-diff(1)
        git-diff-tree(1)
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-shortlog(1)
        git-submodule(1)

<paths>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

<pattern>...
        git-for-each-ref(1)
        git-show-ref(1)

<patterns>...
        git-ls-remote(1)

<range1> <range2>
        git-range-diff(1)

[<refname>...]
        git-bundle(1)

<ref>...
        git-http-push(1)
        git-send-pack(1)

<refs>...
        git-fetch-pack(1)

<refspec>
        git-fetch(1)
        git-pull(1)

<refspec>...
        git-push(1)

<repository>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-ls-remote(1)
        git-pull(1)
        git-push(1)
        git-upload-archive(1)

<rev>
        git-show-branch(1)

<rev1>...<rev2>
        git-range-diff(1)

<revision range>
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-shortlog(1)

<rev-list options>...
        git-filter-branch(1)

<socket-path>
        git-credential-cache--daemon(1)

<split options>
        git-commit-graph(1)

<start>
        git-request-pull(1)

<start-point>
        git-branch(1)
        git-checkout(1)
        git-switch(1)

<stash>
        git-stash(1)

<tag>...
        git-verify-tag(1)

<tagname>
        git-tag(1)

<tree>
        git-commit-tree(1)

<tree>...
        git-grep(1)

<tree-ish>
        git-archive(1)
        git-checkout(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-tree(1)

<tree-ish#>
        git-read-tree(1)

<type>
        git-cat-file(1)

<URL>
        git-request-pull(1)

<upstream>
        git-cherry(1)
        git-rebase(1)

<worktree>
        git-worktree(1)

-<n>
        git-format-patch(1)

-/ <path>
        git-p4(1)

-<num>, -C <num>, --context <num>
        git-grep(1)

-<number>, -n <number>, --max-count=<number>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

-0
        git-diff(1)

-1 --base, -2 --ours, -3 --theirs
        git-diff(1)
        git-diff-files(1)

-3, --3way
        git-apply(1)

-3, --3way, --no-3way
        git-am(1)

-4, --ipv4
        git-fetch(1)
        git-pull(1)
        git-push(1)

-6, --ipv6
        git-fetch(1)
        git-pull(1)
        git-push(1)

--8bit-encoding=<encoding>
        git-send-email(1)

-A
        git-repack(1)

-A <author-conv-file>
        git-cvsimport(1)

-A <num>, --after-context <num>
        git-grep(1)

-A, --all, --no-ignore-removal
        git-add(1)

-a
        git-archimport(1)
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-merge-index(1)
        git-repack(1)

-a, -c, -t
        git-http-fetch(1)

-a, --all
        git-branch(1)
        git-check-attr(1)
        git-checkout-index(1)
        git-commit(1)
        git-help(1)
        git-merge-base(1)
        git-show-branch(1)
        git-stash(1)

-a, --annotate
        git-tag(1)

-a, --append
        git-fetch(1)
        git-pull(1)

-a, --text
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--abbrev[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-show(1)
        git-show-ref(1)

--abbrev=<n>
        git-blame(1)
        git-branch(1)
        git-describe(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--abbrev-commit
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show(1)

--abbrev-ref[=(strict|loose)]
        git-rev-parse(1)

--abort
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-notes(1)
        git-rebase(1)
        git-revert(1)

--absolute-git-dir
        git-rev-parse(1)

--access-hook=<path>
        git-daemon(1)

--active-branches=<n>
        git-fast-import(1)

--add
        git-config(1)
        git-update-index(1)

--add-file=<file>
        git-archive(1)

--add-header=<header>
        git-format-patch(1)

--add-virtual-file=<path>:<content>
        git-archive(1)

--aggressive
        git-gc(1)
        git-read-tree(1)

--ahead-behind, --no-ahead-behind
        git-status(1)

--all
        git-describe(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-http-push(1)
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-name-rev(1)
        git-pack-objects(1)
        git-pack-redundant(1)
        git-pack-refs(1)
        git-pull(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)
        git-send-pack(1)
        git-shortlog(1)
        git-submodule(1)

--all, --branches
        git-push(1)

--all-match
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--all-progress
        git-pack-objects(1)

--all-progress-implied
        git-pack-objects(1)

--allow-binary-replacement, --binary
        git-apply(1)

--allow-empty
        git-am(1)
        git-apply(1)
        git-cherry-pick(1)
        git-commit(1)
        git-notes(1)

--allow-empty-message
        git-cherry-pick(1)
        git-commit(1)
        git-rebase(1)

--[no-]allow-onelevel
        git-check-ref-format(1)

--allow-override=<service>, --forbid-override=<service>
        git-daemon(1)

--allow-unknown-type
        git-cat-file(1)

--allow-unrelated-histories
        git-merge(1)
        git-merge-tree(1)
        git-pull(1)

--allow-unsafe-features
        git-fast-import(1)

--also-filter-submodules
        git-clone(1)

--alternate-refs
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--alt-odb
        git-pack-redundant(1)

--always
        git-describe(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-name-rev(1)

--amend
        git-commit(1)

--ancestry-path
        gitk(1)

--ancestry-path[=<commit>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--anchored=<text>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--and, --or, --not, ( ... )
        git-grep(1)

--annotate
        git-send-email(1)

--annotate-stdin
        git-name-rev(1)

--anonymize
        git-fast-export(1)

--anonymize-map=<from>[:<to>]

--append
        git-commit-graph(1)

--apply
        git-apply(1)
        git-rebase(1)

--argscmd=<command>
        gitk(1)

--[no-]assume-unchanged
        git-update-index(1)

--atomic
        git-fetch(1)
        git-pull(1)
        git-send-pack(1)

--[no-]atomic
        git-push(1)

--attach[=<boundary>]
        git-format-patch(1)

--attr-source=<tree-ish>
        git(1)

--auto
        git-gc(1)

--author Author Name <Author Email>
        git-quiltimport(1)

--author=<author>
        git-commit(1)

--author=<pattern>, --committer=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--author-date-order
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]auto-maintenance, --[no-]auto-gc
        git-fetch(1)

--autosquash, --no-autosquash
        git-rebase(1)

--autostash, --no-autostash
        git-merge(1)
        git-pull(1)
        git-rebase(1)

-B <new-branch>
        git-checkout(1)

-B <num>, --before-context <num>
        git-grep(1)

-B[<n>][/<m>], --break-rewrites[=[<n>][/<m>]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-b
        git-annotate(1)
        git-blame(1)
        git-mailinfo(1)
        git-mailsplit(1)

-b <new-branch>
        git-checkout(1)

-b <new-branch>, -B <new-branch>
        git-worktree(1)

-b, --branch
        git-status(1)

-b <branch>, --branch <branch>
        git-submodule(1)

-b <branch-name>, --initial-branch=<branch-name>
        git-init(1)

-b <name>, --branch <name>
        git-clone(1)

-b <new-branch>
        git-checkout(1)

-b <branch-name>, --initial-branch=<branch-name>
        git-init(1)

-b, --browser
        git-instaweb(1)

-b <browser>, --browser=<browser>
        git-web--browse(1)

-b, --ignore-space-change
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-b, --write-bitmap-index
        git-repack(1)

--bare
        git(1)
        git-clone(1)
        git-init(1)
        git-p4(1)

--[no-]base[=<commit>]
        git-format-patch(1)

--base-path=<path>
        git-daemon(1)

--base-path <path>
        git-cvsserver(1)

--base-path-relaxed
        git-daemon(1)

--basic-regexp
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--bcc=<address>,...
        git-send-email(1)

--branch <branch>
        git-p4(1)

--branch <ref>
        git-p4(1)

--branches[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--branches[=<pattern>], --tags[=<pattern>], --remotes[=<pattern>]
        gitk(1)
        git-rev-parse(1)
        
--break
        git-grep(1)

--batch
        git-mktree(1)

--batch, --batch=<format>
        git-cat-file(1)

--batch-all-objects
        git-cat-file(1)

--batch-check, --batch-check=<format>
        git-cat-file(1)

--batch-command, --batch-command=<format>
        git-cat-file(1)

--batch-size=<num>
        git-send-email(1)

--big-file-threshold=<n>
        git-fast-import(1)

--binary
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--bisect
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--bisect-all
        git-rev-list(1)

--bisect-vars
        git-rev-list(1)

--[no-]bitmap
        git-multi-pack-index(1)

--blob <blob>
        git-config(1)

--bool, --int, --bool-or-int, --path, --expiry-date
        git-config(1)

--boundary
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--branch
        git-commit(1)

--buffer
        git-cat-file(1)

--build-fake-ancestor=<file>
        git-apply(1)

--build-options
        git-version(1)

--bundle-uri=<uri>
        git-clone(1)

-C
        git-branch(1)

-C[<n>], --find-copies[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-C<n>
        git-apply(1)
        git-rebase(1)

-C[<num>]
        git-annotate(1)
        git-blame(1)

-C <commit>, --reuse-message=<commit>
        git-commit(1)

-C <object>, --reuse-message=<object>
        git-notes(1)

-C <path>
        git(1)

-C <target-dir>
        git-cvsimport(1)

-c <conf.var>, --config=<conf.var>
        git-web--browse(1)

-C <new-branch>, --force-create <new-branch>
        git-switch(1)

-C <commit>, --reuse-message=<commit>
        git-commit(1)

-C <object>, --reuse-message=<object>
        git-notes(1)

-c
        git-blame(1)
        git-cvsexportcommit(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-c <commit>, --reedit-message=<commit>
        git-commit(1)

-c <key>=<value>, --config <key>=<value>
        git-clone(1)

-c <new-branch>, --create <new-branch>
        git-switch(1)

-c <commit>, --reedit-message=<commit>
        git-commit(1)

-c <object>, --reedit-message=<object>
        git-notes(1)

-c <name>=<value>
        git(1)

-c, --cached
        git-ls-files(1)

-c, --cc
        git-diff-files(1)

-c, --comment-lines
        git-stripspace(1)

-c, --committer
        git-shortlog(1)

-c, --config
        git-help(1)

-c, --copy
        git-branch(1)

-c, --count
        git-grep(1)

-c, --scissors
        git-am(1)

--cache
        git-fsck(1)

--cached
        git-apply(1)
        git-check-attr(1)
        git-diff-index(1)
        git-grep(1)
        git-rm(1)
        git-submodule(1)

--cacheinfo <mode>,<object>,<path>, --cacheinfo <mode> <object> <path>
        git-update-index(1)

--candidates=<n>
        git-describe(1)

--cat-blob-fd=<fd>
        git-fast-import(1)

--cc
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--cc=<address>,...
        git-send-email(1)

--cc=<email>
        git-format-patch(1)

--cc-cmd=<command>
        git-send-email(1)

--[no-]cc-cover
        git-send-email(1)

--[no-]chain-reply-to
        git-send-email(1)

--changed-paths
        git-commit-graph(1)

--changes-block-size <n>
        git-p4(1)

--changesfile <file>
        git-p4(1)

--check
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--checkout
        git-submodule(1)

--[no-]checkout
        git-worktree(1)

--check-self-contained-and-connected
        git-fetch-pack(1)
        git-index-pack(1)

--cherry
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--cherry-mark
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--cherry-pick
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--chmod=(+|-)x
        git-add(1)
        git-update-index(1)

--children
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--cleanup=<mode>
        git-cherry-pick(1)
        git-commit(1)
        git-merge(1)
        git-pull(1)
        git-revert(1)
        git-tag(1)

--clear-decorations
        git-log(1)
        git-reflog(1)

--color[=<when>]
        git-branch(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-for-each-ref(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-show(1)
        git-show-branch(1)
        git-tag(1)

--color-by-age
        git-annotate(1)
        git-blame(1)

--color-moved[=<mode>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--color-moved-ws=<modes>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--color-lines
        git-annotate(1)
        git-blame(1)

--color-words[=<regex>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--column
        git-grep(1)

--column[=<options>], --no-column
        git-branch(1)
        git-status(1)
        git-tag(1)

--combined-all-paths
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--command=<name>
        git-column(1)

--commit
        git-notes(1)

--commit (<sha1>|<sha1>..<sha1>)
        git-p4(1)

--commit, --no-commit
        git-merge(1)
        git-pull(1)

--commit-filter <command>
        git-filter-branch(1)

--commit-header
        git-rev-list(1)

--committer-date-is-author-date
        git-am(1)
        git-rebase(1)

--compact-summary
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--compose
        git-send-email(1)

--compose-encoding=<encoding>
        git-send-email(1)

--compression=<n>
        git-pack-objects(1)

--connectivity-only
        git-fsck(1)

--config=<config>
        git-for-each-repo(1)

--config-env=<name>=<envvar>
        git(1)

--confirm=<mode>
        git-send-email(1)

--conflict=(ask|skip|quit)
        git-p4(1)

--conflict=<style>
        git-checkout(1)
        git-restore(1)
        git-switch(1)

--contains
        git-describe(1)

--contains [<commit>]
        git-branch(1)
        git-tag(1)

--contains[=<object>]
        git-for-each-ref(1)

--contents <file>
        git-annotate(1)
        git-blame(1)

--continue
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--continue, -r, --resolved
        git-am(1)

--convert-graft-file
        git-replace(1)

--count
        git-rev-list(1)

--count=<count>
        git-for-each-ref(1)

--cover-from-description=<mode>
        git-format-patch(1)

--[no-]cover-letter
        git-format-patch(1)

--create-reflog
        git-branch(1)
        git-tag(1)
        git-update-ref(1)

--creation-factor=<percent>
        git-format-patch(1)
        git-range-diff(1)

--cruft
        git-pack-objects(1)
        git-repack(1)

--[no-]cruft
        git-gc(1)

--cruft-expiration=<approxidate>
        git-pack-objects(1)
        git-repack(1)

--cumulative
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--curl
        git-imap-send(1)

--current
        git-show-branch(1)

-D
        git-branch(1)

-D <depth>
        git-archimport(1)

-D, --irreversible-delete
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-d
        git-clean(1)
        git-cvsexportcommit(1)
        git-ls-tree(1)
        git-repack(1)

-d <CVSROOT>
        git-cvsimport(1)

-d <directory>
        git-filter-branch(1)

-d<prec>
        git-mailsplit(1)

-d <ref>
        git-update-ref(1)

-d, -D
        git-http-push(1)

-d, --delete
        git-branch(1)
        git-push(1)
        git-replace(1)
        git-symbolic-ref(1)
        git-tag(1)

-d, --deleted
        git-ls-files(1)

-d, --detach
        git-checkout(1)
        git-switch(1)
        git-worktree(1)

-d, --dereference
        git-show-ref(1)

-d, --dir-diff
        git-difftool(1)

-d, --httpd
        git-instaweb(1)

--[no-]dangling
        git-fsck(1)

--date=<date>
        git-commit(1)

--date=<format>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--date <format>
        git-annotate(1)
        git-blame(1)

--date-format=<fmt>
        git-fast-import(1)

--date-order
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show-branch(1)

--dd
        git-log(1)
        git-reflog(1)
        git-show(1)

--debug
        git-credential-cache--daemon(1)
        git-describe(1)
        git-ls-files(1)

--deduplicate
        git-ls-files(1)

--no-decorate, --decorate[=short|full|auto|no]
        git-log(1)
        git-reflog(1)

--decorate-refs=<pattern>, --decorate-refs-exclude=<pattern>
        git-log(1)
        git-reflog(1)

--deduplicate
        git-ls-files(1)

--deepen=<depth>
        git-fetch(1)
        git-pull(1)

--deepen-relative
        git-fetch-pack(1)

--default <arg>
        git-rev-parse(1)

--default <value>
        git-config(1)

--default-prefix
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--delta-base-offset
        git-pack-objects(1)

--delta-islands
        git-pack-objects(1)

--dense
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--depth
        git-submodule(1)

--depth <depth>
        git-clone(1)
        git-fetch(1)

--depth=<depth>
        git-pull(1)

--depth=<n>
        git-fast-import(1)
        git-fetch-pack(1)

--description-file=<file>
        git-format-patch(1)

--destination <directory>
        git-p4(1)

--detach
        git-daemon(1)

--detect-branches
        git-p4(1)

--detect-labels
        git-p4(1)

--developer-interfaces
        git-help(1)

--diff3
        git-merge-file(1)

--diff-algorithm={patience|minimal|histogram|myers}
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--diff-merges=<format>
        git-log(1)
        git-reflog(1)
        git-show(1)

--directory
        git-ls-files(1)

--directory=<root>
        git-apply(1)

--dirstat-by-file[=<param1,param2>...]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--dirty[=<mark>], --broken[=<mark>]
        git-describe(1)

--disable-p4sync
        git-p4(1)

--disable-rebase
        git-p4(1)

--disambiguate=<prefix>
        git-rev-parse(1)

--discard-changes
        git-switch(1)

--disk-usage, --disk-usage=human
        git-rev-list(1)

--dissociate
        git-clone(1)
        git-submodule(1)

--done
        git-fast-import(1)

--do-walk
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--dry-run
        git-commit(1)
        git-fetch(1)
        git-http-push(1)
        git-pull(1)
        git-send-email(1)
        git-send-pack(1)

--dst-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--dump-aliases
        git-send-email(1)

-E, --extended-regexp
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

-E, --extended-regexp, -G, --basic-regexp
        git-grep(1)

-e
        git-cat-file(1)
        git-cherry-pick(1)
        git-grep(1)

-e, --edit
        git-add(1)
        git-commit(1)
        git-config(1)
        git-revert(1)
        git-tag(1)

-e, --email
        git-shortlog(1)

-e, --show-email
        git-blame(1)

-e <pattern>, --exclude=<pattern>
        git-clean(1)

--edit <object>
        git-replace(1)

--edit, -e, --no-edit
        git-merge(1)
        git-pull(1)

--edit-description
        git-branch(1)

--edit-todo
        git-rebase(1)

--empty
        git-read-tree(1)

--empty=(drop|keep|ask)
        git-rebase(1)

--empty=(stop|drop|keep)
        git-am(1)

--enable=<service>, --disable=<service>
        git-daemon(1)

--encode-email-headers, --no-encode-email-headers
        git-format-patch(1)

--encoding=<encoding>
        git-annotate(1)
        git-blame(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-mailinfo(1)
        git-rev-list(1)
        git-show(1)

--envelope-sender=<address>
        git-send-email(1)

--env-filter <command>
        git-filter-branch(1)

--eol
        git-ls-files(1)

--error-unmatch
        git-ls-files(1)

--exact-match
        git-describe(1)

--exclude <pattern>
        git-describe(1)
        git-pack-refs(1)

--exclude=<glob-pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)
        git-shortlog(1)

--exclude=<path-pattern>
        git-apply(1)

--exclude=<pattern>
        git-for-each-ref(1)
        git-name-rev(1)

--exclude-existing[=<pattern>]
        git-show-ref(1)

--exclude-first-parent-only
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--exclude-hidden=[fetch|receive|uploadpack]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)
        git-shortlog(1)

--exclude-per-directory=<file>
        git-ls-files(1)

--exclude-promisor-objects
        git-pack-objects(1)
        git-rev-list(1)

--exclude-standard
        git-grep(1)
        git-ls-files(1)

--exec=<git-receive-pack>
        git-send-pack(1)

--exec=<git-upload-archive>
        git-archive(1)

--exec=<git-upload-pack>
        git-fetch-pack(1)

--exec-path[=<path>]
        git(1)

--exists
        git-show-ref(1)

--exit-code
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-remote(1)

--expand-tabs=<n>, --expand-tabs, --no-expand-tabs
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--expire <time>
        git-prune(1)
        git-worktree(1)

--expire=<time>
        git-reflog(1)

--expire-to=<dir>
        git-repack(1)

--expire-unreachable=<time>
        git-reflog(1)

--export-all
        git-cvsserver(1)
        git-daemon(1)

--export-labels
        git-p4(1)

--export-marks=<file>
        git-fast-export(1)
        git-fast-import(1)

--export-pack-edges=<file>
        git-fast-import(1)

--ext-diff
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-F
        git-repack(1)

-F <file>
        git-commit-tree(1)

-F <file>, --file <file>
        git-fmt-merge-msg(1)
        git-merge(1)
        git-tag(1)

-F <file>, --file=<file>
        git-commit(1)
        git-notes(1)

-F, --fixed-strings
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

-f
        git-archimport(1)
        git-cvsexportcommit(1)
        git-ls-files(1)
        git-repack(1)

-f <file>
        git-grep(1)

-f<nn>
        git-mailsplit(1)

-f, --force
        git-add(1)
        git-branch(1)
        git-checkout(1)
        git-checkout-index(1)
        git-clean(1)
        git-fetch(1)
        git-filter-branch(1)
        git-mv(1)
        git-notes(1)
        git-pull(1)
        git-push(1)
        git-replace(1)
        git-rm(1)
        git-submodule(1)
        git-switch(1)
        git-tag(1)
        git-update-server-info(1)
        git-worktree(1)

-f, --show-name
        git-blame(1)

-f <config-file>, --file <config-file>
        git-config(1)

--fake-missing-tagger
        git-fast-export(1)

--ff
        git-cherry-pick(1)

--ff, --no-ff, --ff-only
        git-merge(1)

--ff, --no-ff
        git-pull(1)

--ff-only
        git-pull(1)

--file=<path>
        git-credential-store(1)

--files
        git-submodule(1)

--filter=<filter-spec>
        git-clone(1)
        git-pack-objects(1)
        git-repack(1)
        git-rev-list(1)

--filename-max-length=<n>
        git-format-patch(1)

--filter-print-omitted
        git-rev-list(1)

--filter-provided-objects
        git-rev-list(1)

--filters
        git-cat-file(1)

--filter-to=<dir>
        git-repack(1)

--find-copies-harder
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--find-object=<object-id>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--find-renames[=<n>]
        git-status(1)

--first-parent
        git-bisect(1)
        git-blame(1)
        git-annotate(1)
        git-describe(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--fixed-value
        git-config(1)

--fix-thin
        git-index-pack(1)

--fixup=[(amend|reword):]<commit>
        git-commit(1)

--flags
        git-rev-parse(1)

--follow
        git-log(1)
        git-reflog(1)

--follow-symlinks
        git-cat-file(1)

--follow-tags
        git-push(1)

--force
        git-fast-import(1)
        git-gc(1)
        git-http-push(1)
        git-send-email(1)
        git-send-pack(1)

--[no-]force-if-includes
        git-push(1)

--[no-]force-in-body-from
        git-format-patch(1)

--force-remove
        git-update-index(1)

--force-untracked-cache
        git-update-index(1)

--[no-]force-with-lease, --force-with-lease=<refname>, --force-with-lease=<refname>:<expect>
        git-push(1)

--fork-point
        git-merge-base(1)

--fork-point, --no-fork-point
        git-rebase(1)

--format <format>
        git-branch(1)

--format=<fmt>
        git-archive(1)

--format=<format>
        git-for-each-ref(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-replace(1)
        git-tag(1)

--format[=<format>]
        git-shortlog(1)

--[no-]format-patch
        git-send-email(1)

--from, --from=<ident>
        git-format-patch(1)

--from=<address>
        git-send-email(1)

--fsck-objects
        git-index-pack(1)

--fsmonitor, --no-fsmonitor
        git-update-index(1)

--[no-]fsmonitor-valid
        git-update-index(1)

--full
        git-fsck(1)

--full-diff
        git-log(1)
        git-reflog(1)

--full-history
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--full-index
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--full-name
        git-grep(1)
        git-ls-files(1)
        git-ls-tree(1)

--full-tree
        git-fast-export(1)
        git-ls-tree(1)

-G<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-g<factor>, --geometric=<factor>
        git-repack(1)

-g, --again
        git-update-index(1)

-g, --gui
        git-mergetool(1)

-g, --[no-]gui
        git-difftool(1)

-g, --guides
        git-help(1)

-g, --reflog[=<n>[,<base>]] [<ref>]
        git-show-branch(1)

-g, --walk-reflogs
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--get
        git-config(1)

--get-all
        git-config(1)

--get-color <name> [<default>]
        git-config(1)

--get-colorbool <name> [<stdout-is-tty>]
        git-config(1)

--get-regexp
        git-config(1)

--get-url
        git-ls-remote(1)

--get-urlmatch <name> <URL>
        git-config(1)

--git-dir
        git-rev-parse(1)

--git-dir <dir>
        git-p4(1)

--git-dir=<path>
        git(1)

--git-common-dir
        git-rev-parse(1)

--git-path <path>
        git-rev-parse(1)

--glob=<glob-pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--glob=pattern
        git-rev-parse(1)

--glob-pathspecs
        git(1)

--global
        git-config(1)

--graft <commit> [<parent>...]
        git-replace(1)

--graph
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--grep=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--grep-reflog=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--group=<type>
        git-shortlog(1)

--guess, --no-guess
        git-checkout(1)
        git-switch(1)

--[no-]guess-remote
        git-worktree(1)

-H, --human-readable
        git-count-objects(1)

-h
        git-annotate(1)
        git-archimport(1)
        git-blame(1)
        git-cvsimport(1)

-h, -H
        git-grep(1)

-h, --heads, -t, --tags
        git-ls-remote(1)

-h, --help
        git(1)

-h, -H, --help
        git-cvsserver(1)

--head
        git-show-ref(1)

--header
        git-rev-list(1)

--header-cmd=<command>
        git-send-email(1)

--heading
        git-grep(1)

--heads, --tags
        git-show-ref(1)

--histogram
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--honor-pack-keep
        git-pack-objects(1)

--html-path
        git(1)

--http-backend-info-refs
        git-receive-pack(1)
        git-upload-pack(1)

-I
        git-grep(1)

-I<regex>, --ignore-matching-lines=<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-i
        git-cvsimport(1)
        git-read-tree(1)

-i, --delta-islands
        git-repack(1)

-i, --ignore-case
        git-branch(1)
        git-grep(1)
        git-tag(1)

-i, --ignored
        git-ls-files(1)

-i, --include
        git-commit(1)

-i, --info
        git-help(1)

-i, --interactive
        git-add(1)
        git-am(1)
        git-clean(1)
        git-rebase(1)

-i, --regexp-ignore-case
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--icase-pathspecs
        git(1)

--identity=<identity>
        git-send-email(1)

--if-exists <action>, --no-if-exists
        git-interpret-trailers(1)

--if-missing <action>, --no-if-missing
        git-interpret-trailers(1)

--ignore-blank-lines
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--ignore-case
        git-for-each-ref(1)

--ignore-cr-at-eol
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--ignored[=<mode>]
        git-status(1)

--ignore-date
        git-am(1)

--ignore-date, --reset-author-date
        git-rebase(1)

--ignore-errors
        git-add(1)

--ignore-if-in-upstream
        git-format-patch(1)

--ignore-missing
        git-add(1)
        git-hook(1)
        git-log(1)
        git-notes(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)
        git-update-index(1)

--ignore-other-worktrees
        git-checkout(1)
        git-switch(1)

--ignore-rev <rev>
        git-annotate(1)
        git-blame(1)

--ignore-revs-file <file>
        git-annotate(1)
        git-blame(1)

--ignore-skip-worktree-bits
        git-checkout(1)
        git-checkout-index(1)
        git-restore(1)

--[no-]ignore-skip-worktree-entries
        git-update-index(1)

--ignore-space-at-eol
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--ignore-space-change, --ignore-whitespace
        git-apply(1)

--ignore-submodules
        git-update-index(1)

--ignore-submodules[=<when>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)
        git-status(1)

--ignore-unmatch
        git-rm(1)

--ignore-unmerged
        git-restore(1)

--ignore-whitespace
        git-rebase(1)

--import-labels
        git-p4(1)

--import-local
        git-p4(1)

--import-marks=<file>
        git-fast-export(1)
        git-fast-import(1)

--import-marks-if-exists=<file>
        git-fast-import(1)

--inaccurate-eof
        git-apply(1)

--include <pattern>
        git-pack-refs(1)

--include=<path-pattern>
        git-apply(1)

--include-tag
        git-fetch-pack(1)
        git-pack-objects(1)

--[no-]includes
        git-config(1)

--in-commit-order
        git-rev-list(1)

--incremental
        git-annotate(1)
        git-blame(1)
        git-pack-objects(1)

--indent=<string>
        git-column(1)

--indent-heuristic
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--independent
        git-merge-base(1)
        git-show-branch(1)

--index
        git-apply(1)
        git-stash(1)

--indexed-objects
        git-rev-list(1)

--index-filter <command>
        git-filter-branch(1)

--index-info
        git-update-index(1)

--index-output=<file>
        git-read-tree(1)

--index-pack-args=<args>
        git-http-fetch(1)

--index-version <n>
        git-update-index(1)

--index-version=<version>[,<offset>]
        git-index-pack(1)
        git-pack-objects(1)

--inetd
        git-daemon(1)

--info-only
        git-update-index(1)

--info-path
        git(1)

--[no-]informative-errors
        git-daemon(1)

--init
        git-submodule(1)

--init-timeout=<n>
        git-daemon(1)

--inline[=<boundary>]
        git-format-patch(1)

--in-place
        git-interpret-trailers(1)

--in-reply-to=<identifier>
        git-send-email(1)

--in-reply-to=<message id>
        git-format-patch(1)

--intent-to-add
        git-apply(1)

--interdiff=<previous>
        git-format-patch(1)

--inter-hunk-context=<lines>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--interpolated-path=<pathtemplate>
        git-daemon(1)

--into-name <branch>
        git-fmt-merge-msg(1)
        git-merge(1)

--invert-grep
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--is-ancestor
        git-merge-base(1)

--is-bare-repository
        git-rev-parse(1)

--is-inside-git-dir
        git-rev-parse(1)

--is-inside-work-tree
        git-rev-parse(1)

--is-shallow-repository
        git-rev-parse(1)

--ita-invisible-in-index
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-j, --jobs=<n>
        git-fetch(1)
        git-pull(1)

-j <n>, --jobs <n>
        git-clone(1)
        git-submodule(1)

-k
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-mailinfo(1)
        git-mv(1)

-k, --keep
        git-am(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

-k, --keep-index, --no-keep-index
        git-stash(1)

-k, --keep-subject
        git-format-patch(1)

-k, --keep-unreachable
        git-repack(1)

-k, --killed
        git-ls-files(1)

--keep
        git-index-pack(1)

--keep=<msg>
        git-index-pack(1)

--keep-base
        git-rebase(1)

--keep-cr
        git-mailsplit(1)

--[no-]keep-cr
        git-am(1)

--keep-dashdash
        git-rev-parse(1)

--keep-largest-pack
        git-gc(1)

--keep-non-patch
        git-am(1)
        git-quiltimport(1)

--keep-pack=<pack-name>
        git-pack-objects(1)
        git-repack(1)

--keep-path
        git-p4(1)

--keep-redundant-commits
        git-cherry-pick(1)

--keep-true-parents
        git-pack-objects(1)

--keep-unreachable
        git-pack-objects(1)

-L <start>,<end>, -L :<funcname>
        git-annotate(1)
        git-blame(1)

-L<start>,<end>:<file>, -L:<funcname>:<file>
        gitk(1)
        git-log(1)
        git-reflog(1)

-L <label>
        git-merge-file(1)

-L <limit>
        git-cvsimport(1)

-l
        git-annotate(1)
        git-blame(1)
        git-checkout(1)
        git-repack(1)
        git-var(1)

-l<num>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-l, --list
        git-archive(1)
        git-branch(1)
        git-config(1)
        git-tag(1)

-l <pattern>, --list <pattern>
        git-replace(1)

-l, --local
        git-clone(1)
        git-instaweb(1)

-l, --long
        git-ls-tree(1)

-l, --files-with-matches, --name-only, -L, --files-without-match
        git-grep(1)

--left-only
        git-range-diff(1)

--left-only, --right-only
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--left-right
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--line-porcelain
        git-annotate(1)
        git-blame(1)

--line-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--list
        git-show-branch(1)

--list-cmds=group[,group...]
        git(1)

--listen=<host_or_ipaddr>
        git-daemon(1)

--literally
        git-hash-object(1)

--literal-pathspecs
        git(1)

--local
        git-config(1)
        git-pack-objects(1)

--local-env-vars
        git-rev-parse(1)

--lock
        git-worktree(1)

--log[=<n>]
        git-fmt-merge-msg(1)

--log[=<n>], --no-log
        git-merge(1)
        git-pull(1)

--log-destination=<destination>
        git-daemon(1)

--log-size
        git-log(1)
        git-reflog(1)

--long
        git-commit(1)
        git-describe(1)
        git-status(1)

--lost-found
        git-fsck(1)

-M
        git-branch(1)
        git-p4(1)

-M[<n>], --find-renames[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-M[<num>]
        git-annotate(1)
        git-blame(1)

-M <regex>
        git-cvsimport(1)

-M, -C
        git-fast-export(1)

-m
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-read-tree(1)
        git-show(1)
        git-symbolic-ref(1)

-m <msg>
        git-merge(1)

-m <message>
        git-commit-tree(1)

-m parent-number, --mainline parent-number
        git-revert(1)

-m <parent-number>, --mainline <parent-number>
        git-cherry-pick(1)

-m, --man
        git-help(1)

-m <num>, --max-count <num>
        git-grep(1)

-m, --merge
        git-checkout(1)
        git-rebase(1)
        git-restore(1)
        git-switch(1)

-m <message>, --message <message>
        git-fmt-merge-msg(1)

-m <msg>, --message=<msg>
        git-commit(1)
        git-notes(1)
        git-tag(1)

-m <reason>
        git-update-ref(1)

-m, --message-id
        git-am(1)
        git-mailinfo(1)

-m, --modified
        git-ls-files(1)

-m, --module-path
        git-instaweb(1)

-m, --move
        git-branch(1)

-m, --write-midx
        git-repack(1)

--[no-]mailmap, --[no-]use-mailmap
        git-cat-file(1)
        git-log(1)
        git-reflog(1)

--man-path
        git(1)

--mark-tags
        git-fast-export(1)

--match <pattern>
        git-describe(1)

--max-age=<timestamp>, --min-age=<timestamp>
        git-rev-list(1)

--max-changes <n>
        git-p4(1)

--max-connections=<n>
        git-daemon(1)

--max-cruft-size=<n>
        git-gc(1)
        git-repack(1)

--max-depth <depth>
        git-grep(1)

--max-input-size=<size>
        git-index-pack(1)
        git-unpack-objects(1)

--[no-]max-new-filters <n>
        git-commit-graph(1)

--max-pack-size=<n>
        git-fast-import(1)
        git-pack-objects(1)
        git-repack(1)

--mboxrd
        git-mailsplit(1)

--merge
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)
        git-submodule(1)

--merge-base
        git-diff-index(1)
        git-diff-tree(1)
        git-show-branch(1)

--merge-base=<commit>
        git-merge-tree(1)

--merged [<commit>]
        git-branch(1)
        git-tag(1)

--merged[=<object>]

--merges
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--[no-]messages
        git-merge-tree(1)

--minimal
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--min-parents=<number>, --max-parents=<number>, --no-min-parents, --no-max-parents
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--mirror
        git-clone(1)
        git-push(1)

--missing
        git-mktree(1)

--missing=<missing-action>
        git-pack-objects(1)
        git-rev-list(1)

--missing-ok
        git-write-tree(1)

--mode=<mode>
        git-column(1)

--mode=(stats|all)
        git-diagnose(1)

--more=<n>
        git-show-branch(1)

--msg-filter <command>
        git-filter-branch(1)

--mtime=<time>
        git-archive(1)

--multiple
        git-fetch(1)

-N, --intent-to-add
        git-add(1)

-N, --no-fetch
        git-submodule(1)

-N, --no-numbered
        git-format-patch(1)

-n
        git-mailinfo(1)
        git-repack(1)
        git-unpack-objects(1)

-n<num>
        git-tag(1)

-n, --dry-run
        git-add(1)
        git-clean(1)
        git-mv(1)
        git-notes(1)
        git-p4(1)
        git-prune(1)
        git-prune-packed(1)
        git-push(1)
        git-quiltimport(1)
        git-read-tree(1)
        git-reflog(1)
        git-rm(1)
        git-worktree(1)

-n, --line-number
        git-grep(1)

-n, --no-checkout
        git-clone(1)

-n, --no-commit
        git-cherry-pick(1)
        git-revert(1)

-n, --no-create
        git-checkout-index(1)

--non-empty
        git-pack-objects(1)

-n, --non-matching
        git-check-ignore(1)

-n, --no-stat
        git-rebase(1)

-n, --no-tags
        git-fetch(1)

-n, --[no-]verify
        git-commit(1)

-n, --no-verify
        git-am(1)

-n, --numbered
        git-format-patch(1)
        git-shortlog(1)

-n, --show-number
        git-blame(1)

-n, --summary-limit
        git-submodule(1)

--name
        git-submodule(1)

--name-objects
        git-fsck(1)

--name-only
        git-config(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-merge-tree(1)
        git-name-rev(1)
        git-show(1)

--name-only, --name-status
        git-ls-tree(1)

--name-status
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--namespace=<path>
        git(1)

--negotiate-only
        git-fetch(1)
        git-pull(1)

--negotiation-tip=<commit|glob>
        git-fetch(1)
        git-pull(1)

--nl=<string>
        git-column(1)

--no-abbrev
        git-branch(1)

--no-abbrev-commit
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show(1)

--no-add
        git-apply(1)

--no-all, --ignore-removal
        git-add(1)

--no-aliases
        git-help(1)

--no-attach
        git-format-patch(1)

--no-binary
        git-format-patch(1)

--no-checkout
        git-bisect(1)

--no-color
        git-branch(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-show(1)
        git-show-branch(1)

--no-color-moved
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-color-moved-ws
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-commit-header
        git-rev-list(1)

--no-commit-id
        git-diff-tree(1)

--no-contains [<commit>]
        git-branch(1)
        git-tag(1)

--no-contains[=<object>]
        git-for-each-ref(1)

--no-curl
        git-imap-send(1)

--no-data
        git-fast-export(1)

--no-deref
        git-update-ref(1)

--no-diagnose, --diagnose[=<mode>]
        git-bugreport(1)

--no-diff-merges
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-divider
        git-interpret-trailers(1)

--no-dual-color
        git-range-diff(1)

--no-edit
        git-commit(1)
        git-revert(1)

--no-empty-directory
        git-ls-files(1)

--no-exclude-standard
        git-grep(1)

--no-ext-diff
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-external-commands
        git-help(1)

--no-ff, --force-rebase, -f
        git-rebase(1)

--no-filter
        git-pack-objects(1)
        git-rev-list(1)

--no-filters
        git-hash-object(1)

--no-flags
        git-rev-parse(1)

--noglob-pathspecs
        git(1)

--no-gui
        git-mergetool(1)

--no-hardlinks
        git-clone(1)

--no-header-cmd
        git-send-email(1)

--no-identity
        git-send-email(1)

--no-indent-heuristic
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-index
        git-check-ignore(1)
        git-grep(1)

--no-keep-empty, --keep-empty
        git-rebase(1)

--no-log
        git-fmt-merge-msg(1)

--no-merged [<commit>]
        git-branch(1)
        git-tag(1)

--no-merged[=<object>]
        git-for-each-ref(1)

--no-merges
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--no-message-id
        git-am(1)

--no-name
        git-show-branch(1)

--no-notes
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-object-names
        git-rev-list(1)

--no-optional-locks
        git(1)

--no-post-rewrite
        git-commit(1)

--no-prefix
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-progress
        git-fetch-pack(1)

--no-prune
        git-gc(1)
        git-pack-refs(1)

--no-rebase
        git-pull(1)

--no-recurse-submodules
        git-fetch(1)

--no-recurse-submodules, --recurse-submodules=check|on-demand|only|no
        git-push(1)

--no-recursive
        git-grep(1)

--no-reuse-delta
        git-pack-objects(1)

--no-reuse-object
        git-pack-objects(1)

--no-reflogs
        git-fsck(1)

--no-renames
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--no-replace-objects
        git(1)

--no-revs
        git-rev-parse(1)

--no-scissors
        git-am(1)
        git-mailinfo(1)

--no-show-forced-updates
        git-fetch(1)
        git-pull(1)

--no-sign
        git-tag(1)

--no-smtp-auth
        git-send-email(1)

--no-sparse-checkout
        git-read-tree(1)

--no-status
        git-commit(1)

--no-tags
        git-clone(1)
        git-pull(1)

--no-textconv
        git-grep(1)

--no-[to|cc|bcc]
        git-send-email(1)

--no-track
        git-branch(1)
        git-checkout(1)
        git-switch(1)

--no-type
        git-config(1)

--no-undefined
        git-name-rev(1)

--no-utf8
        git-am(1)

--no-verify
        git-rebase(1)

--no-walk[=(sorted|unsorted)]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--no-warn-embedded-repo
        git-add(1)

--normalize
        git-check-ref-format(1)

--not
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)
        git-shortlog(1)

--notes[=<ref>]
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--[no-]notes[=<ref>]
        git-range-diff(1)

--notes[=<ref>], --no-notes
        git-format-patch(1)

--numbered-files
        git-format-patch(1)

--numstat
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-o<directory>
        git-mailsplit(1)

-O<orderfile>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-mergetool(1)
        git-show(1)

-O[<pager>], --open-files-in-pager[=<pager>]
        git-grep(1)

-o
        git-archimport(1)
        git-merge-index(1)

-o <branch-for-HEAD>
        git-cvsimport(1)

-o <index-file>
        git-index-pack(1)

-o, --only
        git-commit(1)

-o, --only-matching
        git-grep(1)

-o <dir>, --output-directory <dir>
        git-format-patch(1)

-o <name>, --origin <name>
        git-clone(1)

-o, --others
        git-ls-files(1)

-o <file>, --output=<file>
        git-archive(1)

-o <option>, --push-option=<option>
        git-push(1)

-o <option>, --server-option=<option>
        git-fetch(1)
        git-ls-remote(1)
        git-pull(1)

-o <path>, --output-directory <path>
        git-bugreport(1)
        git-diagnose(1)

--object-dir
        git-commit-graph(1)

--object-dir=<dir>
        git-multi-pack-index(1)

--object-format=<format>
        git-init(1)

--object-format=<hash-algorithm>
        git-index-pack(1)
        git-show-index(1)

--object-id
        git-merge-file(1)

--object-names
        git-rev-list(1)

--object-only
        git-ls-tree(1)

--objects
        git-rev-list(1)

--objects-edge
        git-rev-list(1)

--objects-edge-aggressive
        git-rev-list(1)

--octopus
        git-merge-base(1)

--omit-empty
        git-branch(1)
        git-for-each-ref(1)
        git-tag(1)

--oneline
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show(1)

--only-input
        git-interpret-trailers(1)

--only-trailers
        git-interpret-trailers(1)

--only-untracked
        git-stash(1)

--onto
        git-rebase(1)

--origin <commit>
        git-p4(1)

--original <namespace>
        git-filter-branch(1)

--orphan
        git-worktree(1)

--orphan <new-branch>
        git-checkout(1)
        git-switch(1)

--ours, --theirs
        git-checkout(1)
        git-restore(1)

--ours, --theirs, --union
        git-merge-file(1)

--output=<file>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--output-indicator-new=<char>, --output-indicator-old=<char>, --output-indicator-context=<char>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--overlay, --no-overlay
        git-checkout(1)
        git-restore(1)

--overwrite-ignore, --no-overwrite-ignore
        git-checkout(1)
        git-merge(1)

-P
        git-cvsexportcommit(1)

-P <cvsps-output-file>
        git-cvsimport(1)

-P, --no-pager
        git(1)

-P, --perl-regexp
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

-P, --prune-tags
        git-fetch(1)

-p
        git-cat-file(1)
        git-cvsexportcommit(1)
        git-merge-file(1)
        git-request-pull(1)

-p <options-for-cvsps>
        git-cvsimport(1)

-p <parent>
        git-commit-tree(1)

-p, --no-stat
        git-format-patch(1)

-p, --patch
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-restore(1)
        git-stash(1)

-p, -u, --patch
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-p, --paginate
        git(1)

-p<n>
        git-apply(1)

-p, --porcelain
        git-annotate(1)
        git-blame(1)

-p, --port
        git-instaweb(1)

-p, --prune
        git-fetch(1)
        git-pull(1)

-p, --show-function
        git-grep(1)

--packfile=<hash>
        git-http-fetch(1)

--pack-kept-objects
        git-repack(1)

--pack-loose-unreachable
        git-pack-objects(1)

--padding=<N>
        git-column(1)

--parent-filter <command>
        git-filter-branch(1)

--parents
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--parse
        git-interpret-trailers(1)

--parseopt
        git-rev-parse(1)

--patches <dir>
        git-quiltimport(1)

--patch-format
        git-am(1)

--patch-with-raw
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--patch-with-stat
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--patience
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--path
        git-hash-object(1)

--path=<path>
        git-cat-file(1)

--path-format=(absolute|relative)
        git-rev-parse(1)

--pathspec-file-nul
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)
        git-stash(1)

--pathspec-from-file=<file>
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)
        git-stash(1)

--pickaxe-all
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--pickaxe-regex
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--pid-file=<file>
        git-daemon(1)

--points-at <object>
        git-branch(1)
        git-tag(1)

--points-at=<object>

--porcelain
        git-commit(1)
        git-fetch(1)
        git-pull(1)
        git-push(1)
        git-worktree(1)

--porcelain[=<version>]
        git-status(1)

--port=<n>
        git-daemon(1)

--preferred-pack=<pack>
        git-multi-pack-index(1)

--prefetch
        git-fetch(1)
        git-pull(1)

--prefix <arg>
        git-rev-parse(1)

--prefix=<prefix>/
        git-archive(1)
        git-write-tree(1)

--prefix=<prefix>
        git-read-tree(1)

--prefix=<string>
        git-checkout-index(1)

--prepare-p4-only
        git-p4(1)

--preserve-user
        git-p4(1)

--pretty[=<format>], --format=<format>
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show(1)

--progress
        git-bundle(1)
        git-clone(1)
        git-fetch(1)
        git-format-patch(1)
        git-pack-objects(1)
        git-prune(1)
        git-pull(1)
        git-push(1)
        git-submodule(1)

--[no-]progress
        git-annotate(1)
        git-blame(1)
        git-commit-graph(1)
        git-commit-graph(1)
        git-fsck(1)
        git-multi-pack-index(1)

--progress=<header>
        git-rev-list(1)

--progress=<n>
        git-fast-export(1)

--progress, --no-progress
        git-checkout(1)
        git-merge(1)
        git-restore(1)
        git-switch(1)

--progress-title
        git-index-pack(1)

--promisor[=<message>]
        git-index-pack(1)

--prompt
        git-difftool(1)
        git-mergetool(1)

--prune
        git-push(1)

--prune=<date>
        git-gc(1)

--prune-empty
        git-filter-branch(1)

--push-option=<string>
        git-send-pack(1)

-q
        git-diff-files(1)
        git-merge-file(1)
        git-merge-index(1)
        git-pack-objects(1)
        git-unpack-objects(1)
        git-update-index(1)

-q, --quiet
        git-am(1)
        git-apply(1)
        git-branch(1)
        git-bundle(1)
        git-check-ignore(1)
        git-checkout(1)
        git-checkout-index(1)
        git-clean(1)
        git-clone(1)
        git-commit(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-format-patch(1)
        git-grep(1)
        git-imap-send(1)
        git-init(1)
        git-ls-remote(1)
        git-merge(1)
        git-notes(1)
        git-prune-packed(1)
        git-pull(1)
        git-push(1)
        git-read-tree(1)
        git-rebase(1)
        git-repack(1)
        git-reset(1)
        git-restore(1)
        git-rev-parse(1)
        git-rm(1)
        git-show-ref(1)
        git-stash(1)
        git-submodule(1)
        git-switch(1)
        git-symbolic-ref(1)
        git-worktree(1)

--quiet
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-fast-import(1)
        git-gc(1)
        git-rev-list(1)
        git-send-email(1)

--quit
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--quoted-cr=<action>
        git-am(1)
        git-mailinfo(1)

-R
        git-cvsimport(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-R, --reverse
        git-apply(1)

-r
        git-cherry-pick(1)
        git-diff-tree(1)
        git-ls-tree(1)
        git-rm(1)
        git-unpack-objects(1)

-r, --rebase[=false|true|merges|interactive]
        git-pull(1)

-r, --rebase-merges[=(rebase-cousins|no-rebase-cousins)], --no-rebase-merges
        git-rebase(1)

-r, --recursive
        git-grep(1)

-r, --remotes
        git-branch(1)
        git-show-branch(1)

-r <remote>
        git-cvsimport(1)

--range-diff=<previous>
        git-format-patch(1)

--raw
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-replace(1)
        git-show(1)
        git-verify-commit(1)
        git-verify-tag(1)

--raw-mode=<n>
        git-column(1)

--reachable
        git-commit-graph(1)

--really-refresh
        git-update-index(1)

--reapply-cherry-picks, --no-reapply-cherry-picks
        git-rebase(1)

--reason <string>
        git-worktree(1)

--rebase
        git-submodule(1)

--receive-pack=<git-receive-pack>
        git-send-pack(1)

--receive-pack=<git-receive-pack>, --exec=<git-receive-pack>
        git-push(1)

--[no-]recommend-shallow
        git-submodule(1)

--recount
        git-apply(1)

--recover
        git-http-fetch(1)

--recurse, --no-recurse
        git-symbolic-ref(1)

--recurse-submodules
        git-branch(1)
        git-grep(1)
        git-ls-files(1)

--[no-]recurse-submodules
        git-read-tree(1)

--recurse-submodules[=<pathspec>]
        git-clone(1)

--recurse-submodules[=yes|on-demand|no]
        git-fetch(1)

--recurse-submodules, --no-recurse-submodule
        git-checkout(1)
        git-restore(1)
        git-switch(1)

--recurse-submodules-default=[yes|on-demand]
        git-fetch(1)

--[no-]recurse-submodules[=yes|on-demand|no]
        git-pull(1)

--recursive
        git-submodule(1)

--reencode=(yes|no|abort)
        git-fast-export(1)

--ref <ref>
        git-notes(1)

--reference
        git-revert(1)

--reference <repository>
        git-submodule(1)

--reference-excluded-parents
        git-fast-export(1)

--reference[-if-able] <repository>
        git-clone(1)

--refetch
        git-fetch(1)
        git-fetch-pack(1)

--reflog
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--refmap=<refspec>
        git-fetch(1)
        git-pull(1)

--refresh
        git-add(1)
        git-update-index(1)

--refresh, --no-refresh
        git-reset(1)

--refs
        git-ls-remote(1)

--refs=<pattern>
        git-name-rev(1)

--refspec
        git-fast-export(1)

--refspec-pattern
        git-check-ref-format(1)

--refs-snapshot=<path>
        git-multi-pack-index(1)

--reject
        git-apply(1)

--[no-]reject-shallow
        git-clone(1)

--relative[=<path>], --no-relative
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--relative-date
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]relative-marks
        git-fast-import(1)

--relogin-delay=<int>
        git-send-email(1)

--remerge-diff
        git-log(1)
        git-reflog(1)
        git-show(1)

--remote
        git-submodule(1)

--remote=<repo>
        git-archive(1)

--remotes[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--[no-]remote-submodules
        git-clone(1)

--remove
        git-update-index(1)

--remove-empty
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--remove-section
        git-config(1)

--[no-]rename-empty
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--renames, --no-renames
        git-status(1)

--rename-section
        git-config(1)

--renormalize
        git-add(1)

--replace
        git-update-index(1)

--replace-all
        git-config(1)

--reply-to=<address>
        git-send-email(1)

--repo=<repository>
        git-push(1)

--rerere-autoupdate, --no-rerere-autoupdate
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--reschedule-failed-exec, --no-reschedule-failed-exec
        git-rebase(1)

--reset
        git-read-tree(1)

--reset-author
        git-commit(1)

--resolve-git-dir <path>
        git-rev-parse(1)

--resolvemsg=<msg>
        git-am(1)

--resolve-undo
        git-ls-files(1)

--restart
        git-instaweb(1)

--reuseaddr
        git-daemon(1)

--reverse
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--reverse <rev>..<rev>
        git-annotate(1)
        git-blame(1)

--[no-]rev-index
        git-index-pack(1)

--revs
        git-pack-objects(1)

--revs-only
        git-rev-parse(1)

--rewrite
        git-reflog(1)

--rewrite-submodules-from=<name>:<file>, --rewrite-submodules-to=<name>:<file>
        git-fast-import(1)

--rfc
        git-format-patch(1)

--right-only
        git-range-diff(1)

--root
        git-annotate(1)
        git-blame(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-fsck(1)
        git-rebase(1)

--rotate-to=<file>
        git-difftool(1)

-S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign
        git-am(1)
        git-cherry-pick(1)
        git-commit(1)
        git-commit-tree(1)
        git-merge(1)
        git-pull(1)
        git-rebase(1)
        git-revert(1)

-S <regex>
        git-cvsimport(1)

-S <revs-file>
        git-annotate(1)
        git-blame(1)

-S<string>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign
        git-am(1)
        git-cherry-pick(1)
        git-commit(1)
        git-commit-tree(1)
        git-merge(1)
        git-pull(1)
        git-rebase(1)
        git-revert(1)

-S, --staged
        git-stash(1)

-s
        git-blame(1)
        git-cat-file(1)
        git-diff-tree(1)

-s <subst>
        git-cvsimport(1)

-s, --hash[=<n>]
        git-show-ref(1)

-s, --no-patch
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-s, --shared
        git-clone(1)

-s, --short
        git-status(1)

-s, --sign
        git-tag(1)

-s, --signoff
        git-am(1)
        git-cherry-pick(1)
        git-format-patch(1)
        git-revert(1)

-s, --signoff, --no-signoff
        git-commit(1)

-s <tree>, --source=<tree>
        git-restore(1)

-s, --stage
        git-ls-files(1)

-s, --stat-only
        git-verify-pack(1)
        
-s <strategy>, --strategy=<strategy>
        git-merge(1)
        git-notes(1)
        git-pull(1)
        git-rebase(1)

-s, --strip-comments
        git-stripspace(1)

-s <format>, --suffix <format>
        git-bugreport(1)
        git-diagnose(1)

-s <tree>, --source=<tree>
        git-restore(1)

-s, --summary
        git-shortlog(1)

--[no-]skip-worktree
        git-update-index(1)

--scissors
        git-mailinfo(1)

--score-debug
        git-blame(1)

--select-commit=<ref>
        gitk(1)

--sendmail-cmd=<command>
        git-send-email(1)

--series <file>
        git-quiltimport(1)

--server-option=<option>
        git-clone(1)

--separate-git-dir=<git-dir>
        git-clone(1)
        git-init(1)

--[no-]separator, --separator=<paragraph-break>
        git-notes(1)

--set-upstream
        git-branch(1)
        git-fetch(1)
        git-pull(1)

--setup <command>
        git-filter-branch(1)

--sha1-name
        git-show-branch(1)

--shallow
        git-commit-graph(1)
        git-pack-objects(1)

--shallow-exclude=<revision>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

--shallow-since=<date>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

--[no-]shallow-submodules
        git-clone(1)

--shared[=(false|true|umask|group|all|world|everybody|<perm>)]
        git-init(1)

--shared-index-path
        git-rev-parse(1)

--shell, --perl, --python, --tcl
        git-for-each-ref(1)

--shelve
        git-p4(1)

--short
        git-commit(1)
        git-symbolic-ref(1)

--short[=length]
        git-rev-parse(1)

--shortstat
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--show-cdup
        git-rev-parse(1)

--show-current
        git-branch(1)

--show-current-patch
        git-rebase(1)

--show-current-patch[=(diff|raw)]
        git-am(1)

--show-forced-updates
        git-fetch(1)
        git-pull(1)

--show-index-version
        git-update-index(1)

--show-linear-break[=<barrier>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--show-notes[=<ref>], --[no-]standard-notes
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--show-notes-by-default
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--show-object-format[=(storage|input|output)]
        git-rev-parse(1)

--show-origin
        git-config(1)

--show-original-ids
        git-fast-export(1)

--show-prefix
        git-rev-parse(1)

--show-pulls
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--show-scope
        git-config(1)

--show-signature
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show(1)

--show-stash
        git-status(1)

--show-stats
        git-annotate(1)
        git-blame(1)

--show-superproject-working-tree
        git-rev-parse(1)

--show-toplevel
        git-rev-parse(1)

--[no-]signature=<signature>
        git-format-patch(1)

--signature-file=<file>
        git-format-patch(1)

--[no-]signed, --signed=(true|false|if-asked)
        git-push(1)
        git-send-pack(1)

--[no-]signed-off-by-cc
        git-send-email(1)

--signed-tags=(verbatim|warn|warn-strip|strip|abort)
        git-fast-export(1)

--signoff
        git-rebase(1)

--signoff, --no-signoff
        git-merge(1)
        git-pull(1)

--silent
        git-p4(1)

--simplify-by-decoration
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--simplify-merges
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--since=<date>
        gitk(1)

--since=<date>, --after=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--since=datestring, --after=datestring
        git-rev-parse(1)

--since-as-filter=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--[no-]single-branch
        git-clone(1)
        git-submodule(1)

--single-worktree
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--skip
        git-am(1)
        git-cherry-pick(1)
        git-rebase(1)
        git-revert(1)

--skip=<number>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--skip-to=<file>
        git-difftool(1)
        git-show(1)

--skip-to=<file>, --rotate-to=<file>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--smtp-auth=<mechanisms>
        git-send-email(1)

--smtp-debug=0|1
        git-send-email(1)

--smtp-domain=<FQDN>
        git-send-email(1)

--smtp-encryption=<encryption>
        git-send-email(1)

--smtp-server-option=<option>
        git-send-email(1)

--smtp-pass[=<password>]
        git-send-email(1)

--smtp-server-port=<port>
        git-send-email(1)

--smtp-server=<host>
        git-send-email(1)

--smtp-ssl
        git-send-email(1)

--smtp-ssl-cert-path
        git-send-email(1)

--smtp-user=<user>
        git-send-email(1)

--socket <path>
        git-credential-cache(1)

--sort=<key>
        git-branch(1)
        git-for-each-ref(1)
        git-ls-remote(1)
        git-tag(1)

--source
        git-log(1)
        git-reflog(1)

--source=<tree-ish>
        git-check-attr(1)

--sparse
        git-add(1)
        git-clone(1)
        git-log(1)
        git-reflog(1)
        git-ls-files(1)
        git-rev-list(1)
        git-rm(1)
        git-shortlog(1)
        git-show-branch(1)

--[no-]sparse
        git-pack-objects(1)

--split[=<strategy>]
        git-commit-graph(1)

--split-index, --no-split-index
        git-update-index(1)

--sq
        git-rev-parse(1)

--sq-quote
        git-rev-parse(1)

--squash=<commit>
        git-commit(1)

--squash, --no-squash
        git-merge(1)
        git-pull(1)

--src-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--stable
        git-patch-id(1)

--stage=<number>|all
        git-checkout-index(1)

--stale-fix
        git-reflog(1)

--start
        git-instaweb(1)

--start-number <n>
        git-format-patch(1)

--stat
        git-apply(1)
        git-rebase(1)

--stat[=<width>[,<name-width>[,<count>]]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--stat, -n, --no-stat
        git-merge(1)
        git-pull(1)

--state-branch <branch>
        git-filter-branch(1)

--stateless-rpc
        git-upload-pack(1)

--stats
        git-fast-import(1)

--status
        git-commit(1)

--stdin
        git-check-attr(1)
        git-check-ignore(1)
        git-check-mailmap(1)
        git-checkout-index(1)
        git-diff-tree(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-fmt-merge-msg(1)
        git-hash-object(1)
        git-http-fetch(1)
        git-index-pack(1)
        git-log(1)
        git-notes(1)
        git-reflog(1)
        git-rev-list(1)
        git-send-pack(1)
        git-shortlog(1)
        git-update-index(1)
        git-update-ref(1)
        
--stdin-commits
        git-commit-graph(1)

--stdin-packs
        git-commit-graph(1)
        git-multi-pack-index(1)
        git-pack-objects(1)

--stdin-paths
        git-hash-object(1)

--stdout
        git-format-patch(1)
        git-pack-objects(1)

--stop
        git-instaweb(1)

--stop-at-non-option
        git-rev-parse(1)

--strategy=<strategy>
        git-cherry-pick(1)
        git-revert(1)

--strict
        git-fsck(1)
        git-index-pack(1)
        git-mktag(1)
        git-unpack-objects(1)

--[no-]strict
        git-upload-pack(1)

--strict-paths
        git-cvsserver(1)
        git-daemon(1)

--[no-]stripspace
        git-notes(1)

--stuck-long
        git-rev-parse(1)

--subdirectory-filter <directory>
        git-filter-branch(1)

--subject=<string>
        git-send-email(1)

--subject-prefix=<subject prefix>
        git-format-patch(1)

--submodule[=<format>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--submodule-prefix=<path>
        git-fetch(1)

--suffix=.<sfx>
        git-format-patch(1)

--[no-]summary
        git-fmt-merge-msg(1)

--summary
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--summary, --no-summary
        git-merge(1)
        git-pull(1)

--suppress-cc=<category>
        git-send-email(1)

--[no-]suppress-from
        git-send-email(1)

--symbolic
        git-rev-parse(1)

--symbolic-full-name
        git-rev-parse(1)

--[no-]symlinks
        git-difftool(1)

--symref
        git-ls-remote(1)

--syslog
        git-daemon(1)

--system
        git-config(1)

-T
        git-archimport(1)

-t
        git-annotate(1)
        git-blame(1)
        git-cat-file(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-show(1)

-t <tmpdir>
        git-archimport(1)

-t <type>
        git-hash-object(1)

-t, --track[=(direct|inherit)]
        git-branch(1)
        git-checkout(1)

-t, --tags
        git-fetch(1)
        git-pull(1)

-t <file>, --template=<file>
        git-commit(1)

-t <browser>, --tool=<browser>
        git-web--browse(1)

-t <tool>, --tool=<tool>
        git-difftool(1)
        git-mergetool(1)

-t, --track[=(direct|inherit)]
        git-branch(1)
        git-checkout(1)
        git-switch(1)

--tag-of-filtered-object=(abort|drop|rewrite)
        git-fast-export(1)

--tag-name-filter <command>
        git-filter-branch(1)

--tags
        git-describe(1)
        git-fsck(1)
        git-name-rev(1)
        git-push(1)

--tags[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--temp
        git-checkout-index(1)

--template=<template-directory>
        git-clone(1)
        git-init(1)

--test-untracked-cache
        git-update-index(1)

--textconv
        git-cat-file(1)
        git-grep(1)

--textconv, --no-textconv
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--thin
        git-fetch-pack(1)
        git-pack-objects(1)
        git-send-pack(1)

--[no-]thin
        git-push(1)

--thread[=<style>], --no-thread
        git-format-patch(1)

--[no-]thread
        git-send-email(1)

--threads <num>
        git-grep(1)

--threads=<n>
        git-index-pack(1)
        git-pack-objects(1)
        git-repack(1)

--timeout=<n>
        git-daemon(1)
        git-upload-pack(1)

--timeout <seconds>
        git-credential-cache(1)

--timestamp
        git-rev-list(1)

--to=<address>,...
        git-send-email(1)

--to=<email>
        git-format-patch(1)

--to-cmd=<command>
        git-send-email(1)

--[no-]to-cover
        git-send-email(1)

--topics
        git-show-branch(1)

--topo-order
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-show-branch(1)

--to-stdin
        git-hook(1)

--tool-help
        git-difftool(1)
        git-mergetool(1)

--[no-]track

--trailer <key>[(=|:)<value>]
        git-interpret-trailers(1)

--trailer <token>[(=|:)<value>]
        git-commit(1)

--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)
        git-send-email(1)

--tree-filter <command>
        git-filter-branch(1)

--trim-empty
        git-interpret-trailers(1)

--trivial
        git-read-tree(1)

--[no-]trust-exit-code
        git-difftool(1)

--type <type>
        git-config(1)

-U<n>, --unified=<n>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-u
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-mailinfo(1)
        git-read-tree(1)

-u, --include-untracked, --no-include-untracked
        git-stash(1)

-u, --index
        git-checkout-index(1)

-u, --set-upstream
        git-push(1)

-u, --unmerged
        git-ls-files(1)

-u[<mode>], --untracked-files[=<mode>]
        git-status(1)

-u, --update
        git-add(1)

-u, --update-head-ok
        git-fetch(1)

-u <key-id>, --local-user=<key-id>
        git-tag(1)

-u[<mode>], --untracked-files[=<mode>]
        git-commit(1)

-u <upload-pack>, --upload-pack <upload-pack>
        git-clone(1)

-u <upstream>, --set-upstream-to=<upstream>
        git-branch(1)

-u, --utf8
        git-am(1)

--unfold
        git-interpret-trailers(1)

--unidiff-zero
        git-apply(1)

--unmerged
        git-update-index(1)

--unordered
        git-cat-file(1)

--unpacked
        git-pack-objects(1)
        git-rev-list(1)

--unpack-unreachable
        git-pack-objects(1)

--unpack-unreachable=<when>
        git-repack(1)

--unreachable
        git-fsck(1)

--unresolve
        git-update-index(1)

--unsafe-paths
        git-apply(1)

--unset
        git-config(1)

--unset-all
        git-config(1)

--unset-upstream
        git-branch(1)

--unshallow
        git-fetch(1)
        git-pull(1)

--unstable
        git-patch-id(1)

--until=<date>
        gitk(1)

--until=<date>, --before=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-shortlog(1)

--until=datestring, --before=datestring
        git-rev-parse(1)

--untracked
        git-grep(1)

--untracked-cache, --no-untracked-cache
        git-update-index(1)

--updateref
        git-reflog(1)

--update-refs, --no-update-refs
        git-rebase(1)

--update-shallow
        git-fetch(1)
        git-pull(1)

--update-shelve CHANGELIST
        git-p4(1)

--upload-pack=<exec>
        git-ls-remote(1)

--upload-pack=<git-upload-pack>
        git-fetch-pack(1)

--upload-pack <upload-pack>
        git-fetch(1)
        git-pull(1)

--use-bitmap-index
        git-rev-list(1)

--use-client-spec
        git-p4(1)

--use-done-feature
        git-fast-export(1)

--user=<user>, --group=<group>
        git-daemon(1)

--user-interfaces
        git-help(1)

--user-path, --user-path=<path>
        git-daemon(1)

-V, --version
        git-cvsserver(1)

-v
        git-archimport(1)
        git-cherry(1)
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-diff-tree(1)
        git-fetch-pack(1)
        git-http-fetch(1)
        git-index-pack(1)
        git-ls-files(1)
        git-read-tree(1)

-v, --invert-match
        git-grep(1)

-v <n>, --reroll-count=<n>
        git-format-patch(1)

-v, --verbose
        git-add(1)
        git-apply(1)
        git-archive(1)
        git-check-ignore(1)
        git-clone(1)
        git-commit(1)
        git-count-objects(1)
        git-fetch(1)
        git-imap-send(1)
        git-merge(1)
        git-mv(1)
        git-notes(1)
        git-p4(1)
        git-prune(1)
        git-pull(1)
        git-push(1)
        git-rebase(1)
        git-remote(1)
        git-status(1)
        git-verify-commit(1)
        git-verify-pack(1)
        git-verify-tag(1)
        git-worktree(1)

-v, --verify
        git-tag(1)

-v, --version
        git(1)

-v, -vv, --verbose
        git-branch(1)

--[no-]validate
        git-send-email(1)

--verbatim
        git-patch-id(1)

--verbose
        git-daemon(1)
        git-help(1)
        git-http-push(1)
        git-pack-redundant(1)
        git-reflog(1)
        git-send-pack(1)
        git-update-index(1)

--verify
        git-rebase(1)
        git-rev-parse(1)
        git-show-ref(1)

--[no-]verify
        git-merge(1)
        git-pull(1)
        git-push(1)

--verify-signatures, --no-verify-signatures
        git-merge(1)
        git-pull(1)

--version=<version>
        git-bundle(1)

-W
        git-cvsexportcommit(1)

-W, --function-context
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-W, --worktree, -S, --staged
        git-restore(1)

-w
        git-blame(1)
        git-cvsexportcommit(1)
        git-hash-object(1)

-w <filename>
        git-http-fetch(1)

-w[<width>[,<indent1>[,<indent2>]]]
        git-shortlog(1)

-w, --ignore-all-space
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-w, --web
        git-help(1)

-w, --word-regexp
        git-grep(1)

--where <placement>, --no-where
        git-interpret-trailers(1)

--whitespace=<action>
        git-apply(1)

--whitespace=<option>
        git-rebase(1)

--width=<width>
        git-column(1)

--window=<n>, --depth=<n>
        git-pack-objects(1)
        git-repack(1)

--window-memory=<n>
        git-pack-objects(1)
        git-repack(1)

--with-tree=<tree-ish>
        git-ls-files(1)

--word-diff[=<mode>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--word-diff-regex=<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

--work-tree=<path>
        git(1)

--worktree
        git-config(1)

--worktree-attributes
        git-archive(1)

--[no-]write-commit-graph
        git-fetch(1)

--[no-]write-fetch-head
        git-fetch(1)

--ws-error-highlight=<kind>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-X
        git-clean(1)

-X <file>, --exclude-from=<file>
        git-ls-files(1)

-X<option>, --strategy-option=<option>
        git-cherry-pick(1)
        git-revert(1)

-X <option>, --strategy-option=<option>
        git-merge(1)
        git-pull(1)

-X <strategy-option>, --strategy-option=<strategy-option>
        git-rebase(1)

-X[<param1,param2,...>], --dirstat[=<param1,param2,...>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-show(1)

-x
        git-cherry-pick(1)
        git-clean(1)

-x <pattern>, --exclude=<pattern>
        git-ls-files(1)

-x <cmd>, --exec <cmd>
        git-rebase(1)

-x <command>, --extcmd=<command>
        git-difftool(1)

--xmailer, --no-xmailer
        git-send-email(1)

-y, --no-prompt
        git-difftool(1)
        git-mergetool(1)

-Z
        git-cat-file(1)

-z
        git-apply(1)
        git-cat-file(1)
        git-check-attr(1)
        git-check-ignore(1)
        git-checkout-index(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-merge-tree(1)
        git-mktree(1)
        git-show(1)
        git-status(1)
        git-update-index(1)
        git-update-ref(1)
        git-worktree(1)

-z, --null
        git-commit(1)
        git-config(1)
        git-grep(1)

-z <fuzz>
        git-cvsimport(1)

--zdiff3
        git-merge-file(1)

--zero-commit
        git-format-patch(1)

[-- Attachment #3: Type: text/plain, Size: 1979 bytes --]



Dirk Gouders <dirk@gouders.net> writes:

> Recently, I followed the discussion [1] and I thought: let's look at the
> manual pages to see what options Git currently uses -- just out of
> curiosity and for learning about Git.
>
> That were 160 manual pages to visit and if I counted correctly, there
> are 1160 different option strings -- some of them related and only
> differing in details.
>
> The attached file doesn't always say anything about semantics that
> sometimes is totally different (for -h, for example).
>
> I thought that could be interesting to some of you, as well, so I send
> it to the list.
>
> Some points I noticed:
>
> - SYNOPSIS not always matches OPTIONS (e.g. git(1)) and in those cases
>   [<options>] would probably a better solution.
>
> - Options that require arguments are often listed without those
>   arguments in OPTIONS but those arguments are talked about and one has
>   to go to SYNOPSIS to come to know the order of those arguments
>   (e.g. git branch -m)
>
> Should you wonder about the sorting, I tried to stick to the following
> rules:
>
> - Take the strings as they appear in the OPTIONS sections -- no splitting.
> - Primarily sort by letters and numbers.
> - Sort by the first option, then by the second.
>   Arguments are only used within those groups.
> - I changed the rules on the way, so there may be errors.
>
> Disclaimer: because manually created this file isn't 100% correct but I
>             gave my best.  On the way I noticed that sometimes options
>             appear at unexpected places, so I for sure missed some.
>
>
>
> At least this perhaps serves amusing purposes ;-)
>
> Who knows, perhaps you think git-options(7) would be a valuable
> addition.  I think it can be automatically generated with a moderate
> amount of work.
>
> Or the attached file could be used for some SoC micro-procect or the
> like...
>
> Dirk
>
> [1] https://lore.kernel.org/git/ef5958e1-af3f-4869-b0e3-ff1448c0d73c@gmail.com/T/#t

^ permalink raw reply

* [PATCH v2] setup: notice more types of implicit bare repositories
From: Junio C Hamano @ 2024-03-09 23:27 UTC (permalink / raw)
  To: git; +Cc: Kyle Lippincott, Kyle Meyer
In-Reply-To: <20240308211957.3758770-1-gitster@pobox.com>

Builds directly on top of 45bb9162 (setup: allow cwd=.git w/
bareRepository=explicit, 2024-01-20).

Instead of saying "primary worktree's $GIT_DIR is OK", "secondary
worktree's $GIT_DIR is OK", and "submodule's $GIT_DIR is OK"
separately, let's give them a name to call them collectively,
"implicit bare repository" (for now, to reuse what an earlier commit
used, which may not be an optimum name), as these share the same
security guarantee and convenience benefit.

The code got significantly simpler, and test moderately more
complex, having to set up submodule tests.

------- >8 ------------- >8 ------------- >8 -------
Setting the safe.bareRepository configuration variable to explicit
stops git from using a bare repository, unless the repository is
explicitly specified, either by the "--git-dir=<path>" command line
option, or by exporting $GIT_DIR environment variable.  This may be
a reasonable measure to safeguard users from accidentally straying
into a bare repository in unexpected places, but often gets in the
way of users who need valid accesses too the repository.

Earlier, 45bb9162 (setup: allow cwd=.git w/ bareRepository=explicit,
2024-01-20) loosened the rule such that being inside the ".git"
directory of a non-bare repository does not really count as
accessing a "bare" repository.  The reason why such a loosening is
needed is because often hooks and third-party tools run from within
$GIT_DIR while working with a non-bare repository.

More importantly, the reason why this is safe is because a directory
whose contents look like that of a "bare" repository cannot be a
bare repository that came embedded within a checkout of a malicious
project, as long as its directory name is ".git", because ".git" is
not a name allowed for a directory in payload.

There are at least two other cases where tools have to work in a
bare-repository looking directory that is not an embedded bare
repository, and accesses to them are still not allowed by the recent
change.

 - A secondary worktree (whose name is $name) has its $GIT_DIR
   inside "worktrees/$name/" subdirectory of the $GIT_DIR of the
   primary worktree of the same repository.

 - A submodule worktree (whose name is $hame) has its $GIT_DIR
   inside "modules/$name/" subdirectory of the $GIT_DIR of its
   superproject.

As long as the primary worktree or the superproject in these cases
are not bare, the pathname of these "looks like bare but not really"
directories will have "/.git/worktrees/" and "/.git/modules/" as a
substring in its leading part, and we can take advantage of the same
security guarantee allow git to work from these places.

Extend the earlier "in a directory called '.git' we are OK" logic
used for the primary worktree to also cover the secondary worktree's
and non-embedded submodule's $GIT_DIR, by moving the logic to a
helper function "is_implicit_bare_repo()".  We deliberately exclude
secondary worktrees and submodules of a bare repository, as these
are exactly what safe.bareRepository=explicit setting is designed to
forbid accesses to without an explicit GIT_DIR/--git-dir=<path>

Helped-by: Kyle Lippincott <spectral@google.com>
Helped-by: Kyle Meyer <kyle@kyleam.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 setup.c                         | 28 +++++++++++++++++++++++++++-
 t/t0035-safe-bare-repository.sh | 26 ++++++++++++++++++++++----
 2 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/setup.c b/setup.c
index a09b7b87ec..25d98ee6dd 100644
--- a/setup.c
+++ b/setup.c
@@ -1231,6 +1231,32 @@ static const char *allowed_bare_repo_to_string(
 	return NULL;
 }
 
+static int is_implicit_bare_repo(const char *path)
+{
+	/*
+	 * what we found is a ".git" directory at the root of
+	 * the working tree.
+	 */
+	if (ends_with_path_components(path, ".git"))
+		return 1;
+
+	/*
+	 * we are inside $GIT_DIR of a secondary worktree of a
+	 * non-bare repository.
+	 */
+	if (strstr(path, "/.git/worktrees/"))
+		return 1;
+
+	/*
+	 * we are inside $GIT_DIR of a worktree of a non-embedded
+	 * submodule, whose superproject is not a bare repository.
+	 */
+	if (strstr(path, "/.git/modules/"))
+		return 1;
+
+	return 0;
+}
+
 /*
  * We cannot decide in this function whether we are in the work tree or
  * not, since the config can only be read _after_ this function was called.
@@ -1360,7 +1386,7 @@ static enum discovery_result setup_git_directory_gently_1(struct strbuf *dir,
 		if (is_git_directory(dir->buf)) {
 			trace2_data_string("setup", NULL, "implicit-bare-repository", dir->buf);
 			if (get_allowed_bare_repo() == ALLOWED_BARE_REPO_EXPLICIT &&
-			    !ends_with_path_components(dir->buf, ".git"))
+			    !is_implicit_bare_repo(dir->buf))
 				return GIT_DIR_DISALLOWED_BARE;
 			if (!ensure_valid_ownership(NULL, NULL, dir->buf, report))
 				return GIT_DIR_INVALID_OWNERSHIP;
diff --git a/t/t0035-safe-bare-repository.sh b/t/t0035-safe-bare-repository.sh
index 8048856379..d3cb2a1cb9 100755
--- a/t/t0035-safe-bare-repository.sh
+++ b/t/t0035-safe-bare-repository.sh
@@ -29,9 +29,20 @@ expect_rejected () {
 	grep -F "implicit-bare-repository:$pwd" "$pwd/trace.perf"
 }
 
-test_expect_success 'setup bare repo in worktree' '
+test_expect_success 'setup an embedded bare repo, secondary worktree and submodule' '
 	git init outer-repo &&
-	git init --bare outer-repo/bare-repo
+	git init --bare --initial-branch=main outer-repo/bare-repo &&
+	git -C outer-repo worktree add ../outer-secondary &&
+	test_path_is_dir outer-secondary &&
+	(
+		cd outer-repo &&
+		test_commit A &&
+		git push bare-repo +HEAD:refs/heads/main &&
+		git -c protocol.file.allow=always \
+			submodule add --name subn -- ./bare-repo subd
+	) &&
+	test_path_is_dir outer-repo/.git/worktrees/outer-secondary &&
+	test_path_is_dir outer-repo/.git/modules/subn
 '
 
 test_expect_success 'safe.bareRepository unset' '
@@ -53,8 +64,7 @@ test_expect_success 'safe.bareRepository in the repository' '
 	# safe.bareRepository must not be "explicit", otherwise
 	# git config fails with "fatal: not in a git directory" (like
 	# safe.directory)
-	test_config -C outer-repo/bare-repo safe.bareRepository \
-		all &&
+	test_config -C outer-repo/bare-repo safe.bareRepository all &&
 	test_config_global safe.bareRepository explicit &&
 	expect_rejected -C outer-repo/bare-repo
 '
@@ -86,4 +96,12 @@ test_expect_success 'no trace when "bare repository" is a subdir of .git' '
 	expect_accepted_implicit -C outer-repo/.git/objects
 '
 
+test_expect_success 'no trace in $GIT_DIR of secondary worktree' '
+	expect_accepted_implicit -C outer-repo/.git/worktrees/outer-secondary
+'
+
+test_expect_success 'no trace in $GIT_DIR of a submodule' '
+	expect_accepted_implicit -C outer-repo/.git/modules/subn
+'
+
 test_done
-- 
2.44.0-165-ge09f1254c5


^ permalink raw reply related

* Re: [PATCH] sequencer: allow disabling conflict advice
From: Junio C Hamano @ 2024-03-09 23:19 UTC (permalink / raw)
  To: Philippe Blain; +Cc: Philippe Blain via GitGitGadget, git, Phillip Wood
In-Reply-To: <xmqqle6rch89.fsf@gitster.g>

Junio C Hamano <gitster@pobox.com> writes:

> Philippe Blain <levraiphilippeblain@gmail.com> writes:
>
>> Thinking about this more and looking at the code, using 'advice_enabled' in the condition
>> instead of using 'advise_if_enabled' for each message has a side effect:
>> the text "hint: Disable this message with "git config advice.sequencerConflict false"
>> will not appear, which I find less user friendly...
>
> Good eyes.
>
> I agree that you have to do that part yourself at the end of that
> "if () { ... }" block using turn_off_instructions[] string.

Forgot to add "... which is an unnecessary chore" at the end.

Thanks.

^ permalink raw reply

* Re: [PATCH 2/2] merge-ort/merge-recursive: do report errors in `merge_submodule()`
From: Junio C Hamano @ 2024-03-09 23:18 UTC (permalink / raw)
  To: Johannes Schindelin
  Cc: Johannes Schindelin via GitGitGadget, git, Patrick Steinhardt,
	Dirk Gouders, Jeff King
In-Reply-To: <a0af1155-59d9-0c35-f3e9-c0fe1ba0e11b@gmx.de>

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> By my counting, 5 of the handled cases result in ret = -1, i.e.
> non-recoverable errors, but 8 of the cases result in ret = 0,
> i.e. unclean merges, whereas only 2 cases return 1, i.e. clean
> merges.

Sounds good.  Thanks.

^ permalink raw reply

* Informative: git-options.txt
From: Dirk Gouders @ 2024-03-09 22:27 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 1851 bytes --]

Recently, I followed the discussion [1] and I thought: let's look at the
manual pages to see what options Git currently uses -- just out of
curiosity and for learning about Git.

That were 160 manual pages to visit and if I counted correctly, there
are 1160 different option strings -- some of them related and only
differing in details.

The attached file doesn't always say anything about semantics that
sometimes is totally different (for -h, for example).

I thought that could be interesting to some of you, as well, so I send
it to the list.

Some points I noticed:

- SYNOPSIS not always matches OPTIONS (e.g. git(1)) and in those cases
  [<options>] would probably a better solution.

- Options that require arguments are often listed without those
  arguments in OPTIONS but those arguments are talked about and one has
  to go to SYNOPSIS to come to know the order of those arguments
  (e.g. git branch -m)

Should you wonder about the sorting, I tried to stick to the following
rules:

- Take the strings as they appear in the OPTIONS sections -- no splitting.
- Primarily sort by letters and numbers.
- Sort by the first option, then by the second.
  Arguments are only used within those groups.
- I changed the rules on the way, so there may be errors.

Disclaimer: because manually created this file isn't 100% correct but I
            gave my best.  On the way I noticed that sometimes options
            appear at unexpected places, so I for sure missed some.



At least this perhaps serves amusing purposes ;-)

Who knows, perhaps you think git-options(7) would be a valuable
addition.  I think it can be automatically generated with a moderate
amount of work.

Or the attached file could be used for some SoC micro-procect or the
like...

Dirk

[1] https://lore.kernel.org/git/ef5958e1-af3f-4869-b0e3-ff1448c0d73c@gmail.com/T/#t


[-- Attachment #2: git-options.txt --]
[-- Type: text/plain, Size: 76002 bytes --]

<args>...
        git-rev-parse(1)

<archive>/<branch>
        git-archimport(1)

base-name
        git-pack-objects(1)

<base> <rev1> <rev2>
        git-range-diff(1)

<branch>
        git-checkout(1)
        git-rebase(1)

<branchname>
        git-branch(1)

<command> [<args>]
        git(1)

<commit>...
        git-cherry-pick(1)
        git-merge(1)
        git-revert(1)

commit-id
        git-http-fetch(1)

<commit-ish>...
        git-describe(1)

<CVS-module>
        git-cvsimport(1)

<directory>
        git-clone(1)
        git-cvsserver(1)
        git-daemon(1)

<end>
        git-request-pull(1)

<file>
        git-ls-files(1)

<git-dir>
        git-receive-pack(1)

[<git-rev-list-args>...]
        git-fast-export(1)

<git-rev-list-args>
        git-bundle(1)

<group>
        git-fetch(1)

<head>
        git-cherry(1)

<head>...
        git-prune(1)

<limit>
        git-cherry(1)

<Maildir>
        git-mailsplit(1)

<mbox>
        git-mailsplit(1)

(<mbox>|<Maildir>)...
        git-am(1)

<msg>
        git-mailinfo(1)

<new-branch>
        git-checkout(1)

<newbranch>
        git-branch(1)

<object>
        git-cat-file(1)
        git-fsck(1)

<oldbranch>
        git-branch(1)

<patch>
        git-mailinfo(1)

<patch>...
        git-apply(1)

<pathspec>...
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-grep(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)

<path>
        git-archive(1)

[<path>...]
        git-ls-tree(1)

<path>...
        git-diff(1)
        git-diff-tree(1)
        gitk(1)
        git-log(1)
        git-reflog(1)

<paths>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

<pattern>...
        git-for-each-ref(1)

<patterns>...
        git-ls-remote(1)

<range1> <range2>
        git-range-diff(1)

[<refname>...]
        git-bundle(1)

<ref>...
        git-http-push(1)

<refs>...
        git-fetch-pack(1)

<refspec>
        git-fetch(1)
        git-pull(1)

<refspec>...
        git-push(1)

<repository>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-ls-remote(1)
        git-pull(1)
        git-push(1)

<rev1>...<rev2>
        git-range-diff(1)

<revision range>
        gitk(1)
        git-log(1)
        git-reflog(1)

<rev-list options>...
        git-filter-branch(1)

<socket-path>
        git-credential-cache--daemon(1)

<split options>
        git-commit-graph(1)

<start>
        git-request-pull(1)

<start-point>
        git-branch(1)
        git-checkout(1)

<tree>
        git-commit-tree(1)

<tree>...
        git-grep(1)

<tree-ish>
        git-archive(1)
        git-checkout(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-tree(1)

<tree-ish#>
        git-read-tree(1)

<type>
        git-cat-file(1)

<URL>
        git-request-pull(1)

<upstream>
        git-cherry(1)
        git-rebase(1)

-<n>
        git-format-patch(1)

-/ <path>
        git-p4(1)

-<num>, -C <num>, --context <num>
        git-grep(1)

-<number>, -n <number>, --max-count=<number>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

-0
        git-diff(1)

-1 --base, -2 --ours, -3 --theirs
        git-diff(1)
        git-diff-files(1)

-3, --3way
        git-apply(1)

-3, --3way, --no-3way
        git-am(1)

-4, --ipv4
        git-fetch(1)
        git-pull(1)
        git-push(1)

-6, --ipv6
        git-fetch(1)
        git-pull(1)
        git-push(1)

--8bit-encoding=<encoding>
        git-send-email(1)

-A
        git-repack(1)

-A <author-conv-file>
        git-cvsimport(1)

-A <num>, --after-context <num>
        git-grep(1)

-A, --all, --no-ignore-removal
        git-add(1)

-a
        git-archimport(1)
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-merge-index(1)
        git-repack(1)

-a, -c, -t
        git-http-fetch(1)

-a, --all
        git-branch(1)
        git-check-attr(1)
        git-checkout-index(1)
        git-commit(1)
        git-help(1)
        git-merge-base(1)

-a, --append
        git-fetch(1)
        git-pull(1)

-a, --text
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)

--abbrev[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-ls-files(1)
        git-ls-tree(1)

--abbrev=<n>
        git-blame(1)
        git-branch(1)
        git-describe(1)
        git-log(1)
        git-reflog(1)

--abbrev-commit
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--abbrev-ref[=(strict|loose)]
        git-rev-parse(1)

--abort
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-notes(1)
        git-rebase(1)
        git-revert(1)

--absolute-git-dir
        git-rev-parse(1)

--access-hook=<path>
        git-daemon(1)

--active-branches=<n>
        git-fast-import(1)

--add
        git-config(1)

--add-file=<file>
        git-archive(1)

--add-header=<header>
        git-format-patch(1)

--add-virtual-file=<path>:<content>
        git-archive(1)

--aggressive
        git-gc(1)
        git-read-tree(1)

--all
        git-describe(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-http-push(1)
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-name-rev(1)
        git-pack-objects(1)
        git-pack-redundant(1)
        git-pack-refs(1)
        git-pull(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)

--all, --branches
        git-push(1)

--all-match
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--all-progress
        git-pack-objects(1)

--all-progress-implied
        git-pack-objects(1)

--allow-binary-replacement, --binary
        git-apply(1)

--allow-empty
        git-am(1)
        git-apply(1)
        git-cherry-pick(1)
        git-commit(1)
        git-notes(1)

--allow-empty-message
        git-cherry-pick(1)
        git-commit(1)
        git-rebase(1)

--[no-]allow-onelevel
        git-check-ref-format(1)

--allow-override=<service>, --forbid-override=<service>
        git-daemon(1)

--allow-unknown-type
        git-cat-file(1)

--allow-unrelated-histories
        git-merge(1)
        git-merge-tree(1)
        git-pull(1)

--allow-unsafe-features
        git-fast-import(1)

--also-filter-submodules
        git-clone(1)

--alternate-refs
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--alt-odb
        git-pack-redundant(1)

--always
        git-describe(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-name-rev(1)

--amend
        git-commit(1)

--ancestry-path
        gitk(1)

--ancestry-path[=<commit>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--anchored=<text>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--and, --or, --not, ( ... )
        git-grep(1)

--annotate
        git-send-email(1)

--annotate-stdin
        git-name-rev(1)

--anonymize
        git-fast-export(1)

--anonymize-map=<from>[:<to>]

--append
        git-commit-graph(1)

--apply
        git-apply(1)
        git-rebase(1)

--argscmd=<command>
        gitk(1)

--atomic
        git-fetch(1)
        git-pull(1)

--[no-]atomic
        git-push(1)

--attach[=<boundary>]
        git-format-patch(1)

--attr-source=<tree-ish>
        git(1)

--auto
        git-gc(1)

--author Author Name <Author Email>
        git-quiltimport(1)

--author=<author>
        git-commit(1)

--author=<pattern>, --committer=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--author-date-order
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]auto-maintenance, --[no-]auto-gc
        git-fetch(1)

--autosquash, --no-autosquash
        git-rebase(1)

--autostash, --no-autostash
        git-merge(1)
        git-pull(1)
        git-rebase(1)

-B <new-branch>
        git-checkout(1)

-B <num>, --before-context <num>
        git-grep(1)

-B[<n>][/<m>], --break-rewrites[=[<n>][/<m>]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-b
        git-annotate(1)
        git-blame(1)
        git-mailinfo(1)
        git-mailsplit(1)

-b <branch-name>, --initial-branch=<branch-name>
        git-init(1)

-b <name>, --branch <name>
        git-clone(1)

-b <new-branch>
        git-checkout(1)

-b, --browser
        git-instaweb(1)

-b, --ignore-space-change
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-b, --write-bitmap-index
        git-repack(1)

--bare
        git(1)
        git-clone(1)
        git-init(1)
        git-p4(1)

--[no-]base[=<commit>]
        git-format-patch(1)

--base-path=<path>
        git-daemon(1)

--base-path <path>
        git-cvsserver(1)

--base-path-relaxed
        git-daemon(1)

--basic-regexp
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--bcc=<address>,...
        git-send-email(1)

--branch <branch>
        git-p4(1)

--branch <ref>
        git-p4(1)

--branches[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--branches[=<pattern>], --tags[=<pattern>], --remotes[=<pattern>]
        gitk(1)
        git-rev-parse(1)
        
--break
        git-grep(1)

--batch
        git-mktree(1)

--batch, --batch=<format>
        git-cat-file(1)

--batch-all-objects
        git-cat-file(1)

--batch-check, --batch-check=<format>
        git-cat-file(1)

--batch-command, --batch-command=<format>
        git-cat-file(1)

--big-file-threshold=<n>
        git-fast-import(1)

--binary
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--bisect
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--bisect-all
        git-rev-list(1)

--bisect-vars
        git-rev-list(1)

--[no-]bitmap
        git-multi-pack-index(1)

--blob <blob>
        git-config(1)

--bool, --int, --bool-or-int, --path, --expiry-date
        git-config(1)

--boundary
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--branch
        git-commit(1)

--buffer
        git-cat-file(1)

--build-fake-ancestor=<file>
        git-apply(1)

--bundle-uri=<uri>
        git-clone(1)

-C
        git-branch(1)

-C[<n>], --find-copies[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-C<n>
        git-apply(1)
        git-rebase(1)

-C[<num>]
        git-annotate(1)
        git-blame(1)

-C <commit>, --reuse-message=<commit>
        git-commit(1)

-C <object>, --reuse-message=<object>
        git-notes(1)

-C <path>
        git(1)

-C <target-dir>
        git-cvsimport(1)

-c
        git-blame(1)
        git-cvsexportcommit(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-c <commit>, --reedit-message=<commit>
        git-commit(1)

-c <key>=<value>, --config <key>=<value>
        git-clone(1)

-c <object>, --reedit-message=<object>
        git-notes(1)

-c <name>=<value>
        git(1)

-c, --cached
        git-ls-files(1)

-c, --cc
        git-diff-files(1)

-c, --config
        git-help(1)

-c, --copy
        git-branch(1)

-c, --count
        git-grep(1)

-c, --scissors
        git-am(1)

--cache
        git-fsck(1)

--cached
        git-apply(1)
        git-check-attr(1)
        git-diff-index(1)
        git-grep(1)
        git-rm(1)

--candidates=<n>
        git-describe(1)

--cat-blob-fd=<fd>
        git-fast-import(1)

--cc
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--cc=<address>,...
        git-send-email(1)

--cc=<email>
        git-format-patch(1)

--changed-paths
        git-commit-graph(1)

--changes-block-size <n>
        git-p4(1)

--changesfile <file>
        git-p4(1)

--check
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--check-self-contained-and-connected
        git-fetch-pack(1)
        git-index-pack(1)

--cherry
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--cherry-mark
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--cherry-pick
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--chmod=(+|-)x

--children
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--cleanup=<mode>
        git-cherry-pick(1)
        git-commit(1)
        git-merge(1)
        git-pull(1)
        git-revert(1)

--clear-decorations
        git-log(1)
        git-reflog(1)

--color[=<when>]
        git-branch(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-for-each-ref(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)

--color-by-age
        git-annotate(1)
        git-blame(1)

--color-moved[=<mode>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--color-moved-ws=<modes>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--color-lines
        git-annotate(1)
        git-blame(1)

--color-words[=<regex>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--column
        git-grep(1)

--column[=<options>], --no-column
        git-branch(1)

--combined-all-paths
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--command=<name>
        git-column(1)

--commit
        git-notes(1)

--commit (<sha1>|<sha1>..<sha1>)
        git-p4(1)

--commit, --no-commit
        git-merge(1)
        git-pull(1)

--commit-filter <command>
        git-filter-branch(1)

--commit-header
        git-rev-list(1)

--committer-date-is-author-date
        git-am(1)
        git-rebase(1)

--compact-summary
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--compose
        git-send-email(1)

--compose-encoding=<encoding>
        git-send-email(1)

--compression=<n>
        git-pack-objects(1)

--connectivity-only
        git-fsck(1)

--config=<config>
        git-for-each-repo(1)

--config-env=<name>=<envvar>
        git(1)

--conflict=(ask|skip|quit)
        git-p4(1)

--conflict=<style>
        git-checkout(1)
        git-restore(1)

--contains
        git-describe(1)

--contains [<commit>]
        git-branch(1)

--contains[=<object>]
        git-for-each-ref(1)

--contents <file>
        git-annotate(1)
        git-blame(1)

--continue
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--continue, -r, --resolved
        git-am(1)

--convert-graft-file
        git-replace(1)

--count
        git-rev-list(1)

--count=<count>
        git-for-each-ref(1)

--cover-from-description=<mode>
        git-format-patch(1)

--[no-]cover-letter
        git-format-patch(1)

--create-reflog
        git-branch(1)

--creation-factor=<percent>
        git-format-patch(1)
        git-range-diff(1)

--cruft
        git-pack-objects(1)
        git-repack(1)

--[no-]cruft
        git-gc(1)

--cruft-expiration=<approxidate>
        git-pack-objects(1)
        git-repack(1)

--cumulative
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--curl
        git-imap-send(1)

-D
        git-branch(1)

-D <depth>
        git-archimport(1)

-D, --irreversible-delete
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-d
        git-clean(1)
        git-cvsexportcommit(1)
        git-ls-tree(1)
        git-repack(1)

-d <CVSROOT>
        git-cvsimport(1)

-d <directory>
        git-filter-branch(1)

-d<prec>
        git-mailsplit(1)

-d, -D
        git-http-push(1)

-d, --delete
        git-branch(1)
        git-push(1)
        git-replace(1)

-d, --deleted
        git-ls-files(1)

-d, --detach
        git-checkout(1)

-d, --dir-diff
        git-difftool(1)

-d, --httpd
        git-instaweb(1)

--[no-]dangling
        git-fsck(1)

--date=<date>
        git-commit(1)

--date=<format>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--date <format>
        git-annotate(1)
        git-blame(1)

--date-format=<fmt>
        git-fast-import(1)

--date-order
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--dd
        git-log(1)
        git-reflog(1)

--debug
        git-credential-cache--daemon(1)
        git-describe(1)
        git-ls-files(1)

--deduplicate
        git-ls-files(1)

--no-decorate, --decorate[=short|full|auto|no]
        git-log(1)
        git-reflog(1)

--decorate-refs=<pattern>, --decorate-refs-exclude=<pattern>
        git-log(1)
        git-reflog(1)

--deepen=<depth>
        git-fetch(1)
        git-pull(1)

--deepen-relative
        git-fetch-pack(1)

--default <arg>
        git-rev-parse(1)

--default <value>
        git-config(1)

--default-prefix
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--delta-base-offset
        git-pack-objects(1)

--delta-islands
        git-pack-objects(1)

--dense
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--depth <depth>
        git-clone(1)
        git-fetch(1)

--depth=<depth>
        git-pull(1)

--depth=<n>
        git-fast-import(1)
        git-fetch-pack(1)

--description-file=<file>
        git-format-patch(1)

--destination <directory>
        git-p4(1)

--detach
        git-daemon(1)

--detect-branches
        git-p4(1)

--detect-labels
        git-p4(1)

--developer-interfaces
        git-help(1)

--diff3
        git-merge-file(1)

--diff-algorithm={patience|minimal|histogram|myers}
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--diff-filter=[(A|C|D|M|R|T|U|X|B)...[*]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--diff-merges=<format>
        git-log(1)
        git-reflog(1)

--directory
        git-ls-files(1)

--directory=<root>
        git-apply(1)

--dirstat-by-file[=<param1,param2>...]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--dirty[=<mark>], --broken[=<mark>]
        git-describe(1)

--disable-p4sync
        git-p4(1)

--disable-rebase
        git-p4(1)

--disambiguate=<prefix>
        git-rev-parse(1)

--disk-usage, --disk-usage=human
        git-rev-list(1)

--dissociate
        git-clone(1)

--done
        git-fast-import(1)

--do-walk
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--dry-run
        git-commit(1)
        git-fetch(1)
        git-http-push(1)
        git-pull(1)

--dst-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-E, --extended-regexp
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

-E, --extended-regexp, -G, --basic-regexp
        git-grep(1)

-e
        git-cat-file(1)
        git-cherry-pick(1)
        git-grep(1)

-e, --edit
        git-add(1)
        git-commit(1)
        git-config(1)
        git-revert(1)

-e, --show-email
        git-blame(1)

-e <pattern>, --exclude=<pattern>
        git-clean(1)

--edit <object>
        git-replace(1)

--edit, -e, --no-edit
        git-merge(1)
        git-pull(1)

--edit-description
        git-branch(1)

--edit-todo
        git-rebase(1)

--empty
        git-read-tree(1)

--empty=(drop|keep|ask)
        git-rebase(1)

--empty=(stop|drop|keep)
        git-am(1)

--enable=<service>, --disable=<service>
        git-daemon(1)

--encode-email-headers, --no-encode-email-headers
        git-format-patch(1)

--encoding=<encoding>
        git-annotate(1)
        git-blame(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-mailinfo(1)
        git-rev-list(1)

--env-filter <command>
        git-filter-branch(1)

--eol
        git-ls-files(1)

--error-unmatch
        git-ls-files(1)

--exact-match
        git-describe(1)

--exclude <pattern>
        git-describe(1)
        git-pack-refs(1)

--exclude=<glob-pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)

--exclude=<path-pattern>
        git-apply(1)

--exclude=<pattern>
        git-for-each-ref(1)
        git-name-rev(1)

--exclude-first-parent-only
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--exclude-hidden=[fetch|receive|uploadpack]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)

--exclude-per-directory=<file>
        git-ls-files(1)

--exclude-promisor-objects
        git-pack-objects(1)
        git-rev-list(1)

--exclude-standard
        git-grep(1)
        git-ls-files(1)

--exec=<git-upload-archive>
        git-archive(1)

--exec=<git-upload-pack>
        git-fetch-pack(1)

--exec-path[=<path>]
        git(1)

--exit-code
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-remote(1)

--expand-tabs=<n>, --expand-tabs, --no-expand-tabs
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--expire <time>
        git-prune(1)

--expire=<time>
        git-reflog(1)

--expire-to=<dir>
        git-repack(1)

--expire-unreachable=<time>
        git-reflog(1)

--export-all
        git-cvsserver(1)
        git-daemon(1)

--export-labels
        git-p4(1)

--export-marks=<file>
        git-fast-export(1)
        git-fast-import(1)

--export-pack-edges=<file>
        git-fast-import(1)

--ext-diff
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-F
        git-repack(1)

-F <file>
        git-commit-tree(1)

-F <file>, --file <file>
        git-fmt-merge-msg(1)
        git-merge(1)

-F <file>, --file=<file>
        git-commit(1)
        git-notes(1)

-F, --fixed-strings
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

-f
        git-archimport(1)
        git-cvsexportcommit(1)
        git-ls-files(1)
        git-repack(1)

-f <file>
        git-grep(1)

-f<nn>
        git-mailsplit(1)

-f, --force
        git-add(1)
        git-branch(1)
        git-checkout(1)
        git-checkout-index(1)
        git-clean(1)
        git-fetch(1)
        git-filter-branch(1)
        git-mv(1)
        git-notes(1)
        git-pull(1)
        git-push(1)
        git-replace(1)
        git-rm(1)

-f, --show-name
        git-blame(1)

-f <config-file>, --file <config-file>
        git-config(1)

--fake-missing-tagger
        git-fast-export(1)

--ff
        git-cherry-pick(1)

--ff, --no-ff, --ff-only
        git-merge(1)

--ff, --no-ff
        git-pull(1)

--ff-only
        git-pull(1)

--file=<path>
        git-credential-store(1)

--filter=<filter-spec>
        git-clone(1)
        git-pack-objects(1)
        git-repack(1)
        git-rev-list(1)

--filename-max-length=<n>
        git-format-patch(1)

--filter-print-omitted
        git-rev-list(1)

--filter-provided-objects
        git-rev-list(1)

--filters
        git-cat-file(1)

--filter-to=<dir>
        git-repack(1)

--find-copies-harder
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--find-object=<object-id>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--first-parent
        git-bisect(1)
        git-blame(1)
        git-annotate(1)
        git-describe(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--fixed-value
        git-config(1)

--fix-thin
        git-index-pack(1)

--fixup=[(amend|reword):]<commit>
        git-commit(1)

--flags
        git-rev-parse(1)

--follow
        git-log(1)
        git-reflog(1)

--follow-symlinks
        git-cat-file(1)

--follow-tags
        git-push(1)

--force
        git-fast-import(1)
        git-gc(1)
        git-http-push(1)

--[no-]force-if-includes
        git-push(1)

--[no-]force-in-body-from
        git-format-patch(1)

--[no-]force-with-lease, --force-with-lease=<refname>, --force-with-lease=<refname>:<expect>
        git-push(1)

--fork-point
        git-merge-base(1)

--fork-point, --no-fork-point
        git-rebase(1)

--format <format>
        git-branch(1)

--format=<fmt>
        git-archive(1)

--format=<format>
        git-for-each-ref(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-replace(1)

--from, --from=<ident>
        git-format-patch(1)

--from=<address>
        git-send-email(1)

--fsck-objects
        git-index-pack(1)

--full
        git-fsck(1)

--full-diff
        git-log(1)
        git-reflog(1)

--full-history
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--full-index
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--full-name
        git-grep(1)
        git-ls-files(1)
        git-ls-tree(1)

--full-tree
        git-fast-export(1)
        git-ls-tree(1)

-G<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-g<factor>, --geometric=<factor>
        git-repack(1)

-g, --gui
        git-mergetool(1)

-g, --[no-]gui
        git-difftool(1)

-g, --guides
        git-help(1)

-g, --walk-reflogs
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--get
        git-config(1)

--get-all
        git-config(1)

--get-color <name> [<default>]
        git-config(1)

--get-colorbool <name> [<stdout-is-tty>]
        git-config(1)

--get-regexp
        git-config(1)

--get-url
        git-ls-remote(1)

--get-urlmatch <name> <URL>
        git-config(1)

--git-dir
        git-rev-parse(1)

--git-dir <dir>
        git-p4(1)

--git-dir=<path>
        git(1)

--git-common-dir
        git-rev-parse(1)

--git-path <path>
        git-rev-parse(1)

--glob=<glob-pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--glob=pattern
        git-rev-parse(1)

--glob-pathspecs
        git(1)

--global
        git-config(1)

--graft <commit> [<parent>...]
        git-replace(1)

--graph
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--grep=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--grep-reflog=<pattern>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--guess, --no-guess
        git-checkout(1)

-H, --human-readable
        git-count-objects(1)

-h
        git-annotate(1)
        git-archimport(1)
        git-blame(1)
        git-cvsimport(1)

-h, -H
        git-grep(1)

-h, --heads, -t, --tags
        git-ls-remote(1)

-h, --help
        git(1)

-h, -H, --help
        git-cvsserver(1)

--header
        git-rev-list(1)

--heading
        git-grep(1)

--histogram
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--honor-pack-keep
        git-pack-objects(1)

--html-path
        git(1)

--http-backend-info-refs
        git-receive-pack(1)

-I
        git-grep(1)

-I<regex>, --ignore-matching-lines=<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-i
        git-cvsimport(1)
        git-read-tree(1)

-i, --delta-islands
        git-repack(1)

-i, --ignore-case
        git-branch(1)
        git-grep(1)

-i, --ignored
        git-ls-files(1)

-i, --include
        git-commit(1)

-i, --info
        git-help(1)

-i, --interactive
        git-add(1)
        git-am(1)
        git-clean(1)
        git-rebase(1)

-i, --regexp-ignore-case
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--icase-pathspecs
        git(1)

--if-exists <action>, --no-if-exists
        git-interpret-trailers(1)

--if-missing <action>, --no-if-missing
        git-interpret-trailers(1)

--ignore-blank-lines
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--ignore-case
        git-for-each-ref(1)

--ignore-cr-at-eol
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--ignore-date
        git-am(1)

--ignore-date, --reset-author-date
        git-rebase(1)

--ignore-errors
        git-add(1)

--ignore-if-in-upstream
        git-format-patch(1)

--ignore-missing
        git-add(1)
        git-hook(1)
        git-log(1)
        git-notes(1)
        git-reflog(1)
        git-rev-list(1)

--ignore-other-worktrees
        git-checkout(1)

--ignore-rev <rev>
        git-annotate(1)
        git-blame(1)

--ignore-revs-file <file>
        git-annotate(1)
        git-blame(1)

--ignore-skip-worktree-bits
        git-checkout(1)
        git-checkout-index(1)
        git-restore(1)

--ignore-space-at-eol
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--ignore-space-change, --ignore-whitespace
        git-apply(1)

--ignore-submodules[=<when>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--ignore-unmatch
        git-rm(1)

--ignore-unmerged
        git-restore(1)

--ignore-whitespace
        git-rebase(1)

--import-labels
        git-p4(1)

--import-local
        git-p4(1)

--import-marks=<file>
        git-fast-export(1)
        git-fast-import(1)

--import-marks-if-exists=<file>
        git-fast-import(1)

--inaccurate-eof
        git-apply(1)

--include <pattern>
        git-pack-refs(1)

--include=<path-pattern>
        git-apply(1)

--include-tag
        git-fetch-pack(1)
        git-pack-objects(1)

--[no-]includes
        git-config(1)

--in-commit-order
        git-rev-list(1)

--incremental
        git-annotate(1)
        git-blame(1)
        git-pack-objects(1)

--indent=<string>
        git-column(1)

--indent-heuristic
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--independent
        git-merge-base(1)

--index
        git-apply(1)

--indexed-objects
        git-rev-list(1)

--index-filter <command>
        git-filter-branch(1)

--index-output=<file>
        git-read-tree(1)

--index-pack-args=<args>
        git-http-fetch(1)

--index-version=<version>[,<offset>]
        git-index-pack(1)
        git-pack-objects(1)

--inetd
        git-daemon(1)

--info-path
        git(1)

--[no-]informative-errors
        git-daemon(1)

--init-timeout=<n>
        git-daemon(1)

--inline[=<boundary>]
        git-format-patch(1)

--in-place
        git-interpret-trailers(1)

--in-reply-to=<identifier>
        git-send-email(1)

--in-reply-to=<message id>
        git-format-patch(1)

--intent-to-add
        git-apply(1)

--interdiff=<previous>
        git-format-patch(1)

--inter-hunk-context=<lines>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--interpolated-path=<pathtemplate>
        git-daemon(1)

--into-name <branch>
        git-fmt-merge-msg(1)
        git-merge(1)

--invert-grep
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--is-ancestor
        git-merge-base(1)

--is-bare-repository
        git-rev-parse(1)

--is-inside-git-dir
        git-rev-parse(1)

--is-inside-work-tree
        git-rev-parse(1)

--is-shallow-repository
        git-rev-parse(1)

--ita-invisible-in-index
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-j, --jobs=<n>
        git-fetch(1)
        git-pull(1)

-j <n>, --jobs <n>
        git-clone(1)

-k
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-mailinfo(1)
        git-mv(1)

-k, --keep
        git-am(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

-k, --keep-subject
        git-format-patch(1)

-k, --keep-unreachable
        git-repack(1)

-k, --killed
        git-ls-files(1)

--keep
        git-index-pack(1)

--keep=<msg>
        git-index-pack(1)

--keep-base
        git-rebase(1)

--keep-cr
        git-mailsplit(1)

--[no-]keep-cr
        git-am(1)

--keep-dashdash
        git-rev-parse(1)

--keep-largest-pack
        git-gc(1)

--keep-non-patch
        git-am(1)
        git-quiltimport(1)

--keep-pack=<pack-name>
        git-pack-objects(1)
        git-repack(1)

--keep-path
        git-p4(1)

--keep-redundant-commits
        git-cherry-pick(1)

--keep-true-parents
        git-pack-objects(1)

--keep-unreachable
        git-pack-objects(1)

-L <start>,<end>, -L :<funcname>
        git-annotate(1)
        git-blame(1)

-L<start>,<end>:<file>, -L:<funcname>:<file>
        gitk(1)
        git-log(1)
        git-reflog(1)

-L <label>
        git-merge-file(1)

-L <limit>
        git-cvsimport(1)

-l
        git-annotate(1)
        git-blame(1)
        git-checkout(1)
        git-repack(1)

-l<num>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-l, --list
        git-archive(1)
        git-branch(1)
        git-config(1)

-l <pattern>, --list <pattern>
        git-replace(1)

-l, --local
        git-clone(1)
        git-instaweb(1)

-l, --long
        git-ls-tree(1)

-l, --files-with-matches, --name-only, -L, --files-without-match
        git-grep(1)

--left-only
        git-range-diff(1)

--left-only, --right-only
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--left-right
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--line-porcelain
        git-annotate(1)
        git-blame(1)

--line-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--list-cmds=group[,group...]
        git(1)

--listen=<host_or_ipaddr>
        git-daemon(1)

--literally
        git-hash-object(1)

--literal-pathspecs
        git(1)

--local
        git-config(1)
        git-pack-objects(1)

--local-env-vars
        git-rev-parse(1)

--log[=<n>]
        git-fmt-merge-msg(1)

--log[=<n>], --no-log
        git-merge(1)
        git-pull(1)

--log-destination=<destination>
        git-daemon(1)

--log-size
        git-log(1)
        git-reflog(1)

--long
        git-commit(1)
        git-describe(1)

--lost-found
        git-fsck(1)

-M
        git-branch(1)
        git-p4(1)

-M[<n>], --find-renames[=<n>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-M[<num>]
        git-annotate(1)
        git-blame(1)

-M <regex>
        git-cvsimport(1)

-M, -C
        git-fast-export(1)

-m
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-read-tree(1)

-m <msg>
        git-merge(1)

-m <message>
        git-commit-tree(1)

-m parent-number, --mainline parent-number
        git-revert(1)

-m <parent-number>, --mainline <parent-number>
        git-cherry-pick(1)

-m, --man
        git-help(1)

-m <num>, --max-count <num>
        git-grep(1)

-m, --merge
        git-checkout(1)
        git-rebase(1)
        git-restore(1)

-m <message>, --message <message>
        git-fmt-merge-msg(1)

-m <msg>, --message=<msg>
        git-commit(1)
        git-notes(1)

-m, --message-id
        git-am(1)
        git-mailinfo(1)

-m, --modified
        git-ls-files(1)

-m, --module-path
        git-instaweb(1)

-m, --move
        git-branch(1)

-m, --write-midx
        git-repack(1)

--[no-]mailmap, --[no-]use-mailmap
        git-cat-file(1)
        git-log(1)
        git-reflog(1)

--man-path
        git(1)

--mark-tags
        git-fast-export(1)

--match <pattern>
        git-describe(1)

--max-age=<timestamp>, --min-age=<timestamp>
        git-rev-list(1)

--max-changes <n>
        git-p4(1)

--max-connections=<n>
        git-daemon(1)

--max-cruft-size=<n>
        git-gc(1)
        git-repack(1)

--max-depth <depth>
        git-grep(1)

--max-input-size=<size>
        git-index-pack(1)

--[no-]max-new-filters <n>
        git-commit-graph(1)

--max-pack-size=<n>
        git-fast-import(1)
        git-pack-objects(1)
        git-repack(1)

--mboxrd
        git-mailsplit(1)

--merge
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--merge-base
        git-diff-index(1)
        git-diff-tree(1)

--merge-base=<commit>
        git-merge-tree(1)

--merged [<commit>]
        git-branch(1)

--merged[=<object>]

--merges
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]messages
        git-merge-tree(1)

--minimal
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--min-parents=<number>, --max-parents=<number>, --no-min-parents, --no-max-parents
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--mirror
        git-clone(1)
        git-push(1)

--missing
        git-mktree(1)

--missing=<missing-action>
        git-pack-objects(1)
        git-rev-list(1)

--mode=<mode>
        git-column(1)

--mode=(stats|all)
        git-diagnose(1)

--msg-filter <command>
        git-filter-branch(1)

--mtime=<time>
        git-archive(1)

--multiple
        git-fetch(1)

-N, --intent-to-add
        git-add(1)

-N, --no-numbered
        git-format-patch(1)

-n
        git-mailinfo(1)
        git-repack(1)

-n, --dry-run
        git-add(1)
        git-clean(1)
        git-mv(1)
        git-notes(1)
        git-p4(1)
        git-prune(1)
        git-prune-packed(1)
        git-push(1)
        git-quiltimport(1)
        git-read-tree(1)
        git-reflog(1)
        git-rm(1)

-n, --line-number
        git-grep(1)

-n, --no-checkout
        git-clone(1)

-n, --no-commit
        git-cherry-pick(1)
        git-revert(1)

-n, --no-create
        git-checkout-index(1)

--non-empty
        git-pack-objects(1)

-n, --non-matching
        git-check-ignore(1)

-n, --no-stat
        git-rebase(1)

-n, --no-tags
        git-fetch(1)

-n, --[no-]verify
        git-commit(1)

-n, --no-verify
        git-am(1)

-n, --numbered
        git-format-patch(1)

-n, --show-number
        git-blame(1)

--name-objects
        git-fsck(1)

--name-only
        git-config(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-merge-tree(1)
        git-name-rev(1)

--name-only, --name-status
        git-ls-tree(1)

--name-status
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--namespace=<path>
        git(1)

--negotiate-only
        git-fetch(1)
        git-pull(1)

--negotiation-tip=<commit|glob>
        git-fetch(1)
        git-pull(1)

--nl=<string>
        git-column(1)

--no-abbrev
        git-branch(1)

--no-abbrev-commit
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--no-add
        git-apply(1)

--no-all, --ignore-removal
        git-add(1)

--no-aliases
        git-help(1)

--no-attach
        git-format-patch(1)

--no-binary
        git-format-patch(1)

--no-checkout
        git-bisect(1)

--no-color
        git-branch(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)

--no-color-moved
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--no-color-moved-ws
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--no-commit-header
        git-rev-list(1)

--no-commit-id
        git-diff-tree(1)

--no-contains [<commit>]
        git-branch(1)

--no-contains[=<object>]
        git-for-each-ref(1)

--no-curl
        git-imap-send(1)

--no-data
        git-fast-export(1)

--no-diagnose, --diagnose[=<mode>]
        git-bugreport(1)

--no-diff-merges
        git-log(1)
        git-reflog(1)

--no-divider
        git-interpret-trailers(1)

--no-dual-color
        git-range-diff(1)

--no-edit
        git-commit(1)
        git-revert(1)

--no-empty-directory
        git-ls-files(1)

--no-exclude-standard
        git-grep(1)

--no-ext-diff
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--no-external-commands
        git-help(1)

--no-ff, --force-rebase, -f
        git-rebase(1)

--no-filter
        git-pack-objects(1)
        git-rev-list(1)

--no-filters
        git-hash-object(1)

--no-flags
        git-rev-parse(1)

--noglob-pathspecs
        git(1)

--no-gui
        git-mergetool(1)

--no-hardlinks
        git-clone(1)

--no-indent-heuristic
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--no-index
        git-check-ignore(1)
        git-grep(1)

--no-keep-empty, --keep-empty
        git-rebase(1)

--no-log
        git-fmt-merge-msg(1)

--no-merged [<commit>]
        git-branch(1)

--no-merged[=<object>]
        git-for-each-ref(1)

--no-merges
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--no-message-id
        git-am(1)

--no-notes
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--no-object-names
        git-rev-list(1)

--no-optional-locks
        git(1)

--no-post-rewrite
        git-commit(1)

--no-prefix
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--no-progress
        git-fetch-pack(1)

--no-prune
        git-gc(1)
        git-pack-refs(1)

--no-rebase
        git-pull(1)

--no-recurse-submodules
        git-fetch(1)

--no-recurse-submodules, --recurse-submodules=check|on-demand|only|no
        git-push(1)

--no-recursive
        git-grep(1)

--no-reuse-delta
        git-pack-objects(1)

--no-reuse-object
        git-pack-objects(1)

--no-reflogs
        git-fsck(1)

--no-renames
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--no-replace-objects
        git(1)

--no-revs
        git-rev-parse(1)

--no-scissors
        git-am(1)
        git-mailinfo(1)

--no-show-forced-updates
        git-fetch(1)
        git-pull(1)

--no-sparse-checkout
        git-read-tree(1)

--no-status
        git-commit(1)

--no-tags
        git-clone(1)
        git-pull(1)

--no-textconv
        git-grep(1)

--no-track
        git-branch(1)
        git-checkout(1)

--no-type
        git-config(1)

--no-undefined
        git-name-rev(1)

--no-utf8
        git-am(1)

--no-verify
        git-rebase(1)

--no-walk[=(sorted|unsorted)]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--no-warn-embedded-repo
        git-add(1)

--normalize
        git-check-ref-format(1)

--not
        git-log(1)
        git-reflog(1)
        git-rev-list(1)
        git-rev-parse(1)

--notes[=<ref>]
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--[no-]notes[=<ref>]
        git-range-diff(1)

--notes[=<ref>], --no-notes
        git-format-patch(1)

--numbered-files
        git-format-patch(1)

--numstat
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-o<directory>
        git-mailsplit(1)

-O<orderfile>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)
        git-mergetool(1)

-O[<pager>], --open-files-in-pager[=<pager>]
        git-grep(1)

-o
        git-archimport(1)
        git-merge-index(1)

-o <branch-for-HEAD>
        git-cvsimport(1)

-o <index-file>
        git-index-pack(1)

-o, --only
        git-commit(1)

-o, --only-matching
        git-grep(1)

-o <dir>, --output-directory <dir>
        git-format-patch(1)

-o <name>, --origin <name>
        git-clone(1)

-o, --others
        git-ls-files(1)

-o <file>, --output=<file>
        git-archive(1)

-o <option>, --push-option=<option>
        git-push(1)

-o <option>, --server-option=<option>
        git-fetch(1)
        git-ls-remote(1)
        git-pull(1)

-o <path>, --output-directory <path>
        git-bugreport(1)
        git-diagnose(1)

--object-dir
        git-commit-graph(1)

--object-dir=<dir>
        git-multi-pack-index(1)

--object-format=<format>
        git-init(1)

--object-format=<hash-algorithm>
        git-index-pack(1)

--object-id
        git-merge-file(1)

--object-names
        git-rev-list(1)

--object-only
        git-ls-tree(1)

--objects
        git-rev-list(1)

--objects-edge
        git-rev-list(1)

--objects-edge-aggressive
        git-rev-list(1)

--octopus
        git-merge-base(1)

--omit-empty
        git-branch(1)
        git-for-each-ref(1)

--oneline
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--only-input
        git-interpret-trailers(1)

--only-trailers
        git-interpret-trailers(1)

--onto
        git-rebase(1)

--origin <commit>
        git-p4(1)

--original <namespace>
        git-filter-branch(1)

--orphan <new-branch>
        git-checkout(1)

--ours, --theirs
        git-checkout(1)
        git-restore(1)

--ours, --theirs, --union
        git-merge-file(1)

--output=<file>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--output-indicator-new=<char>, --output-indicator-old=<char>, --output-indicator-context=<char>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--overlay, --no-overlay
        git-checkout(1)
        git-restore(1)

--overwrite-ignore, --no-overwrite-ignore
        git-checkout(1)
        git-merge(1)

-P
        git-cvsexportcommit(1)

-P <cvsps-output-file>
        git-cvsimport(1)

-P, --no-pager
        git(1)

-P, --perl-regexp
        git-grep(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

-P, --prune-tags
        git-fetch(1)

-p
        git-cat-file(1)
        git-cvsexportcommit(1)
        git-merge-file(1)
        git-request-pull(1)

-p <options-for-cvsps>
        git-cvsimport(1)

-p <parent>
        git-commit-tree(1)

-p, --no-stat
        git-format-patch(1)

-p, --patch
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-restore(1)

-p, -u, --patch
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-p, --paginate
        git(1)

-p<n>
        git-apply(1)

-p, --porcelain
        git-annotate(1)
        git-blame(1)

-p, --port
        git-instaweb(1)

-p, --prune
        git-fetch(1)
        git-pull(1)

-p, --show-function
        git-grep(1)

--packfile=<hash>
        git-http-fetch(1)

--pack-kept-objects
        git-repack(1)

--pack-loose-unreachable
        git-pack-objects(1)

--padding=<N>
        git-column(1)

--parent-filter <command>
        git-filter-branch(1)

--parents
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--parse
        git-interpret-trailers(1)

--parseopt
        git-rev-parse(1)

--patches <dir>
        git-quiltimport(1)

--patch-format
        git-am(1)

--patch-with-raw
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--patch-with-stat
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--patience
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--path
        git-hash-object(1)

--path=<path>
        git-cat-file(1)

--path-format=(absolute|relative)
        git-rev-parse(1)

--pathspec-file-nul
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)

--pathspec-from-file=<file>
        git-add(1)
        git-checkout(1)
        git-commit(1)
        git-reset(1)
        git-restore(1)
        git-rm(1)

--pickaxe-all
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--pickaxe-regex
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--pid-file=<file>
        git-daemon(1)

--points-at <object>
        git-branch(1)

--points-at=<object>

--porcelain
        git-commit(1)
        git-fetch(1)
        git-pull(1)
        git-push(1)

--port=<n>
        git-daemon(1)

--preferred-pack=<pack>
        git-multi-pack-index(1)

--prefetch
        git-fetch(1)
        git-pull(1)

--prefix <arg>
        git-rev-parse(1)

--prefix=<prefix>/
        git-archive(1)

--prefix=<prefix>
        git-read-tree(1)

--prefix=<string>
        git-checkout-index(1)

--prepare-p4-only
        git-p4(1)

--preserve-user
        git-p4(1)

--pretty[=<format>], --format=<format>
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--progress
        git-bundle(1)
        git-clone(1)
        git-fetch(1)
        git-format-patch(1)
        git-pack-objects(1)
        git-prune(1)
        git-pull(1)
        git-push(1)

--[no-]progress
        git-annotate(1)
        git-blame(1)
        git-commit-graph(1)
        git-commit-graph(1)
        git-fsck(1)
        git-multi-pack-index(1)

--progress=<header>
        git-rev-list(1)

--progress=<n>
        git-fast-export(1)

--progress, --no-progress
        git-checkout(1)
        git-merge(1)
        git-restore(1)

--progress-title
        git-index-pack(1)

--promisor[=<message>]
        git-index-pack(1)

--prompt
        git-difftool(1)
        git-mergetool(1)

--prune
        git-push(1)

--prune=<date>
        git-gc(1)

--prune-empty
        git-filter-branch(1)

-q
        git-diff-files(1)
        git-merge-file(1)
        git-merge-index(1)
        git-pack-objects(1)

-q, --quiet
        git-am(1)
        git-apply(1)
        git-branch(1)
        git-bundle(1)
        git-check-ignore(1)
        git-checkout(1)
        git-checkout-index(1)
        git-clean(1)
        git-clone(1)
        git-commit(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-format-patch(1)
        git-grep(1)
        git-imap-send(1)
        git-init(1)
        git-ls-remote(1)
        git-merge(1)
        git-notes(1)
        git-prune-packed(1)
        git-pull(1)
        git-push(1)
        git-read-tree(1)
        git-rebase(1)
        git-repack(1)
        git-reset(1)
        git-restore(1)
        git-rev-parse(1)
        git-rm(1)

--quiet
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-fast-import(1)
        git-gc(1)
        git-rev-list(1)

--quit
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--quoted-cr=<action>
        git-am(1)
        git-mailinfo(1)

-R
        git-cvsimport(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-R, --reverse
        git-apply(1)

-r
        git-cherry-pick(1)
        git-diff-tree(1)
        git-ls-tree(1)
        git-rm(1)

-r, --rebase[=false|true|merges|interactive]
        git-pull(1)

-r, --rebase-merges[=(rebase-cousins|no-rebase-cousins)], --no-rebase-merges
        git-rebase(1)

-r, --recursive
        git-grep(1)

-r, --remotes
        git-branch(1)

-r <remote>
        git-cvsimport(1)

--range-diff=<previous>
        git-format-patch(1)

--raw
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-replace(1)

--raw-mode=<n>
        git-column(1)

--reachable
        git-commit-graph(1)

--reapply-cherry-picks, --no-reapply-cherry-picks
        git-rebase(1)

--receive-pack=<git-receive-pack>, --exec=<git-receive-pack>
        git-push(1)

--recount
        git-apply(1)

--recover
        git-http-fetch(1)

--recurse-submodules
        git-branch(1)
        git-grep(1)
        git-ls-files(1)

--[no-]recurse-submodules
        git-read-tree(1)

--recurse-submodules[=<pathspec>]
        git-clone(1)

--recurse-submodules[=yes|on-demand|no]
        git-fetch(1)

--recurse-submodules, --no-recurse-submodule
        git-checkout(1)
        git-restore(1)

--recurse-submodules-default=[yes|on-demand]
        git-fetch(1)

--[no-]recurse-submodules[=yes|on-demand|no]
        git-pull(1)

--reencode=(yes|no|abort)
        git-fast-export(1)

--ref <ref>
        git-notes(1)

--reference
        git-revert(1)

--reference-excluded-parents
        git-fast-export(1)

--reference[-if-able] <repository>
        git-clone(1)

--refetch
        git-fetch(1)
        git-fetch-pack(1)

--reflog
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--refmap=<refspec>
        git-fetch(1)
        git-pull(1)

--refresh
        git-add(1)

--refresh, --no-refresh
        git-reset(1)

--refs
        git-ls-remote(1)

--refs=<pattern>
        git-name-rev(1)

--refspec
        git-fast-export(1)

--refspec-pattern
        git-check-ref-format(1)

--refs-snapshot=<path>
        git-multi-pack-index(1)

--reject
        git-apply(1)

--[no-]reject-shallow
        git-clone(1)

--relative[=<path>], --no-relative
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--relative-date
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]relative-marks
        git-fast-import(1)

--remerge-diff
        git-log(1)
        git-reflog(1)

--remote=<repo>
        git-archive(1)

--remotes[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]remote-submodules
        git-clone(1)

--remove-empty
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--remove-section
        git-config(1)

--[no-]rename-empty
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--rename-section
        git-config(1)

--renormalize
        git-add(1)

--replace-all
        git-config(1)

--reply-to=<address>
        git-send-email(1)

--repo=<repository>
        git-push(1)

--rerere-autoupdate, --no-rerere-autoupdate
        git-am(1)
        git-cherry-pick(1)
        git-merge(1)
        git-rebase(1)
        git-revert(1)

--reschedule-failed-exec, --no-reschedule-failed-exec
        git-rebase(1)

--reset
        git-read-tree(1)

--reset-author
        git-commit(1)

--resolve-git-dir <path>
        git-rev-parse(1)

--resolvemsg=<msg>
        git-am(1)

--resolve-undo
        git-ls-files(1)

--restart
        git-instaweb(1)

--reuseaddr
        git-daemon(1)

--reverse
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--reverse <rev>..<rev>
        git-annotate(1)
        git-blame(1)

--[no-]rev-index
        git-index-pack(1)

--revs
        git-pack-objects(1)

--revs-only
        git-rev-parse(1)

--rewrite
        git-reflog(1)

--rewrite-submodules-from=<name>:<file>, --rewrite-submodules-to=<name>:<file>
        git-fast-import(1)

--rfc
        git-format-patch(1)

--right-only
        git-range-diff(1)

--root
        git-annotate(1)
        git-blame(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-fsck(1)
        git-rebase(1)

--rotate-to=<file>
        git-difftool(1)

-S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign
        git-am(1)
        git-cherry-pick(1)
        git-commit(1)
        git-commit-tree(1)
        git-merge(1)
        git-pull(1)
        git-rebase(1)
        git-revert(1)

-S <regex>
        git-cvsimport(1)

-S <revs-file>
        git-annotate(1)
        git-blame(1)

-S<string>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-s
        git-blame(1)
        git-cat-file(1)
        git-diff-tree(1)

-s <subst>
        git-cvsimport(1)

-s, --no-patch
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-s, --shared
        git-clone(1)

-s, --signoff
        git-am(1)
        git-cherry-pick(1)
        git-format-patch(1)
        git-revert(1)

-s, --signoff, --no-signoff
        git-commit(1)

-s, --stage
        git-ls-files(1)

-s <strategy>, --strategy=<strategy>
        git-merge(1)
        git-notes(1)
        git-pull(1)
        git-rebase(1)

-s <format>, --suffix <format>
        git-bugreport(1)
        git-diagnose(1)

-s <tree>, --source=<tree>
        git-restore(1)

--scissors
        git-mailinfo(1)

--score-debug
        git-blame(1)

--select-commit=<ref>
        gitk(1)

--series <file>
        git-quiltimport(1)

--server-option=<option>
        git-clone(1)

--separate-git-dir=<git-dir>
        git-clone(1)
        git-init(1)

--[no-]separator, --separator=<paragraph-break>
        git-notes(1)

--set-upstream
        git-branch(1)
        git-fetch(1)
        git-pull(1)

--setup <command>
        git-filter-branch(1)

--shallow
        git-commit-graph(1)
        git-pack-objects(1)

--shallow-exclude=<revision>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

--shallow-since=<date>
        git-clone(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-pull(1)

--[no-]shallow-submodules
        git-clone(1)

--shared[=(false|true|umask|group|all|world|everybody|<perm>)]
        git-init(1)

--shared-index-path
        git-rev-parse(1)

--shell, --perl, --python, --tcl
        git-for-each-ref(1)

--shelve
        git-p4(1)

--short
        git-commit(1)

--short[=length]
        git-rev-parse(1)

--shortstat
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--show-cdup
        git-rev-parse(1)

--show-current
        git-branch(1)

--show-current-patch
        git-rebase(1)

--show-current-patch[=(diff|raw)]
        git-am(1)

--show-forced-updates
        git-fetch(1)
        git-pull(1)

--show-linear-break[=<barrier>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--show-notes[=<ref>], --[no-]standard-notes
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--show-notes-by-default
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--show-object-format[=(storage|input|output)]
        git-rev-parse(1)

--show-origin
        git-config(1)

--show-original-ids
        git-fast-export(1)

--show-prefix
        git-rev-parse(1)

--show-pulls
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--show-scope
        git-config(1)

--show-signature
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--show-stats
        git-annotate(1)
        git-blame(1)

--show-superproject-working-tree
        git-rev-parse(1)

--show-toplevel
        git-rev-parse(1)

--[no-]signature=<signature>
        git-format-patch(1)

--signature-file=<file>
        git-format-patch(1)

--[no-]signed, --signed=(true|false|if-asked)
        git-push(1)

--signed-tags=(verbatim|warn|warn-strip|strip|abort)
        git-fast-export(1)

--signoff
        git-rebase(1)

--signoff, --no-signoff
        git-merge(1)
        git-pull(1)

--silent
        git-p4(1)

--simplify-by-decoration
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--simplify-merges
        gitk(1)
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--since=<date>
        gitk(1)

--since=<date>, --after=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--since=datestring, --after=datestring
        git-rev-parse(1)

--since-as-filter=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--[no-]single-branch
        git-clone(1)

--single-worktree
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--skip
        git-am(1)
        git-cherry-pick(1)
        git-rebase(1)
        git-revert(1)

--skip=<number>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--skip-to=<file>
        git-difftool(1)

--skip-to=<file>, --rotate-to=<file>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--socket <path>
        git-credential-cache(1)

--sort=<key>
        git-branch(1)
        git-for-each-ref(1)
        git-ls-remote(1)

--source
        git-log(1)
        git-reflog(1)

--source=<tree-ish>
        git-check-attr(1)

--sparse
        git-add(1)
        git-clone(1)
        git-log(1)
        git-reflog(1)
        git-ls-files(1)
        git-rev-list(1)
        git-rm(1)

--[no-]sparse
        git-pack-objects(1)

--split[=<strategy>]
        git-commit-graph(1)

--sq
        git-rev-parse(1)

--sq-quote
        git-rev-parse(1)

--squash=<commit>
        git-commit(1)

--squash, --no-squash
        git-merge(1)
        git-pull(1)

--src-prefix=<prefix>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--stable
        git-patch-id(1)

--stage=<number>|all
        git-checkout-index(1)

--stale-fix
        git-reflog(1)

--start
        git-instaweb(1)

--start-number <n>
        git-format-patch(1)

--stat
        git-apply(1)
        git-rebase(1)

--stat[=<width>[,<name-width>[,<count>]]]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--stat, -n, --no-stat
        git-merge(1)
        git-pull(1)

--state-branch <branch>
        git-filter-branch(1)

--stats
        git-fast-import(1)

--status
        git-commit(1)

--stdin
        git-check-attr(1)
        git-check-ignore(1)
        git-check-mailmap(1)
        git-checkout-index(1)
        git-diff-tree(1)
        git-fetch(1)
        git-fetch-pack(1)
        git-fmt-merge-msg(1)
        git-hash-object(1)
        git-http-fetch(1)
        git-index-pack(1)
        git-log(1)
        git-notes(1)
        git-reflog(1)
        git-rev-list(1)
        
--stdin-commits
        git-commit-graph(1)

--stdin-packs
        git-commit-graph(1)
        git-multi-pack-index(1)
        git-pack-objects(1)

--stdin-paths
        git-hash-object(1)

--stdout
        git-format-patch(1)
        git-pack-objects(1)

--stop
        git-instaweb(1)

--stop-at-non-option
        git-rev-parse(1)

--strategy=<strategy>
        git-cherry-pick(1)
        git-revert(1)

--strict
        git-fsck(1)
        git-index-pack(1)
        git-mktag(1)

--strict-paths
        git-cvsserver(1)
        git-daemon(1)

--[no-]stripspace
        git-notes(1)

--stuck-long
        git-rev-parse(1)

--subdirectory-filter <directory>
        git-filter-branch(1)

--subject=<string>
        git-send-email(1)

--subject-prefix=<subject prefix>
        git-format-patch(1)

--submodule[=<format>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--submodule-prefix=<path>
        git-fetch(1)

--suffix=.<sfx>
        git-format-patch(1)

--[no-]summary
        git-fmt-merge-msg(1)

--summary
        git-apply(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--summary, --no-summary
        git-merge(1)
        git-pull(1)

--symbolic
        git-rev-parse(1)

--symbolic-full-name
        git-rev-parse(1)

--[no-]symlinks
        git-difftool(1)

--symref
        git-ls-remote(1)

--syslog
        git-daemon(1)

--system
        git-config(1)

-T
        git-archimport(1)

-t
        git-annotate(1)
        git-blame(1)
        git-cat-file(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)
        git-ls-files(1)
        git-ls-tree(1)

-t <tmpdir>
        git-archimport(1)

-t <type>
        git-hash-object(1)

-t, --track[=(direct|inherit)]
        git-branch(1)
        git-checkout(1)

-t, --tags
        git-fetch(1)
        git-pull(1)

-t <file>, --template=<file>
        git-commit(1)

-t <tool>, --tool=<tool>
        git-difftool(1)
        git-mergetool(1)

--tag-of-filtered-object=(abort|drop|rewrite)
        git-fast-export(1)

--tag-name-filter <command>
        git-filter-branch(1)

--tags
        git-describe(1)
        git-fsck(1)
        git-name-rev(1)
        git-push(1)

--tags[=<pattern>]
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--temp
        git-checkout-index(1)

--template=<template-directory>
        git-clone(1)
        git-init(1)

--textconv
        git-cat-file(1)
        git-grep(1)

--textconv, --no-textconv
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

--thin
        git-fetch-pack(1)
        git-pack-objects(1)

--[no-]thin
        git-push(1)

--thread[=<style>], --no-thread
        git-format-patch(1)

--threads <num>
        git-grep(1)

--threads=<n>
        git-index-pack(1)
        git-pack-objects(1)
        git-repack(1)

--timeout=<n>
        git-daemon(1)

--timeout <seconds>
        git-credential-cache(1)

--timestamp
        git-rev-list(1)

--to=<address>,...
        git-send-email(1)

--to=<email>
        git-format-patch(1)

--topo-order
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--to-stdin
        git-hook(1)

--tool-help
        git-difftool(1)
        git-mergetool(1)

--trailer <key>[(=|:)<value>]
        git-interpret-trailers(1)

--trailer <token>[(=|:)<value>]
        git-commit(1)

--transfer-encoding=(7bit|8bit|quoted-printable|base64|auto)
        git-send-email(1)

--tree-filter <command>
        git-filter-branch(1)

--trim-empty
        git-interpret-trailers(1)

--trivial
        git-read-tree(1)

--[no-]trust-exit-code
        git-difftool(1)

--type <type>
        git-config(1)

-U<n>, --unified=<n>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-u
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-mailinfo(1)
        git-read-tree(1)

-u, --index
        git-checkout-index(1)

-u, --set-upstream
        git-push(1)

-u, --unmerged
        git-ls-files(1)

-u, --update
        git-add(1)

-u, --update-head-ok
        git-fetch(1)

-u[<mode>], --untracked-files[=<mode>]
        git-commit(1)

-u <upload-pack>, --upload-pack <upload-pack>
        git-clone(1)

-u <upstream>, --set-upstream-to=<upstream>
        git-branch(1)

-u, --utf8
        git-am(1)

--unfold
        git-interpret-trailers(1)

--unidiff-zero
        git-apply(1)

--unordered
        git-cat-file(1)

--unpacked
        git-pack-objects(1)
        git-rev-list(1)

--unpack-unreachable
        git-pack-objects(1)

--unpack-unreachable=<when>
        git-repack(1)

--unreachable
        git-fsck(1)

--unsafe-paths
        git-apply(1)

--unset
        git-config(1)

--unset-all
        git-config(1)

--unset-upstream
        git-branch(1)

--unshallow
        git-fetch(1)
        git-pull(1)

--unstable
        git-patch-id(1)

--until=<date>
        gitk(1)

--until=<date>, --before=<date>
        git-log(1)
        git-reflog(1)
        git-rev-list(1)

--until=datestring, --before=datestring
        git-rev-parse(1)

--untracked
        git-grep(1)

--updateref
        git-reflog(1)

--update-refs, --no-update-refs
        git-rebase(1)

--update-shallow
        git-fetch(1)
        git-pull(1)

--update-shelve CHANGELIST
        git-p4(1)

--upload-pack=<exec>
        git-ls-remote(1)

--upload-pack=<git-upload-pack>
        git-fetch-pack(1)

--upload-pack <upload-pack>
        git-fetch(1)
        git-pull(1)

--use-bitmap-index
        git-rev-list(1)

--use-client-spec
        git-p4(1)

--use-done-feature
        git-fast-export(1)

--user=<user>, --group=<group>
        git-daemon(1)

--user-interfaces
        git-help(1)

--user-path, --user-path=<path>
        git-daemon(1)

-V, --version
        git-cvsserver(1)

-v
        git-archimport(1)
        git-cherry(1)
        git-cvsexportcommit(1)
        git-cvsimport(1)
        git-diff-tree(1)
        git-fetch-pack(1)
        git-http-fetch(1)
        git-index-pack(1)
        git-ls-files(1)
        git-read-tree(1)

-v, --invert-match
        git-grep(1)

-v <n>, --reroll-count=<n>
        git-format-patch(1)

-v, --verbose
        git-add(1)
        git-apply(1)
        git-archive(1)
        git-check-ignore(1)
        git-clone(1)
        git-commit(1)
        git-count-objects(1)
        git-fetch(1)
        git-imap-send(1)
        git-merge(1)
        git-mv(1)
        git-notes(1)
        git-p4(1)
        git-prune(1)
        git-pull(1)
        git-push(1)
        git-rebase(1)
        git-remote(1)

-v, --version
        git(1)

-v, -vv, --verbose
        git-branch(1)

--verbatim
        git-patch-id(1)

--verbose
        git-daemon(1)
        git-help(1)
        git-http-push(1)
        git-pack-redundant(1)
        git-reflog(1)

--verify
        git-rebase(1)
        git-rev-parse(1)

--[no-]verify
        git-merge(1)
        git-pull(1)
        git-push(1)

--verify-signatures, --no-verify-signatures
        git-merge(1)
        git-pull(1)

--version=<version>
        git-bundle(1)

-W
        git-cvsexportcommit(1)

-W, --function-context
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-grep(1)
        git-log(1)
        git-reflog(1)

-W, --worktree, -S, --staged
        git-restore(1)

-w
        git-blame(1)
        git-cvsexportcommit(1)
        git-hash-object(1)

-w <filename>
        git-http-fetch(1)

-w, --ignore-all-space
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-w, --web
        git-help(1)

-w, --word-regexp
        git-grep(1)

--where <placement>, --no-where
        git-interpret-trailers(1)

--whitespace=<action>
        git-apply(1)

--whitespace=<option>
        git-rebase(1)

--width=<width>
        git-column(1)

--window=<n>, --depth=<n>
        git-pack-objects(1)
        git-repack(1)

--window-memory=<n>
        git-pack-objects(1)
        git-repack(1)

--with-tree=<tree-ish>
        git-ls-files(1)

--word-diff[=<mode>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--word-diff-regex=<regex>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

--work-tree=<path>
        git(1)

--worktree
        git-config(1)

--worktree-attributes
        git-archive(1)

--[no-]write-commit-graph
        git-fetch(1)

--[no-]write-fetch-head
        git-fetch(1)

--ws-error-highlight=<kind>
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-log(1)
        git-reflog(1)

-X
        git-clean(1)

-X <file>, --exclude-from=<file>
        git-ls-files(1)

-X<option>, --strategy-option=<option>
        git-cherry-pick(1)
        git-revert(1)

-X <option>, --strategy-option=<option>
        git-merge(1)
        git-pull(1)

-X <strategy-option>, --strategy-option=<strategy-option>
        git-rebase(1)

-X[<param1,param2,...>], --dirstat[=<param1,param2,...>]
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-format-patch(1)
        git-log(1)
        git-reflog(1)

-x
        git-cherry-pick(1)
        git-clean(1)

-x <pattern>, --exclude=<pattern>
        git-ls-files(1)

-x <cmd>, --exec <cmd>
        git-rebase(1)

-x <command>, --extcmd=<command>
        git-difftool(1)

--xmailer, --no-xmailer
        git-send-email(1)

-y, --no-prompt
        git-difftool(1)
        git-mergetool(1)

-Z
        git-cat-file(1)

-z
        git-apply(1)
        git-cat-file(1)
        git-check-attr(1)
        git-check-ignore(1)
        git-checkout-index(1)
        git-diff(1)
        git-diff-files(1)
        git-diff-index(1)
        git-diff-tree(1)
        git-ls-files(1)
        git-ls-tree(1)
        git-merge-tree(1)
        git-mktree(1)

-z, --null
        git-commit(1)
        git-config(1)
        git-grep(1)

-z <fuzz>
        git-cvsimport(1)

--zdiff3
        git-merge-file(1)

--zero-commit
        git-format-patch(1)

^ permalink raw reply

* Re: [PATCH 2/2] merge-ort/merge-recursive: do report errors in `merge_submodule()`
From: Johannes Schindelin @ 2024-03-09 20:46 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Johannes Schindelin via GitGitGadget, git, Patrick Steinhardt,
	Dirk Gouders, Jeff King
In-Reply-To: <xmqqwmqbcmrz.fsf@gitster.g>

Hi Junio,

On Sat, 9 Mar 2024, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > From: Johannes Schindelin <johannes.schindelin@gmx.de>
> >
> > In 24876ebf68b (commit-reach(repo_in_merge_bases_many): report missing
> > commits, 2024-02-28), I taught `merge_submodule()` to handle errors
> > reported by `repo_in_merge_bases_many()`.
> >
> > However, those errors were not passed through to the callers. That was
> > unintentional, and this commit remedies that.
> >
> > Note that `find_first_merges()` can now also return -1 (because it
> > passes through that return value from `repo_in_merge_bases()`), and this
> > commit also adds the forgotten handling for that scenario.
>
> Good clean-up.  But this "oops, we did not check for errors" makes
> me wonder if we are better off adopting "by default we assume an
> error, until we are sure we are good" pattern, i.e.
>
>         func()
>         {
>                 int ret = -1; /* assume worst */
>
>                 do stuff;
>                 if (...) {
>                         error(_("this is bad"));
>                         goto cleanup;
>                 }
>                 do stuff;
>                 if (...) {
>                         error(_("this is bad, too"));
>                         goto cleanup;
>                 }
>
>                 /* ok we are happy */
>                 ret = 0;
>
>         cleanup:
>                 release resources;
>                 return ret;
>         }
>
> The patch to both functions do make it appear that they are good
> candidates for application of the pattern to me.

This is a very fitting pattern here, and it is in fact used already! It is
used with `ret = 0`, though, to indicate unclean merges.

This makes sense, as most of the specifically-handled cases have that
outcome. By my counting, 5 of the handled cases result in ret = -1, i.e.
non-recoverable errors, but 8 of the cases result in ret = 0, i.e. unclean
merges, whereas only 2 cases return 1, i.e. clean merges.

Those numbers are for the `merge_submodule()` variant in `merge-ort.c`. In
`merge-recursive.c`, by my counting there are 10 instead of 8 `ret = 0`
cases, the other two numbers are the same.

Ciao,
Johannes

^ permalink raw reply

* Re: [PATCH] sequencer: allow disabling conflict advice
From: Junio C Hamano @ 2024-03-09 19:56 UTC (permalink / raw)
  To: Phillip Wood; +Cc: Philippe Blain, Philippe Blain via GitGitGadget, git
In-Reply-To: <b52a8678-a13f-455b-a817-2df2b4fab795@gmail.com>

Phillip Wood <phillip.wood123@gmail.com> writes:

>> Maybe just 'advice.mergeConflict' ?
>
> 'advice.mergeConflict' sounds good to me

Yup, looks good to me, too.



^ permalink raw reply

* Re: [PATCH] sequencer: allow disabling conflict advice
From: Junio C Hamano @ 2024-03-09 19:55 UTC (permalink / raw)
  To: Philippe Blain; +Cc: Philippe Blain via GitGitGadget, git, Phillip Wood
In-Reply-To: <570a8736-5552-6279-4aea-8acdf8af50df@gmail.com>

Philippe Blain <levraiphilippeblain@gmail.com> writes:

> Thinking about this more and looking at the code, using 'advice_enabled' in the condition
> instead of using 'advise_if_enabled' for each message has a side effect:
> the text "hint: Disable this message with "git config advice.sequencerConflict false"
> will not appear, which I find less user friendly...

Good eyes.

I agree that you have to do that part yourself at the end of that
"if () { ... }" block using turn_off_instructions[] string.

^ permalink raw reply

* Re: [PATCH] sequencer: allow disabling conflict advice
From: Phillip Wood @ 2024-03-09 19:15 UTC (permalink / raw)
  To: Philippe Blain, Junio C Hamano; +Cc: Philippe Blain via GitGitGadget, git
In-Reply-To: <12c84208-23a7-5ba7-18a9-822d9a8f66fa@gmail.com>

Hi Philippe

On 09/03/2024 17:53, Philippe Blain wrote:
> Le 2024-03-04 à 12:56, Junio C Hamano a écrit :
>> Phillip Wood <phillip.wood123@gmail.com> writes:
>>
>>> ... So we probably do need a new config variable but
>>> I think it should have a generic name - not be sequencer specific so
>>> we can extend its scope in the future to "git merge", "git am -3",
>>> "git stash" etc.
>>
>> A very good point.  Thanks for your careful thinking.
> 
> OK, I agree we can make the new advice more generic, but I'm lacking
> inspiration for the name. Maybe 'advice.mergeConflicted' ?
> Or 'advice.resolveConflictedMerge' ? though this is close to the existing
> 'resolveConflict'...
> Maybe just 'advice.mergeConflict' ?

'advice.mergeConflict' sounds good to me

Best Wishes

Phillip


^ permalink raw reply

* Re: [PATCH] sequencer: allow disabling conflict advice
From: Philippe Blain @ 2024-03-09 18:58 UTC (permalink / raw)
  To: Junio C Hamano, Philippe Blain via GitGitGadget; +Cc: git, Phillip Wood
In-Reply-To: <6ef490d2-ce0a-f8bd-8079-6b4ef3e37eda@gmail.com>

Le 2024-03-09 à 12:22, Philippe Blain a écrit :
> Hi Junio,
> 
> Le 2024-03-03 à 17:57, Junio C Hamano a écrit :
>> "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com> writes:
>>
>>>  	if (msg) {
>>> -		advise("%s\n", msg);
>>> +		advise_if_enabled(ADVICE_SEQUENCER_CONFLICT, "%s\n", msg);
>>>  		/*
>>>  		 * A conflict has occurred but the porcelain
>>>  		 * (typically rebase --interactive) wants to take care
>>
>> This hunk is good.  The block removes the CHERRY_PICK_HEAD after
>> giving this advice and then returns.
>>
>>> @@ -480,22 +480,25 @@ static void print_advice(struct repository *r, int show_hint,
>>>  
>>>  	if (show_hint) {
>>>  		if (opts->no_commit)
>>> -			advise(_("after resolving the conflicts, mark the corrected paths\n"
>>> -				 "with 'git add <paths>' or 'git rm <paths>'"));
>>> +			advise_if_enabled(ADVICE_SEQUENCER_CONFLICT,
>>> +					  _("after resolving the conflicts, mark the corrected paths\n"
>>> +					    "with 'git add <paths>' or 'git rm <paths>'"));
>>>  		else if (opts->action == REPLAY_PICK)
>>> -			advise(_("After resolving the conflicts, mark them with\n"
>>> -				 "\"git add/rm <pathspec>\", then run\n"
>>> -				 "\"git cherry-pick --continue\".\n"
>>> -				 "You can instead skip this commit with \"git cherry-pick --skip\".\n"
>>> -				 "To abort and get back to the state before \"git cherry-pick\",\n"
>>> -				 "run \"git cherry-pick --abort\"."));
>>> +			advise_if_enabled(ADVICE_SEQUENCER_CONFLICT,
>>> +					  _("After resolving the conflicts, mark them with\n"
>>> +					    "\"git add/rm <pathspec>\", then run\n"
>>> +					    "\"git cherry-pick --continue\".\n"
>>> +					    "You can instead skip this commit with \"git cherry-pick --skip\".\n"
>>> +					    "To abort and get back to the state before \"git cherry-pick\",\n"
>>> +					    "run \"git cherry-pick --abort\"."));
>>>  		else if (opts->action == REPLAY_REVERT)
>>> -			advise(_("After resolving the conflicts, mark them with\n"
>>> -				 "\"git add/rm <pathspec>\", then run\n"
>>> -				 "\"git revert --continue\".\n"
>>> -				 "You can instead skip this commit with \"git revert --skip\".\n"
>>> -				 "To abort and get back to the state before \"git revert\",\n"
>>> -				 "run \"git revert --abort\"."));
>>> +			advise_if_enabled(ADVICE_SEQUENCER_CONFLICT,
>>> +					  _("After resolving the conflicts, mark them with\n"
>>> +					    "\"git add/rm <pathspec>\", then run\n"
>>> +					    "\"git revert --continue\".\n"
>>> +					    "You can instead skip this commit with \"git revert --skip\".\n"
>>> +					    "To abort and get back to the state before \"git revert\",\n"
>>> +					    "run \"git revert --abort\"."));
>>>  		else
>>>  			BUG("unexpected pick action in print_advice()");
>>>  	}
>>
>> This hunk can be improved.  If I were doing this patch, I probably
>> would have just done
>>
>> -	if (show_hint) {
>> +	if (show_hint && advice_enabled(ADVICE_SEQUENCER_CONFLICT)) {
>>
>> and nothing else, and doing so would keep the block easier to extend
>> and maintain in the future.
>>
>> Because the block is all about "show_hint", we have code to print
>> advice messages and nothing else in it currently, and more
>> importantly, we will not add anything other than code to print
>> advice messages in it.  Because of that, skipping everything when
>> ADVICE_SEQUENCER_CONFLICT is not enabled will not cause problems
>> (unlike the earlier hunk---which will break if we added "&&
>> advice_enabled()" to "if (msg)").  That way, when somebody teaches
>> this code a new kind of opts->action, they do not have to say
>> "advice_if_enabled(ADVICE_SEQUENCER_CONFLICT()"; they can just use
>> "advise()".
> 
> That's true and makes the changes simpler, thank you for the suggestion.
> I'll do that in v2.

Thinking about this more and looking at the code, using 'advice_enabled' in the condition
instead of using 'advise_if_enabled' for each message has a side effect:
the text "hint: Disable this message with "git config advice.sequencerConflict false"
will not appear, which I find less user friendly...

Philippe.

^ permalink raw reply

* [PATCH v2 1/1] config: learn the "hostname:" includeIf condition
From: Ignacio Encinas @ 2024-03-09 18:18 UTC (permalink / raw)
  To: git; +Cc: Ignacio Encinas
In-Reply-To: <20240309181828.45496-1-ignacio@iencinas.com>

Currently, customizing the configuration depending on the machine running
git has to be done manually.

Add support for a new includeIf keyword "hostname:" to conditionally
include configuration files depending on the hostname.

Signed-off-by: Ignacio Encinas <ignacio@iencinas.com>
---
 Documentation/config.txt  |  9 +++++++++
 config.c                  | 17 ++++++++++++++++
 t/t1305-config-include.sh | 42 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index e3a74dd1c19d..9a22fd260935 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -186,6 +186,11 @@ As for the naming of this keyword, it is for forwards compatibility with
 a naming scheme that supports more variable-based include conditions,
 but currently Git only supports the exact keyword described above.
 
+`hostname`::
+	The data that follows the keyword `hostname:` is taken to be a
+	pattern with standard globbing wildcards. If the current
+	hostname matches the pattern, the include condition is met.
+
 A few more notes on matching via `gitdir` and `gitdir/i`:
 
  * Symlinks in `$GIT_DIR` are not resolved before matching.
@@ -261,6 +266,10 @@ Example
 	path = foo.inc
 [remote "origin"]
 	url = https://example.com/git
+
+; include only if the hostname of the machine matches some-hostname
+[includeIf "hostname:some-hostname"]
+	path = foo.inc
 ----
 
 Values
diff --git a/config.c b/config.c
index 3cfeb3d8bd99..50b3f6d24c50 100644
--- a/config.c
+++ b/config.c
@@ -317,6 +317,21 @@ static int include_by_branch(const char *cond, size_t cond_len)
 	return ret;
 }
 
+static int include_by_hostname(const char *cond, size_t cond_len)
+{
+	int ret;
+	char my_host[HOST_NAME_MAX + 1];
+	struct strbuf pattern = STRBUF_INIT;
+
+	if (xgethostname(my_host, sizeof(my_host)))
+		return 0;
+
+	strbuf_add(&pattern, cond, cond_len);
+	ret = !wildmatch(pattern.buf, my_host, 0);
+	strbuf_release(&pattern);
+	return ret;
+}
+
 static int add_remote_url(const char *var, const char *value,
 			  const struct config_context *ctx UNUSED, void *data)
 {
@@ -406,6 +421,8 @@ static int include_condition_is_true(const struct key_value_info *kvi,
 	else if (skip_prefix_mem(cond, cond_len, "hasconfig:remote.*.url:", &cond,
 				   &cond_len))
 		return include_by_remote_url(inc, cond, cond_len);
+	else if (skip_prefix_mem(cond, cond_len, "hostname:", &cond, &cond_len))
+		return include_by_hostname(cond, cond_len);
 
 	/* unknown conditionals are always false */
 	return 0;
diff --git a/t/t1305-config-include.sh b/t/t1305-config-include.sh
index 5cde79ef8c4f..e0a1d51d50ad 100755
--- a/t/t1305-config-include.sh
+++ b/t/t1305-config-include.sh
@@ -357,4 +357,46 @@ test_expect_success 'include cycles are detected' '
 	grep "exceeded maximum include depth" stderr
 '
 
+test_expect_success 'conditional include, hostname' '
+	cat >>.git/config <<-EOF &&
+	[includeIf "hostname:$(hostname)a"]
+		path = bar12
+	EOF
+	cat >>.git/bar12 <<-EOF &&
+	[test]
+		twelve=12
+	EOF
+
+	test_must_fail git config test.twelve &&
+
+	cat >>.git/config <<-EOF &&
+	[includeIf "hostname:$(hostname)"]
+		path = bar12
+	EOF
+	echo 12 >expect &&
+	git config test.twelve >actual &&
+	test_cmp expect actual
+'
+
+test_expect_success 'conditional include, hostname, wildcard' '
+	cat >>.git/config <<-EOF &&
+	[includeIf "hostname:$(hostname)a*"]
+		path = bar13
+	EOF
+	cat >>.git/bar13 <<-EOF &&
+	[test]
+		thirteen = 13
+	EOF
+
+	test_must_fail git config test.thirteen &&
+
+	cat >>.git/config <<-EOF &&
+	[includeIf "hostname:$(hostname)*"]
+		path = bar13
+	EOF
+	echo 13 >expect &&
+	git config test.thirteen >actual &&
+	test_cmp expect actual
+'
+
 test_done
-- 
2.44.0


^ permalink raw reply related

* [PATCH v2 0/1] Add hostname condition to includeIf
From: Ignacio Encinas @ 2024-03-09 18:18 UTC (permalink / raw)
  To: git; +Cc: Ignacio Encinas
In-Reply-To: <20240307205006.467443-1-ignacio@iencinas.com>

Extend includeIf to take hostname into account. Motivating request can
be found here [1].

[1] https://github.com/gitgitgadget/git/issues/1665

Changes since v1:
* Add blank line between declarations and code in `include_by_branch`.
* Rewrite "echo"s used in tests to make them more readable. 

  config: learn the "hostname:" includeIf condition

 Documentation/config.txt  |  9 +++++++++
 config.c                  | 17 ++++++++++++++++
 t/t1305-config-include.sh | 42 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 68 insertions(+)

Range-diff against v1:
1:  10a9bca68753 ! 1:  cf175154109e config: learn the "hostname:" includeIf condition
    @@ config.c: static int include_by_branch(const char *cond, size_t cond_len)
     +	int ret;
     +	char my_host[HOST_NAME_MAX + 1];
     +	struct strbuf pattern = STRBUF_INIT;
    ++
     +	if (xgethostname(my_host, sizeof(my_host)))
     +		return 0;
     +
    @@ t/t1305-config-include.sh: test_expect_success 'include cycles are detected' '
      '
      
     +test_expect_success 'conditional include, hostname' '
    -+	echo "[includeIf \"hostname:$(hostname)a\"]path=bar12" >>.git/config &&
    -+	echo "[test]twelve=12" >.git/bar12 &&
    ++	cat >>.git/config <<-EOF &&
    ++	[includeIf "hostname:$(hostname)a"]
    ++		path = bar12
    ++	EOF
    ++	cat >>.git/bar12 <<-EOF &&
    ++	[test]
    ++		twelve=12
    ++	EOF
    ++
     +	test_must_fail git config test.twelve &&
     +
    -+	echo "[includeIf \"hostname:$(hostname)\"]path=bar12" >>.git/config &&
    ++	cat >>.git/config <<-EOF &&
    ++	[includeIf "hostname:$(hostname)"]
    ++		path = bar12
    ++	EOF
     +	echo 12 >expect &&
     +	git config test.twelve >actual &&
     +	test_cmp expect actual
     +'
     +
     +test_expect_success 'conditional include, hostname, wildcard' '
    -+	echo "[includeIf \"hostname:$(hostname)a*\"]path=bar13" >>.git/config &&
    -+	echo "[test]thirteen=13" >.git/bar13 &&
    ++	cat >>.git/config <<-EOF &&
    ++	[includeIf "hostname:$(hostname)a*"]
    ++		path = bar13
    ++	EOF
    ++	cat >>.git/bar13 <<-EOF &&
    ++	[test]
    ++		thirteen = 13
    ++	EOF
    ++
     +	test_must_fail git config test.thirteen &&
     +
    -+	echo "[includeIf \"hostname:$(hostname)*\"]path=bar13" >>.git/config &&
    ++	cat >>.git/config <<-EOF &&
    ++	[includeIf "hostname:$(hostname)*"]
    ++		path = bar13
    ++	EOF
     +	echo 13 >expect &&
     +	git config test.thirteen >actual &&
     +	test_cmp expect actual

base-commit: e09f1254c54329773904fe25d7c545a1fb4fa920
-- 
2.44.0


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox