Skip to content

Commit 3a61600

Browse files
committed
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: Git 2.34-rc2 parse-options.[ch]: revert use of "enum" for parse_options() t/lib-git.sh: fix ACL-related permissions failure A few fixes before -rc2 async_die_is_recursing: work around GCC v11.x issue on Fedora Document positive variant of commit and merge option "--no-verify" pull: honor --no-verify and do not call the commit-msg hook http-backend: remove a duplicated code branch
2 parents ed7fe7b + 6c22093 commit 3a61600

File tree

12 files changed

+65
-20
lines changed

12 files changed

+65
-20
lines changed

Documentation/RelNotes/2.34.0.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ Fixes since v2.33
383383
compression level for both zip and tar.gz format.
384384
(merge c4b208c309 bs/archive-doc-compression-level later to maint).
385385

386-
* Drop "git sparse-index" from the list of common commands.
386+
* Drop "git sparse-checkout" from the list of common commands.
387387
(merge 6a9a50a8af sg/sparse-index-not-that-common-a-command later to maint).
388388

389389
* "git branch -c/-m new old" was not described to copy config, which
@@ -401,6 +401,13 @@ Fixes since v2.33
401401
object replacement.
402402
(merge 095d112f8c ab/ignore-replace-while-working-on-commit-graph later to maint).
403403

404+
* "git pull --no-verify" did not affect the underlying "git merge".
405+
(merge 47bfdfb3fd ar/fix-git-pull-no-verify later to maint).
406+
407+
* One CI task based on Fedora image noticed a not-quite-kosher
408+
consturct recently, which has been corrected.
409+
(merge 4b540cf913 vd/pthread-setspecific-g11-fix later to maint).
410+
404411
* Other code cleanup, docfix, build fix, etc.
405412
(merge f188160be9 ab/bundle-remove-verbose-option later to maint).
406413
(merge 8c6b4332b4 rs/close-pack-leakfix later to maint).

Documentation/git-commit.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ include::signoff-option.txt[]
212212
each trailer would appear, and other details.
213213

214214
-n::
215-
--no-verify::
216-
This option bypasses the pre-commit and commit-msg hooks.
215+
--[no-]verify::
216+
By default, the pre-commit and commit-msg hooks are run.
217+
When any of `--no-verify` or `-n` is given, these are bypassed.
217218
See also linkgit:githooks[5].
218219

219220
--allow-empty::

Documentation/merge-options.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ ifdef::git-pull[]
132132
Only useful when merging.
133133
endif::git-pull[]
134134

135-
--no-verify::
136-
This option bypasses the pre-merge and commit-msg hooks.
135+
--[no-]verify::
136+
By default, the pre-merge and commit-msg hooks are run.
137+
When `--no-verify` is given, these are bypassed.
137138
See also linkgit:githooks[5].
138139
ifdef::git-pull[]
139140
Only useful when merging.

GIT-VERSION-GEN

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
GVF=GIT-VERSION-FILE
4-
DEF_VER=v2.34.0-rc1
4+
DEF_VER=v2.34.0-rc2
55

66
LF='
77
'

