<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.c, branch v2.37.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.37.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.37.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2022-06-17T17:38:26Z</updated>
<entry>
<title>i18n: fix mismatched camelCase config variables</title>
<updated>2022-06-17T17:38:26Z</updated>
<author>
<name>Jiang Xin</name>
<email>zhiyou.jx@alibaba-inc.com</email>
</author>
<published>2022-06-17T10:03:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b4eda05d58ca3e4808d3d86ab5826c77995a06f7'/>
<id>urn:sha1:b4eda05d58ca3e4808d3d86ab5826c77995a06f7</id>
<content type='text'>
Some config variables are combinations of multiple words, and we
typically write them in camelCase forms in manpage and translatable
strings. It's not easy to find mismatches for these camelCase config
variables during code reviews, but occasionally they are identified
during localization translations.

To check for mismatched config variables, I introduced a new feature
in the helper program for localization[^1]. The following mismatched
config variables have been identified by running the helper program,
such as "git-po-helper check-pot".

Lowercase in manpage should use camelCase:

 * Documentation/config/http.txt: http.pinnedpubkey

Lowercase in translable strings should use camelCase:

 * builtin/fast-import.c:  pack.indexversion
 * builtin/gc.c:           gc.logexpiry
 * builtin/index-pack.c:   pack.indexversion
 * builtin/pack-objects.c: pack.indexversion
 * builtin/repack.c:       pack.writebitmaps
 * commit.c:               i18n.commitencoding
 * gpg-interface.c:        user.signingkey
 * http.c:                 http.postbuffer
 * submodule-config.c:     submodule.fetchjobs

Mismatched camelCases, choose the former:

 * Documentation/config/transfer.txt: transfer.credentialsInUrl
   remote.c:                          transfer.credentialsInURL

[^1]: https://github.com/git-l10n/git-po-helper

Signed-off-by: Jiang Xin &lt;zhiyou.jx@alibaba-inc.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/credentials-in-url-more'</title>
<updated>2022-06-17T17:33:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-17T17:33:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f5a382aa5eb54509a4de4d399d8b35c48d91c65'/>
<id>urn:sha1:7f5a382aa5eb54509a4de4d399d8b35c48d91c65</id>
<content type='text'>
Rename fetch.credentialsInUrl to transfer.credentialsInUrl as the
single configuration variable should work both in pushing and
fetching.

* ab/credentials-in-url-more:
  transfer doc: move fetch.credentialsInUrl to "transfer" config namespace
  fetch doc: note "pushurl" caveat about "credentialsInUrl", elaborate
</content>
</entry>
<entry>
<title>relative_url(): fix incorrect condition</title>
<updated>2022-06-16T20:22:03Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2022-06-15T23:35:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c918f5c1ab0c4dec916b747916236ca0d3655be5'/>
<id>urn:sha1:c918f5c1ab0c4dec916b747916236ca0d3655be5</id>
<content type='text'>
In 63e95beb085c (submodule: port resolve_relative_url from shell to C,
2016-04-15), we added a loop over `url` where we are looking for `../`
or `./` components.

The loop condition we used is the pointer `url` itself, which is clearly
not what we wanted.

Pointed out by Coverity.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>transfer doc: move fetch.credentialsInUrl to "transfer" config namespace</title>
<updated>2022-06-15T18:40:11Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-15T10:44:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7281c196b1166f1c00df33948c67b0ef81ba63a9'/>
<id>urn:sha1:7281c196b1166f1c00df33948c67b0ef81ba63a9</id>
<content type='text'>
Rename the "fetch.credentialsInUrl" configuration variable introduced
in 6dcbdc0d661 (remote: create fetch.credentialsInUrl config,
2022-06-06) to "transfer".

There are existing exceptions, but generally speaking the
"&lt;namespace&gt;.&lt;var&gt;" configuration should only apply to command
described in the "namespace" (and its sub-commands, so e.g. "clone.*"
or "fetch.*" might also configure "git-remote-https").

But in the case of "fetch.credentialsInUrl" we've got a configuration
variable that configures the behavior of all of "clone", "push" and
"fetch", someone adjusting "fetch.*" configuration won't expect to
have the behavior of "git push" altered, especially as we have the
pre-existing "{transfer,fetch,receive}.fsckObjects", which configures
different parts of the transfer dialog.

So let's move this configuration variable to the "transfer" namespace
before it's exposed in a release. We could add all of
"{transfer,fetch,pull}.credentialsInUrl" at some other time, but once
we have "fetch" configure "pull" such an arrangement would would be a
confusing mess, as we'd at least need to have "fetch" configure
"push" (but not the other way around), or change existing behavior.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Acked-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ab/remote-free-fix'</title>
<updated>2022-06-13T22:53:43Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-13T22:53:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fe66167535dd8b395f16fcba7863c36beb365ef9'/>
<id>urn:sha1:fe66167535dd8b395f16fcba7863c36beb365ef9</id>
<content type='text'>
Use-after-free (with another forget-to-free) fix.

