<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/git-remote.txt, branch v2.45.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-02-21T18:02:55Z</updated>
<entry>
<title>git-remote.txt: fix typo</title>
<updated>2024-02-21T18:02:55Z</updated>
<author>
<name>Jakub Wilk</name>
<email>jwilk@jwilk.net</email>
</author>
<published>2024-02-21T08:35:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6835f0efe9dd4456d296dbe375bc4ea100560618'/>
<id>urn:sha1:6835f0efe9dd4456d296dbe375bc4ea100560618</id>
<content type='text'>
Signed-off-by: Jakub Wilk &lt;jwilk@jwilk.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/remote.c: teach `-v` to list filters for promisor remotes</title>
<updated>2022-05-09T17:53:58Z</updated>
<author>
<name>Abhradeep Chakraborty</name>
<email>chakrabortyabhradeep79@gmail.com</email>
</author>
<published>2022-05-09T11:32:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ef6d15ca536a50d916f8d9c7f600d650810161b1'/>
<id>urn:sha1:ef6d15ca536a50d916f8d9c7f600d650810161b1</id>
<content type='text'>
`git remote -v` (`--verbose`) lists down the names of remotes along with
their URLs. It would be beneficial for users to also specify the filter
types for promisor remotes. Something like this -

	origin	remote-url (fetch) [blob:none]
	origin	remote-url (push)

Teach `git remote -v` to also specify the filters for promisor remotes.

Closes: https://github.com/gitgitgadget/git/issues/1211
Signed-off-by: Abhradeep Chakraborty &lt;chakrabortyabhradeep79@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>builtin/remote.c: show progress when renaming remote references</title>
<updated>2022-03-03T22:44:05Z</updated>
<author>
<name>Taylor Blau</name>
<email>me@ttaylorr.com</email>
</author>
<published>2022-03-03T22:25:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=56710a7ae0170404d7bc6411bd5c9a18124c0629'/>
<id>urn:sha1:56710a7ae0170404d7bc6411bd5c9a18124c0629</id>
<content type='text'>
When renaming a remote, Git needs to rename all remote tracking
references to the remote's new name (e.g., renaming
"refs/remotes/old/foo" to "refs/remotes/new/foo" when renaming a remote
from "old" to "new").

This can be somewhat slow when there are many references to rename,
since each rename is done in a separate call to rename_ref() as opposed
to grouping all renames together into the same transaction. It would be
nice to execute all renames as a single transaction, but there is a
snag: the reference transaction backend doesn't support renames during a
transaction (only individually, via rename_ref()).

The reasons there are described in more detail in [1], but the main
problem is that in order to preserve the existing reflog, it must be
moved while holding both locks (i.e., on "oldname" and "newname"), and
the ref transaction code doesn't support inserting arbitrary actions
into the middle of a transaction like that.

As an aside, adding support for this to the ref transaction code is
less straightforward than inserting both a ref_update() and ref_delete()
call into the same transaction. rename_ref()'s special handling to
detect D/F conflicts would need to be rewritten for the transaction code
if we wanted to proactively catch D/F conflicts when renaming a
reference during a transaction. The reftable backend could support this
much more readily because of its lack of D/F conflicts.

Instead of a more complex modification to the ref transaction code,
display a progress meter when running verbosely in order to convince the
user that Git is doing work while renaming a remote.

This is mostly done as-expected, with the minor caveat that we
intentionally count symrefs renames twice, since renaming a symref takes
place over two separate calls (one to delete the old one, and another to
create the new one).

[1]: https://lore.kernel.org/git/572367B4.4050207@alum.mit.edu/

Suggested-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Taylor Blau &lt;me@ttaylorr.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>doc: uniformize &lt;URL&gt; placeholders' case</title>
<updated>2021-11-09T17:39:11Z</updated>
<author>
<name>Jean-Noël Avila</name>
<email>jn.avila@free.fr</email>
</author>
<published>2021-11-06T18:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7706294ec94ab9f9b864a8451ac089f15d18a254'/>
<id>urn:sha1:7706294ec94ab9f9b864a8451ac089f15d18a254</id>
<content type='text'>
URL being an acronym, it deserves to be kept uppercase.

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>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>
</feed>
