Skip to content

Commit 74e34a0

Browse files
committed
Merge branch 'master' of github.com:git/git
* 'master' of github.com:git/git: (22 commits) Git 2.37-rc1 git-compat-util: allow root to access both SUDO_UID and root owned i18n: fix mismatched camelCase config variables Another batch of fixes before -rc1 bug_fl(): correctly initialize trace2 va_list relative_url(): fix incorrect condition pack-mtimes: avoid closing a bogus file descriptor read_index_from(): avoid memory leak submodule--helper: avoid memory leak when fetching submodules submodule-config: avoid memory leak fsmonitor: avoid memory leak in `fsm_settings__get_incompatible_msg()` cache-tree: remove cache_tree_find_path() pack-write: drop always-NULL parameter t5329: test 'git gc --cruft' without '--prune=now' t2107: test 'git update-index --verbose' perf-lib: fix missing test titles in output transfer doc: move fetch.credentialsInUrl to "transfer" config namespace fetch doc: note "pushurl" caveat about "credentialsInUrl", elaborate ci(github): also mark up compile errors ci(github): use grouping also in the `win-build` job ...
2 parents 2b288c4 + 5b71c59 commit 74e34a0

36 files changed

+169
-142
lines changed

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ jobs:
119119
- name: test
120120
shell: bash
121121
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
122+
- name: print test failures
123+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
124+
shell: bash
125+
run: ci/print-test-failures.sh
122126
- name: Upload failed tests' directories
123127
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
124128
uses: actions/upload-artifact@v2
@@ -200,6 +204,10 @@ jobs:
200204
env:
201205
NO_SVN_TESTS: 1
202206
run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
207+
- name: print test failures
208+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
209+
shell: bash
210+
run: ci/print-test-failures.sh
203211
- name: Upload failed tests' directories
204212
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
205213
uses: actions/upload-artifact@v2
@@ -253,6 +261,10 @@ jobs:
253261
- uses: actions/checkout@v2
254262
- run: ci/install-dependencies.sh
255263
- run: ci/run-build-and-tests.sh
264+
- name: print test failures
265+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
266+
shell: bash
267+
run: ci/print-test-failures.sh
256268
- name: Upload failed tests' directories
257269
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
258270
uses: actions/upload-artifact@v2
@@ -282,6 +294,10 @@ jobs:
282294
- uses: actions/checkout@v1
283295
- run: ci/install-docker-dependencies.sh
284296
- run: ci/run-build-and-tests.sh
297+
- name: print test failures
298+
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
299+
shell: bash
300+
run: ci/print-test-failures.sh
285301
- name: Upload failed tests' directories
286302
if: failure() && env.FAILED_TEST_ARTIFACTS != ''
287303
uses: actions/upload-artifact@v1

Documentation/RelNotes/2.37.0.txt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ UI, Workflows & Features
5454

5555
* Update the doctype written in gitweb output to xhtml5.
5656

57-
* The "fetch.credentialsInUrl" configuration variable controls what
58-
happens when a URL with embedded login credential is used.
57+
* The "transfer.credentialsInURL" configuration variable controls what
58+
happens when a URL with embedded login credential is used on either
59+
"fetch" or "push". Credentials are currently only detected in
60+
`remote.<name>.url` config, not `remote.<name>.pushurl`.
5961

6062
* "git revert" learns "--reference" option to use more human-readable
6163
reference to the commit it reverts in the message template it
@@ -232,9 +234,8 @@ Fixes since v2.36
232234

233235
* With a recent update to refuse access to repositories of other
234236
people by default, "sudo make install" and "sudo git describe"
235-
stopped working. This series intends to loosen it while keeping
236-
the safety.
237-
(merge b9063afda1 cb/path-owner-check-with-sudo later to maint).
237+
stopped working, which has been corrected.
238+
(merge 6b11e3d52e cb/path-owner-check-with-sudo-plus later to maint).
238239

239240
* The tests that ensured merges stop when interfering local changes
240241
are present did not make sure that local changes are preserved; now
@@ -307,6 +308,9 @@ Fixes since v2.36
307308
* Use-after-free (with another forget-to-free) fix.
308309
(merge 323822c72b ab/remote-free-fix later to maint).
309310

311+
* Remove a coccinelle rule that is no longer relevant.
312+
(merge b1299de4a1 jc/cocci-cleanup later to maint).
313+
310314
* Other code cleanup, docfix, build fix, etc.
311315
(merge e6b2582da3 cm/reftable-0-length-memset later to maint).
312316
(merge 0b75e5bf22 ab/misc-cleanup later to maint).

Documentation/config/fetch.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -96,17 +96,3 @@ fetch.writeCommitGraph::
9696
merge and the write may take longer. Having an updated commit-graph
9797
file helps performance of many Git commands, including `git merge-base`,
9898
`git push -f`, and `git log --graph`. Defaults to false.
99-
100-
fetch.credentialsInUrl::
101-
A URL can contain plaintext credentials in the form
102-
`<protocol>://<user>:<password>@<domain>/<path>`. Using such URLs
103-
is not recommended as it exposes the password in multiple ways,
104-
including Git storing the URL as plaintext in the repository config.
105-
The `fetch.credentialsInUrl` option provides instruction for how Git
106-
should react to seeing such a URL, with these values:
107-
+
108-
* `allow` (default): Git will proceed with its activity without warning.
109-
* `warn`: Git will write a warning message to `stderr` when parsing a URL
110-
with a plaintext credential.
111-
* `die`: Git will write a failure message to `stderr` when parsing a URL
112-
with a plaintext credential.

