<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-remote.txt, branch v2.33.6</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.33.6</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.33.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-10-27T18:40:33Z</updated>
<entry>
<title>remote: add meaningful exit code on missing/existing</title>
<updated>2020-10-27T18:40:33Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2020-10-27T09:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9144ba4cf52bb0e891d7c10a331fc32c1d3e8f64'/>
<id>urn:sha1:9144ba4cf52bb0e891d7c10a331fc32c1d3e8f64</id>
<content type='text'>
Change the exit code for the likes of "git remote add/rename" to exit
with 2 if the remote in question doesn't exist, and 3 if it
does. Before we'd just die() and exit with the general 128 exit code.

This changes the output message from e.g.:

    fatal: remote origin already exists.

To:

    error: remote origin already exists.

Which I believe is a feature, since we generally use "fatal" for the
generic errors, and "error" for the more specific ones with a custom
exit code, but this part of the change may break code that already
relies on stderr parsing (not that we ever supported that...).

The motivation for this is a discussion around some code in GitLab's
gitaly which wanted to check this, and had to parse stderr to do so:
https://gitlab.com/gitlab-org/gitaly/-/merge_requests/2695

It's worth noting as an aside that a method of checking this that
doesn't rely on that is to check with "git config" whether the value
in question does or doesn't exist. That introduces a TOCTOU race
condition, but on the other hand this code (e.g. "git remote add")
already has a TOCTOU race.

We go through the config.lock for the actual setting of the config,
but the pseudocode logic is:

    read_config();
    check_config_and_arg_sanity();
    save_config();

So e.g. if a sleep() is added right after the remote_is_configured()
check in add() we'll clobber remote.NAME.url, and add another (usually
duplicate) remote.NAME.fetch entry (and other values, depending on
invocation).

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>doc: git-remote fix ups</title>
<updated>2020-10-08T21:01:18Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2020-10-08T20:23:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=89eed6fa99915042792946a92b61fc64fed04b24'/>
<id>urn:sha1:89eed6fa99915042792946a92b61fc64fed04b24</id>
<content type='text'>
Signed-off-by: Jean-Noël Avila &lt;jn.avila@free.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: promote "git switch"</title>
<updated>2019-04-02T04:57:00Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2019-03-29T10:39:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=328c6cb853d7237098569de9f94bc3d259846a08'/>
<id>urn:sha1:328c6cb853d7237098569de9f94bc3d259846a08</id>
<content type='text'>
The new command "git switch" is added to avoid the confusion of
one-command-do-all "git checkout" for new users. They are also helpful
to avoid ambiguation context.

For these reasons, promote it everywhere possible. This includes
documentation, suggestions/advice from other commands...

The "Checking out files" progress line in unpack-trees.c is also updated
to "Updating files" to be neutral to both git-checkout and git-switch.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/remote-update-doc'</title>
<updated>2018-06-04T12:39:49Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-06-04T12:39:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=643a9ea3e0d2937155bbce43e17bb132dc7166ff'/>
<id>urn:sha1:643a9ea3e0d2937155bbce43e17bb132dc7166ff</id>
<content type='text'>
"git remote update" can take both a single remote nickname and a
nickname for remote groups, but only one of them was documented.

* nd/remote-update-doc:
  remote: doc typofix
  remote.txt: update documentation for 'update' command