builtin/pull.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static char *opt_edit;
8484
static char *cleanup_arg;
8585
static char *opt_ff;
8686
static char *opt_verify_signatures;
87+
static char *opt_verify;
8788
static int opt_autostash = -1;
8889
static int config_autostash;
8990
static int check_trust_level = 1;
@@ -160,6 +161,9 @@ static struct option pull_options[] = {
160161
OPT_PASSTHRU(0, "ff-only", &opt_ff, NULL,
161162
N_("abort if fast-forward is not possible"),
162163
PARSE_OPT_NOARG | PARSE_OPT_NONEG),
164+
OPT_PASSTHRU(0, "verify", &opt_verify, NULL,
165+
N_("control use of pre-merge-commit and commit-msg hooks"),
166+
PARSE_OPT_NOARG),
163167
OPT_PASSTHRU(0, "verify-signatures", &opt_verify_signatures, NULL,
164168
N_("verify that the named commit has a valid GPG signature"),
165169
PARSE_OPT_NOARG),
@@ -675,6 +679,8 @@ static int run_merge(void)
675679
strvec_pushf(&args, "--cleanup=%s", cleanup_arg);
676680
if (opt_ff)
677681
strvec_push(&args, opt_ff);
682+
if (opt_verify)
683+
strvec_push(&args, opt_verify);
678684
if (opt_verify_signatures)
679685
strvec_push(&args, opt_verify_signatures);
680686
strvec_pushv(&args, opt_strategies.v);

http-backend.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,7 @@ static void run_service(const char **argv, int buffer_input)
466466
struct child_process cld = CHILD_PROCESS_INIT;
467467
ssize_t req_len = get_content_length();
468468

469-
if (encoding && !strcmp(encoding, "gzip"))
470-
gzipped_request = 1;
471-
else if (encoding && !strcmp(encoding, "x-gzip"))
469+
if (encoding && (!strcmp(encoding, "gzip") || !strcmp(encoding, "x-gzip")))
472470
gzipped_request = 1;
473471

474472
if (!user || !*user)

parse-options.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -860,11 +860,11 @@ int parse_options_end(struct parse_opt_ctx_t *ctx)
860860
return ctx->cpidx + ctx->argc;
861861
}
862862

863-
enum parse_opt_result parse_options(int argc, const char **argv,
864-
const char *prefix,
865-
const struct option *options,
866-
const char * const usagestr[],
867-
enum parse_opt_flags flags)
863+
int parse_options(int argc, const char **argv,
864+
const char *prefix,
865+
const struct option *options,
866+
const char * const usagestr[],
867+
enum parse_opt_flags flags)
868868
{
869869
struct parse_opt_ctx_t ctx;
870870
struct option *real_options;

parse-options.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,11 +213,10 @@ struct option {
213213
* untouched and parse_options() returns the number of options
214214
* processed.
215215
*/
216-
enum parse_opt_result parse_options(int argc, const char **argv,
217-
const char *prefix,
218-
const struct option *options,
219-
const char * const usagestr[],
220-
enum parse_opt_flags flags);
216+
int parse_options(int argc, const char **argv, const char *prefix,
217+
const struct option *options,
218+
const char * const usagestr[],
219+
enum parse_opt_flags flags);
221220

222221
NORETURN void usage_with_options(const char * const *usagestr,
223222
const struct option *options);

run-command.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ static NORETURN void die_async(const char *err, va_list params)
10991099
static int async_die_is_recursing(void)
11001100
{
11011101
void *ret = pthread_getspecific(async_die_counter);
1102-
pthread_setspecific(async_die_counter, (void *)1);
1102+
pthread_setspecific(async_die_counter, &async_die_counter); /* set to any non-NULL valid pointer */
11031103
return ret != NULL;
11041104
}
11051105

t/lib-gpg.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ test_lazy_prereq GPGSSH '
106106
test $? = 0 || exit 1;
107107
mkdir -p "${GNUPGHOME}" &&
108108
chmod 0700 "${GNUPGHOME}" &&
109+
(setfacl -k "${GNUPGHOME}" 2>/dev/null || true) &&
109110
ssh-keygen -t ed25519 -N "" -C "git ed25519 key" -f "${GPGSSH_KEY_PRIMARY}" >/dev/null &&
110111
echo "\"principal with number 1\" $(cat "${GPGSSH_KEY_PRIMARY}.pub")" >> "${GPGSSH_ALLOWED_SIGNERS}" &&
111112
ssh-keygen -t rsa -b 2048 -N "" -C "git rsa2048 key" -f "${GPGSSH_KEY_SECONDARY}" >/dev/null &&

0 commit comments

Comments
 (0)