Skip to content

Commit bbf1932

Browse files
committed
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: Git 2.34-rc1 rebase -i: fix rewording with --committer-date-is-author-date dir: fix directory-matching bug gpg-interface: avoid buffer overrun in parse_ssh_output() gpg-interface: handle missing " with " gracefully in parse_ssh_output() A few more topics before -rc1 i18n: fix typos found during l10n for git 2.34.0 t5310: drop lib-bundle.sh include format-patch (doc): clarify --base=auto gc: perform incremental repack when implictly enabled fsck: verify multi-pack-index when implictly enabled fsck: verify commit graph when implicitly enabled grep/pcre2: fix an edge case concerning ascii patterns and UTF-8 data commit-graph: don't consider "replace" objects with "verify" commit-graph tests: fix another graph_git_two_modes() helper commit-graph tests: fix error-hiding graph_git_two_modes() helper pretty: colorize pattern matches in commit messages grep: refactor next_match() and match_one_pattern() for external use
2 parents 66e6bab + 876b142 commit bbf1932

25 files changed

+416
-85
lines changed

Documentation/RelNotes/2.34.0.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ UI, Workflows & Features
7979

8080
* Use ssh public crypto for object and push-cert signing.
8181

82+
* "git log --grep=string --author=name" learns to highlight hits just
83+
like "git grep string" does.
84+
85+
8286

8387
Performance, Internal Implementation, Development Support etc.
8488

@@ -392,6 +396,11 @@ Fixes since v2.33
392396
* Fix long-standing shell syntax error in the completion script.
393397
(merge 46b0585286 re/completion-fix-test-equality later to maint).
394398

399+
* Teach "git commit-graph" command not to allow using replace objects
400+
at all, as we do not use the commit-graph at runtime when we see
401+
object replacement.
402+
(merge 095d112f8c ab/ignore-replace-while-working-on-commit-graph later to maint).
403+
395404
* Other code cleanup, docfix, build fix, etc.
396405
(merge f188160be9 ab/bundle-remove-verbose-option later to maint).
397406
(merge 8c6b4332b4 rs/close-pack-leakfix later to maint).
@@ -407,3 +416,5 @@ Fixes since v2.33
407416
(merge 1c720357ce ab/test-lib-diff-cleanup later to maint).
408417
(merge 6b615dbece ks/submodule-add-message-fix later to maint).
409418
(merge 82a57cd13f ma/doc-git-version later to maint).
419+
(merge 203eb8381a jc/doc-format-patch-clarify-auto-base later to maint).
420+
(merge 559664c792 ab/test-lib later to maint).

Documentation/config/color.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,12 @@ color.grep.<slot>::
105105
`matchContext`;;
106106
matching text in context lines
107107
`matchSelected`;;
108-
matching text in selected lines
108+
matching text in selected lines. Also, used to customize the following
109+
linkgit:git-log[1] subcommands: `--grep`, `--author` and `--committer`.
109110
`selected`;;
110-
non-matching text in selected lines
111+
non-matching text in selected lines. Also, used to customize the
112+
following linkgit:git-log[1] subcommands: `--grep`, `--author` and
113+
`--committer`.
111114
`separator`;;
112115
separators between fields on a line (`:`, `-`, and `=`)
113116
and between hunks (`--`)

Documentation/git-format-patch.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,10 @@ You can also use `git format-patch --base=P -3 C` to generate patches
689689
for A, B and C, and the identifiers for P, X, Y, Z are appended at the
690690
end of the first message.
691691

