<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git.txt, branch v2.35.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.35.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.35.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-12-10T22:35:04Z</updated>
<entry>
<title>Merge branch 'if/redact-packfile-uri'</title>
<updated>2021-12-10T22:35:04Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-12-10T22:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5e7f5e5b18f1ec969c66a6e5b2b7f4caae34c0a'/>
<id>urn:sha1:b5e7f5e5b18f1ec969c66a6e5b2b7f4caae34c0a</id>
<content type='text'>
Redact the path part of packfile URI that appears in the trace output.

* if/redact-packfile-uri:
  http-fetch: redact url on die() message
  fetch-pack: redact packfile urls in traces
</content>
</entry>
<entry>
<title>fetch-pack: redact packfile urls in traces</title>
<updated>2021-11-11T18:07:43Z</updated>
<author>
<name>Ivan Frade</name>
<email>ifrade@google.com</email>
</author>
<published>2021-11-10T23:51:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=88e9b1e3fcbd3a8edcf1d54528c49f8237906aba'/>
<id>urn:sha1:88e9b1e3fcbd3a8edcf1d54528c49f8237906aba</id>
<content type='text'>
In some setups, packfile uris act as bearer token. It is not
recommended to expose them plainly in logs, although in special
circunstances (e.g. debug) it makes sense to write them.

Redact the packfile URL paths by default, unless the GIT_TRACE_REDACT
variable is set to false. This mimics the redacting of the Authorization
header in HTTP.

Signed-off-by: Ivan Frade &lt;ifrade@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ma/doc-git-version'</title>
<updated>2021-10-29T22:43:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-10-29T22:43:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8b3bef88f7b887d9486f678bf191184e50656b2c'/>
<id>urn:sha1:8b3bef88f7b887d9486f678bf191184e50656b2c</id>
<content type='text'>
Typofix.

* ma/doc-git-version:
  git.txt: fix typo
</content>
</entry>
<entry>
<title>git.txt: fix typo</title>
<updated>2021-10-25T17:19:30Z</updated>
<author>
<name>Martin Ågren</name>
<email>martin.agren@gmail.com</email>
</author>
<published>2021-10-24T17:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82a57cd13fa12b30607ebe5fabf51a2ade638f2c'/>
<id>urn:sha1:82a57cd13fa12b30607ebe5fabf51a2ade638f2c</id>
<content type='text'>
Fix the spelling of "internally".

Signed-off-by: Martin Ågren &lt;martin.agren@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>refs: turn on GIT_REF_PARANOIA by default</title>
<updated>2021-09-27T19:36:45Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-09-24T18:46:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=968f12fdac2601086dea7e10db17f1c50d704a07'/>
<id>urn:sha1:968f12fdac2601086dea7e10db17f1c50d704a07</id>
<content type='text'>
The original point of the GIT_REF_PARANOIA flag was to include broken
refs in iterations, so that possibly-destructive operations would not
silently ignore them (and would generally instead try to operate on the
oids and fail when the objects could not be accessed).

We already turned this on by default for some dangerous operations, like
"repack -ad" (where missing a reachability tip would mean dropping the
associated history). But it was not on for general use, even though it
could easily result in the spreading of corruption (e.g., imagine
cloning a repository which simply omits some of its refs because
their objects are missing; the result quietly succeeds even though you
did not clone everything!).

This patch turns on GIT_REF_PARANOIA by default. So a clone as mentioned
above would actually fail (upload-pack tells us about the broken ref,
and when we ask for the objects, pack-objects fails to deliver them).
This may be inconvenient when working with a corrupted repository, but:

  - we are better off to err on the side of complaining about
    corruption, and then provide mechanisms for explicitly loosening
    safety.

  - this is only one type of corruption anyway. If we are missing any
    other objects in the history that _aren't_ ref tips, then we'd
    behave similarly (happily show the ref, but then barf when we
    started traversing).

We retain the GIT_REF_PARANOIA variable, but simply default it to "1"
instead of "0". That gives the user an escape hatch for loosening this
when working with a corrupt repository. It won't work across a remote
connection to upload-pack (because we can't necessarily set environment
variables on the remote), but there the client has other options (e.g.,
choosing which refs to fetch).