Documentation/config/http.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ http.schannelUseSSLCAInfo::
203203
when the `schannel` backend was configured via `http.sslBackend`,
204204
unless `http.schannelUseSSLCAInfo` overrides this behavior.
205205

206-
http.pinnedpubkey::
206+
http.pinnedPubkey::
207207
Public key of the https service. It may either be the filename of
208208
a PEM or DER encoded public key file or a string starting with
209209
'sha256//' followed by the base64 encoded sha256 hash of the

Documentation/config/safe.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,13 @@ that you deem safe.
3030
As explained, Git only allows you to access repositories owned by
3131
yourself, i.e. the user who is running Git, by default. When Git
3232
is running as 'root' in a non Windows platform that provides sudo,
33-
however, git checks the SUDO_UID environment variable that sudo creates
34-
and will allow access to the uid recorded as its value instead.
33+
however, git checks the SUDO_UID environment variable that sudo creates
34+
and will allow access to the uid recorded as its value in addition to
35+
the id from 'root'.
3536
This is to make it easy to perform a common sequence during installation
3637
"make && sudo make install". A git process running under 'sudo' runs as
3738
'root' but the 'sudo' command exports the environment variable to record
3839
which id the original user has.
3940
If that is not what you would prefer and want git to only trust
40-
repositories that are owned by root instead, then you must remove
41+
repositories that are owned by root instead, then you can remove
4142
the `SUDO_UID` variable from root's environment before invoking git.

Documentation/config/transfer.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
transfer.credentialsInUrl::
2+
A configured URL can contain plaintext credentials in the form
3+
`<protocol>://<user>:<password>@<domain>/<path>`. You may want
4+
to warn or forbid the use of such configuration (in favor of
5+
using linkgit:git-credential[1]). This will be used on
6+
linkgit:git-clone[1], linkgit:git-fetch[1], linkgit:git-push[1],
7+
and any other direct use of the configured URL.
8+
+
9+
Note that this is currently limited to detecting credentials in
10+
`remote.<name>.url` configuration, it won't detect credentials in
11+
`remote.<name>.pushurl` configuration.
12+
+
13+
You might want to enable this to prevent inadvertent credentials
14+
exposure, e.g. because:
15+
+
16+
* The OS or system where you're running git may not provide way way or
17+
otherwise allow you to configure the permissions of the
18+
configuration file where the username and/or password are stored.
19+
* Even if it does, having such data stored "at rest" might expose you
20+
in other ways, e.g. a backup process might copy the data to another
21+
system.
22+
* The git programs will pass the full URL to one another as arguments
23+
on the command-line, meaning the credentials will be exposed to oher
24+
users on OS's or systems that allow other users to see the full
25+
process list of other users. On linux the "hidepid" setting
26+
documented in procfs(5) allows for configuring this behavior.
27+
+
28+
If such concerns don't apply to you then you probably don't need to be
29+
concerned about credentials exposure due to storing that sensitive
30+
data in git's configuration files. If you do want to use this, set
31+
`transfer.credentialsInUrl` to one of these values:
32+
+
33+
* `allow` (default): Git will proceed with its activity without warning.
34+
* `warn`: Git will write a warning message to `stderr` when parsing a URL
35+
with a plaintext credential.
36+
* `die`: Git will write a failure message to `stderr` when parsing a URL
37+
with a plaintext credential.
38+
139
transfer.fsckObjects::
240
When `fetch.fsckObjects` or `receive.fsckObjects` are
341
not set, the value of this variable is used instead.

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.36.GIT
4+
DEF_VER=v2.37.0-rc1
55

66
LF='
77
'

builtin/fast-import.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3465,7 +3465,7 @@ static void git_pack_config(void)
34653465
pack_idx_opts.version = indexversion_value;
34663466
if (pack_idx_opts.version > 2)
34673467
git_die_config("pack.indexversion",
3468-
"bad pack.indexversion=%"PRIu32, pack_idx_opts.version);
3468+
"bad pack.indexVersion=%"PRIu32, pack_idx_opts.version);
34693469
}
34703470
if (!git_config_get_ulong("pack.packsizelimit", &packsizelimit_value))
34713471
max_packsize = packsizelimit_value;

builtin/gc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
581581
/* default expiry time, overwritten in gc_config */
582582
gc_config();
583583
if (parse_expiry_date(gc_log_expire, &gc_log_expire_time))
584-
die(_("failed to parse gc.logexpiry value %s"), gc_log_expire);
584+
die(_("failed to parse gc.logExpiry value %s"), gc_log_expire);
585585

586586
if (pack_refs < 0)
587587
pack_refs = !is_bare_repository();

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1575,7 +1575,7 @@ static int git_index_pack_config(const char *k, const char *v, void *cb)
15751575
if (!strcmp(k, "pack.indexversion")) {
15761576
opts->version = git_config_int(k, v);
15771577
if (opts->version > 2)
1578-
die(_("bad pack.indexversion=%"PRIu32), opts->version);
1578+
die(_("bad pack.indexVersion=%"PRIu32), opts->version);
15791579
return 0;
15801580
}
15811581
if (!strcmp(k, "pack.threads")) {

0 commit comments

Comments
 (0)