692-
If set `--base=auto` in cmdline, it will track base commit automatically,
693-
the base commit will be the merge base of tip commit of the remote-tracking
692+
If set `--base=auto` in cmdline, it will automatically compute
693+
the base commit as the merge base of tip commit of the remote-tracking
694694
branch and revision-range specified in cmdline.
695-
For a local branch, you need to track a remote branch by `git branch
695+
For a local branch, you need to make it to track a remote branch by `git branch
696696
--set-upstream-to` before using this option.
697697

698698
EXAMPLES

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-rc0
4+
DEF_VER=v2.34.0-rc1
55

66
LF='
77
'

builtin/commit-graph.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ static int graph_write(int argc, const char **argv)
263263
git_env_bool(GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS, 0))
264264
flags |= COMMIT_GRAPH_WRITE_BLOOM_FILTERS;
265265

266-
read_replace_refs = 0;
267266
odb = find_odb(the_repository, opts.obj_dir);
268267

269268
if (opts.reachable) {
@@ -318,6 +317,7 @@ int cmd_commit_graph(int argc, const char **argv, const char *prefix)
318317
if (!argc)
319318
goto usage;
320319

320+
read_replace_refs = 0;
321321
save_commit_buffer = 0;
322322

323323
if (!strcmp(argv[0], "verify"))

builtin/fsck.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,6 +835,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
835835
fsck_enable_object_names(&fsck_walk_options);
836836

837837
git_config(git_fsck_config, &fsck_obj_options);
838+
prepare_repo_settings(the_repository);
838839

839840
if (connectivity_only) {
840841
for_each_loose_object(mark_loose_for_connectivity, NULL, 0);
@@ -940,7 +941,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
940941

941942
check_connectivity();
942943

943-
if (!git_config_get_bool("core.commitgraph", &i) && i) {
944+
if (the_repository->settings.core_commit_graph) {
944945
struct child_process commit_graph_verify = CHILD_PROCESS_INIT;
945946
const char *verify_argv[] = { "commit-graph", "verify", NULL, NULL, NULL };
946947

@@ -956,7 +957,7 @@ int cmd_fsck(int argc, const char **argv, const char *prefix)
956957
}
957958
}
958959

959-
if (!git_config_get_bool("core.multipackindex", &i) && i) {
960+
if (the_repository->settings.core_multi_pack_index) {
960961
struct child_process midx_verify = CHILD_PROCESS_INIT;
961962
const char *midx_argv[] = { "multi-pack-index", "verify", NULL, NULL, NULL };
962963

builtin/gc.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,12 +1049,11 @@ static int maintenance_task_loose_objects(struct maintenance_run_opts *opts)
10491049
static int incremental_repack_auto_condition(void)
10501050
{
10511051
struct packed_git *p;
1052-
int enabled;
10531052
int incremental_repack_auto_limit = 10;
10541053
int count = 0;
10551054

1056-
if (git_config_get_bool("core.multiPackIndex", &enabled) ||
1057-
!enabled)
1055+
prepare_repo_settings(the_repository);
1056+
if (!the_repository->settings.core_multi_pack_index)
10581057
return 0;
10591058

10601059
git_config_get_int("maintenance.incremental-repack.auto",

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1486,7 +1486,7 @@ static void rename_tmp_packfile(const char **final_name,
14861486
if (!*final_name)
14871487
*final_name = odb_pack_name(name, hash, ext);
14881488
if (finalize_object_file(curr_name, *final_name))
1489-
die(_("unable to rename temporary '*.%s' file to '%s"),
1489+
die(_("unable to rename temporary '*.%s' file to '%s'"),
14901490
ext, *final_name);
14911491
} else if (make_read_only_if_same) {
14921492
chmod(*final_name, 0444);

dir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ int match_pathname(const char *pathname, int pathlen,
12941294
* then our prefix match is all we need; we
12951295
* do not need to call fnmatch at all.
12961296
*/
1297-
if (!patternlen && (!namelen || (flags & PATTERN_FLAG_MUSTBEDIR)))
1297+
if (!patternlen && !namelen)
12981298
return 1;
12991299
}
13001300

gpg-interface.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,19 @@ static void parse_ssh_output(struct signature_check *sigc)
387387
line = to_free = xmemdupz(sigc->output, strcspn(sigc->output, "\n"));
388388

389389
if (skip_prefix(line, "Good \"git\" signature for ", &line)) {
390-
/* Valid signature and known principal */
391-
sigc->result = 'G';
392-
sigc->trust_level = TRUST_FULLY;
393-
394390
/* Search for the last "with" to get the full principal */
395391
principal = line;
396392
do {
397393
search = strstr(line, " with ");
398394
if (search)
399395
line = search + 1;
400396
} while (search != NULL);
397+
if (line == principal)
398+
goto cleanup;
399+
400+
/* Valid signature and known principal */
401+
sigc->result = 'G';
402+
sigc->trust_level = TRUST_FULLY;
401403
sigc->signer = xmemdupz(principal, line - principal - 1);
402404
} else if (skip_prefix(line, "Good \"git\" signature with ", &line)) {
403405
/* Valid signature, but key unknown */
@@ -407,9 +409,9 @@ static void parse_ssh_output(struct signature_check *sigc)
407409
goto cleanup;
408410
}
409411

410-
key = strstr(line, "key");
412+
key = strstr(line, "key ");
411413
if (key) {
412-
sigc->fingerprint = xstrdup(strstr(line, "key") + 4);
414+
sigc->fingerprint = xstrdup(strstr(line, "key ") + 4);
413415
sigc->key = xstrdup(sigc->fingerprint);
414416
} else {
415417
/*
@@ -775,7 +777,7 @@ static const char *get_default_ssh_signing_key(void)
775777
if (keys[0] && starts_with(keys[0]->buf, "ssh-")) {
776778
default_key = strbuf_detach(keys[0], NULL);
777779
} else {
778-
warning(_("gpg.ssh.defaultKeycommand succeeded but returned no keys: %s %s"),
780+
warning(_("gpg.ssh.defaultKeyCommand succeeded but returned no keys: %s %s"),
779781
key_stderr.buf, key_stdout.buf);
780782
}
781783

0 commit comments

Comments
 (0)