</content>
</entry>
<entry>
<title>remote: doc typofix</title>
<updated>2018-06-04T11:04:33Z</updated>
<author>
<name>Duy Nguyen</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-30T15:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a97447a42a199c4f359608721c82e88cefb43a8e'/>
<id>urn:sha1:a97447a42a199c4f359608721c82e88cefb43a8e</id>
<content type='text'>
Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>remote.txt: update documentation for 'update' command</title>
<updated>2018-06-01T01:46:03Z</updated>
<author>
<name>Duy Nguyen</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-05-30T15:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=86f0b3727ced5db72ebbbd93f930671bfb9ab7be'/>
<id>urn:sha1:86f0b3727ced5db72ebbbd93f930671bfb9ab7be</id>
<content type='text'>
Commit b344e1614b (git remote update: Fallback to remote if group does
not exist - 2009-04-06) lets "git remote update" accept individual
remotes as well. Previously this command only accepted remote
groups. The commit updates the command syntax but not the actual
document of this subcommand. Update it.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: keep first level section header in upper case</title>
<updated>2018-05-02T08:03:33Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-04-30T15:35:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=76a8788c141e9d4e2713acaa7886475fb6b27ca5'/>
<id>urn:sha1:76a8788c141e9d4e2713acaa7886475fb6b27ca5</id>
<content type='text'>
When formatted as a man page, 1st section header is always in upper
case even if we write it otherwise. Make all 1st section headers
uppercase to keep it close to the final output.

This does affect html since case is kept there, but I still think it's
a good idea to maintain a consistent style for 1st section headers.

Some sections perhaps should become second sections instead, where
case is kept, and for better organization. I will update if anyone has
suggestions about this.

While at there I also make some header more consistent (e.g. examples
vs example) and fix a couple minor things here and there.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>git remote doc: correct dangerous lies about what prune does</title>
<updated>2018-02-09T21:10:12Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2018-02-09T20:32:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0e07472faa938c83e9b1f76567f16614672668c'/>
<id>urn:sha1:d0e07472faa938c83e9b1f76567f16614672668c</id>
<content type='text'>
The "git remote prune &lt;name&gt;" command uses the same machinery as "git
fetch &lt;name&gt; --prune", and shares all the same caveats, but its
documentation has suggested that it'll just "delete stale
remote-tracking branches under &lt;name&gt;".

This isn't true, and hasn't been true since at least v1.8.5.6 (the
oldest version I could be bothered to test).

E.g. if "refs/tags/*:refs/tags/*" is explicitly set in the refspec of
the remote, it'll delete all local tags &lt;name&gt; doesn't know about.

Instead, briefly give the reader just enough of a hint that this
option might constitute a shotgun aimed at their foot, and point them
to the new PRUNING section in the git-fetch documentation which
explains all the nuances of what this facility does.

See "[BUG] git remote prune removes local tags, depending on fetch
config" (CACi5S_39wNrbfjLfn0xhCY+uewtFN2YmnAcRc86z6pjUTjWPHQ@mail.gmail.com)
by Michael Giuffrida for the initial report.

Reported-by: Michael Giuffrida &lt;michaelpg@chromium.org&gt;
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>doc: typeset long command-line options as literal</title>
<updated>2016-06-28T15:36:45Z</updated>
<author>
<name>Matthieu Moy</name>
<email>Matthieu.Moy@imag.fr</email>
</author>
<published>2016-06-28T11:40:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bcf9626a71a0d90be65acc265ad0ec488d95d6ed'/>
<id>urn:sha1:bcf9626a71a0d90be65acc265ad0ec488d95d6ed</id>
<content type='text'>
Similarly to the previous commit, use backquotes instead of
forward-quotes, for long options.

This was obtained with:

  perl -pi -e "s/'(--[a-z][a-z=&lt;&gt;-]*)'/\`\$1\`/g" *.txt

and manual tweak to remove false positive in ascii-art (o'--o'--o' to
describe rewritten history).

Signed-off-by: Matthieu Moy &lt;Matthieu.Moy@imag.fr&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'xf/user-manual-markup'</title>
<updated>2015-10-29T20:59:14Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-29T20:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6abe8f4439a714c7587c45a3e115b75a6a889131'/>
<id>urn:sha1:6abe8f4439a714c7587c45a3e115b75a6a889131</id>
<content type='text'>
AsciiDoc markup fixes.

* xf/user-manual-markup:
  Documentation: match undefline with the text in old release notes
  Documentation: match underline with the text
  Documentation: fix header markup
</content>
</entry>
</feed>