* ab/remote-free-fix:
  remote.c: don't dereference NULL in freeing loop
  remote.c: remove braces from one-statement "for"-loops
</content>
</entry>
<entry>
<title>Merge branch 'ds/credentials-in-url'</title>
<updated>2022-06-13T22:53:42Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-13T22:53:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=11698e551ce0590af6d7ce1f5b683eca27e68ab3'/>
<id>urn:sha1:11698e551ce0590af6d7ce1f5b683eca27e68ab3</id>
<content type='text'>
The "fetch.credentialsInUrl" configuration variable controls what
happens when a URL with embedded login credential is used.

* ds/credentials-in-url:
  remote: create fetch.credentialsInUrl config
</content>
</entry>
<entry>
<title>Merge branch 'gc/zero-length-branch-config-fix'</title>
<updated>2022-06-10T22:04:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-10T22:04:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0b91d563d8d9615d1dc400b7c5e92ebd7933d01d'/>
<id>urn:sha1:0b91d563d8d9615d1dc400b7c5e92ebd7933d01d</id>
<content type='text'>
A misconfigured 'branch..remote' led to a bug in configuration
parsing.

* gc/zero-length-branch-config-fix:
  remote.c: reject 0-length branch names
  remote.c: don't BUG() on 0-length branch names
</content>
</entry>
<entry>
<title>Merge branch 'ab/plug-leak-in-revisions'</title>
<updated>2022-06-07T21:10:56Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2022-06-07T21:10:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2da81d1efb0166e1cec7a8582b837994dde6225b'/>
<id>urn:sha1:2da81d1efb0166e1cec7a8582b837994dde6225b</id>
<content type='text'>
Plug the memory leaks from the trickiest API of all, the revision
walker.

* ab/plug-leak-in-revisions: (27 commits)
  revisions API: add a TODO for diff_free(&amp;revs-&gt;diffopt)
  revisions API: have release_revisions() release "topo_walk_info"
  revisions API: have release_revisions() release "date_mode"
  revisions API: call diff_free(&amp;revs-&gt;pruning) in revisions_release()
  revisions API: release "reflog_info" in release revisions()
  revisions API: clear "boundary_commits" in release_revisions()
  revisions API: have release_revisions() release "prune_data"
  revisions API: have release_revisions() release "grep_filter"
  revisions API: have release_revisions() release "filter"
  revisions API: have release_revisions() release "cmdline"
  revisions API: have release_revisions() release "mailmap"
  revisions API: have release_revisions() release "commits"
  revisions API users: use release_revisions() for "prune_data" users
  revisions API users: use release_revisions() with UNLEAK()
  revisions API users: use release_revisions() in builtin/log.c
  revisions API users: use release_revisions() in http-push.c
  revisions API users: add "goto cleanup" for release_revisions()
  stash: always have the owner of "stash_info" free it
  revisions API users: use release_revisions() needing REV_INFO_INIT
  revision.[ch]: document and move code declared around "init"
  ...
</content>
</entry>
<entry>
<title>remote.c: don't dereference NULL in freeing loop</title>
<updated>2022-06-07T17:23:47Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-07T15:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=323822c72be59ce2900cc036c5bad4f10bafbb53'/>
<id>urn:sha1:323822c72be59ce2900cc036c5bad4f10bafbb53</id>
<content type='text'>
Fix a bug in fd3cb0501e1 (remote: move static variables into
per-repository struct, 2021-11-17) where we'd free(remote-&gt;pushurl[i])
after having NULL'd out remote-&gt;pushurl. itself. We free
"remote-&gt;pushurl" in the next "for"-loop, so doing this appears to
have been a copy/paste error.

Before this change GCC 12's -fanalyzer would correctly note that we'd
dereference NULL in this case, this change fixes that:

	remote.c: In function ‘remote_clear’:
	remote.c:153:17: error: dereference of NULL ‘*remote.pushurl’ [CWE-476] [-Werror=analyzer-null-dereference]
	  153 |                 free((char *)remote-&gt;pushurl[i]);
	      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	      [...]

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote.c: remove braces from one-statement "for"-loops</title>
<updated>2022-06-07T17:23:42Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2022-06-07T15:50:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=338959da3e46340dfcec3af361c6062c3a992668'/>
<id>urn:sha1:338959da3e46340dfcec3af361c6062c3a992668</id>
<content type='text'>
Remove braces that don't follow the CodingGuidelines from code added
in fd3cb0501e1 (remote: move static variables into per-repository
struct, 2021-11-17). A subsequent commit will edit code adjacent to
this.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