As a bonus, this also makes ref iteration faster in general (because we
don't have to call has_object_file() for each ref), though probably not
noticeably so in the general case. In a repo with a million refs, it
shaved a few hundred milliseconds off of upload-pack's advertisement;
that's noticeable, but most repos are not nearly that large.

The possible downside here is that any operation which iterates refs but
doesn't ever open their objects may now quietly claim to have X when the
object is corrupted (e.g., "git rev-list new-branch --not --all" will
treat a broken ref as uninteresting). But again, that's not really any
different than corruption below the ref level. We might have
refs/heads/old-branch as non-corrupt, but we are not actively checking
that we have the entire reachable history. Or the pointed-to object
could even be corrupted on-disk (but our "do we have it" check would
still succeed). In that sense, this is merely bringing ref-corruption in
line with general object corruption.

One alternative implementation would be to actually check for broken
refs, and then _immediately die_ if we see any. That would cause the
"rev-list --not --all" case above to abort immediately. But in many ways
that's the worst of all worlds:

  - it still spends time looking up the objects an extra time

  - it still doesn't catch corruption below the ref level

  - it's even more inconvenient; with the current implementation of
    GIT_REF_PARANOIA for something like upload-pack, we can make
    the advertisement and let the client choose a non-broken piece of
    history. If we bail as soon as we see a broken ref, they cannot even
    see the advertisement.

The test changes here show some of the fallout. A non-destructive "git
repack -adk" now fails by default (but we can override it). Deleting a
broken ref now actually tells the hooks the correct "before" state,
rather than a confusing null oid.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Reviewed-by: Jonathan Tan &lt;jonathantanmy@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ma/doc-git-version'</title>
<updated>2021-09-23T20:44:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-09-23T20:44:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=188da7dc094e5930d1b83c5d97f8c70c926984eb'/>
<id>urn:sha1:188da7dc094e5930d1b83c5d97f8c70c926984eb</id>
<content type='text'>
Doc update.

* ma/doc-git-version:
  documentation: add documentation for 'git version'
</content>
</entry>
<entry>
<title>documentation: add documentation for 'git version'</title>
<updated>2021-09-14T17:05:40Z</updated>
<author>
<name>Matthias Aßhauer</name>
<email>mha1993@live.de</email>
</author>
<published>2021-09-14T13:27:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b6d8887d3d607e0da971218f20428c0635c6362c'/>
<id>urn:sha1:b6d8887d3d607e0da971218f20428c0635c6362c</id>
<content type='text'>
While 'git version' is probably the least complex git command,
it is a non-experimental user-facing builtin command. As such
it should have a help page.

Both `git help` and `git version` can be called as options
(`--help`/`--version`) that internally get converted to the
corresponding command. Add a small paragraph to
Documentation/git.txt describing how these two options
interact with each other and link to this help page for the
sub-options that `--version` can take. Well, currently there
is only one sub-option, but that could potentially increase
in future versions of Git.

Signed-off-by: Matthias Aßhauer &lt;mha1993@live.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>docs/git: discuss server-side config for GIT_PROTOCOL</title>
<updated>2021-09-10T22:34:59Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2021-09-10T14:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2834a72d5e22fa1138efdeb1f515e894d743cfb4'/>
<id>urn:sha1:2834a72d5e22fa1138efdeb1f515e894d743cfb4</id>
<content type='text'>
The v2 protocol requires that the GIT_PROTOCOL environment variable gets
passed around, but we don't have any documentation describing how this
is supposed to work. In particular, we need to note what server admins
might need to configure to make things work.

The definition of the GIT_PROTOCOL variable is probably the best place
for this, since:

  - we deal with multiple transports (ssh, http, etc).
    Transport-specific documentation (like the git-http-backend bits
    added in the previous commit) are helpful for those transports, but
    this gives a broader overview. Plus we do not have a specific
    transport endpoint program for ssh, so this is a reasonable place to
    mention it.

  - the server side of the protocol involves multiple programs. For now,
    upload-pack is the only endpoint which uses GIT_PROTOCOL, but that
    will likely expand in the future. We're better off with a central
    discussion of what the server admin might need to do. However, for
    discoverability, this patch adds a pointer from upload-pack's
    documentation.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ps/config-global-override'</title>
<updated>2021-05-07T03:47:39Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e706aaf3bc8ad97877cbf21887f96c5af66c7562'/>
<id>urn:sha1:e706aaf3bc8ad97877cbf21887f96c5af66c7562</id>
<content type='text'>
Replace GIT_CONFIG_NOSYSTEM mechanism to decline from reading the
system-wide configuration file with GIT_CONFIG_SYSTEM that lets
users specify from which file to read the system-wide configuration
(setting it to an empty file would essentially be the same as
setting NOSYSTEM), and introduce GIT_CONFIG_GLOBAL to override the
per-user configuration in $HOME/.gitconfig.

* ps/config-global-override:
  t1300: fix unset of GIT_CONFIG_NOSYSTEM leaking into subsequent tests
  config: allow overriding of global and system configuration
  config: unify code paths to get global config paths
  config: rename `git_etc_config()`
</content>
</entry>
<entry>
<title>Merge branch 'ps/config-env-option-with-separate-value'</title>
<updated>2021-05-07T03:47:37Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-05-07T03:47:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f586f55a02b98d7a2a9c770d33e8170ca563e43'/>
<id>urn:sha1:5f586f55a02b98d7a2a9c770d33e8170ca563e43</id>
<content type='text'>
"git --config-env var=val cmd" weren't accepted (only
--config-env=var=val was).

* ps/config-env-option-with-separate-value:
  git: support separate arg for `--config-env`'s value
  git.txt: fix synopsis of `--config-env` missing the equals sign
</content>
</entry>
</feed>
