<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/remote.h, branch v2.4.9</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.9</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2015-02-11T21:44:07Z</updated>
<entry>
<title>Merge branch 'jc/unused-symbols'</title>
<updated>2015-02-11T21:44:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-02-11T21:44:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c985aaf87909ab7f8194b3cfed3a744cbff78fe9'/>
<id>urn:sha1:c985aaf87909ab7f8194b3cfed3a744cbff78fe9</id>
<content type='text'>
Mark file-local symbols as "static", and drop functions that nobody
uses.

* jc/unused-symbols:
  shallow.c: make check_shallow_file_for_update() static
  remote.c: make clear_cas_option() static
  urlmatch.c: make match_urls() static
  revision.c: make save_parents() and free_saved_parents() static
  line-log.c: make line_log_data_init() static
  pack-bitmap.c: make pack_bitmap_filename() static
  prompt.c: remove git_getpass() nobody uses
  http.c: make finish_active_slot() and handle_curl_result() static
</content>
</entry>
<entry>
<title>remote.c: make clear_cas_option() static</title>
<updated>2015-01-15T19:05:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-01-14T22:58:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a355b11daba73f8a73866a318d5eb8550285332b'/>
<id>urn:sha1:a355b11daba73f8a73866a318d5eb8550285332b</id>
<content type='text'>
No external callers exist.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>send-pack.c: add --atomic command line argument</title>
<updated>2015-01-08T03:56:44Z</updated>
<author>
<name>Ronnie Sahlberg</name>
<email>sahlberg@google.com</email>
</author>
<published>2015-01-08T03:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4ff17f10c4297ab3d9948d4216016ca367e737e3'/>
<id>urn:sha1:4ff17f10c4297ab3d9948d4216016ca367e737e3</id>
<content type='text'>
This adds support to send-pack to negotiate and use atomic pushes
iff the server supports it. Atomic pushes are activated by a new command
line flag --atomic.

In order to do this we also need to change the semantics for send_pack()
slightly. The existing send_pack() function actually doesn't send all the
refs back to the server when multiple refs are involved, for example
when using --all. Several of the failure modes for pushes can already be
detected locally in the send_pack client based on the information from the
initial server side list of all the refs as generated by receive-pack.
Any such refs that we thus know would fail to push are thus pruned from
the list of refs we send to the server to update.

For atomic pushes, we have to deal thus with both failures that are detected
locally as well as failures that are reported back from the server. In order
to do so we treat all local failures as push failures too.

We introduce a new status code REF_STATUS_ATOMIC_PUSH_FAILED so we can
flag all refs that we would normally have tried to push to the server
but we did not due to local failures. This is to improve the error message
back to the end user to flag that "these refs failed to update since the
atomic push operation failed."

Signed-off-by: Ronnie Sahlberg &lt;sahlberg@google.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use a hashmap to make remotes faster</title>
<updated>2014-07-30T18:29:33Z</updated>
<author>
<name>Patrick Reynolds</name>
<email>patrick.reynolds@github.com</email>
</author>
<published>2014-07-29T14:43:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d0da003d5b1e65f6e52920e42582f43b357782ee'/>
<id>urn:sha1:d0da003d5b1e65f6e52920e42582f43b357782ee</id>
<content type='text'>
Remotes are stored as an array, so looking one up or adding one without
duplication is an O(n) operation.  Reading an entire config file full of
remotes is O(n^2) in the number of remotes.  For a repository with tens of
thousands of remotes, the running time can hit multiple minutes.

Hash tables are way faster.  So we add a hashmap from remote name to
struct remote and use it for all lookups.  The time to add a new remote to
a repo that already has 50,000 remotes drops from ~2 minutes to &lt; 1
second.

We retain the old array of remotes so iterators proceed in config-file
order.

Signed-off-by: Patrick Reynolds &lt;patrick.reynolds@github.com&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>push: detect local refspec errors early</title>
<updated>2014-03-05T21:23:27Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-03-05T19:04:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba928c13d75172799f5f06f922e5c2f3232cf114'/>
<id>urn:sha1:ba928c13d75172799f5f06f922e5c2f3232cf114</id>
<content type='text'>
When pushing, we do not even look at our push refspecs until
after we have made contact with the remote receive-pack and
gotten its list of refs. This means that we may go to some
work, including asking the user to log in, before realizing
we have simple errors like "git push origin matser".

We cannot catch all refspec problems, since fully evaluating
the refspecs requires knowing what the remote side has. But
we can do a quick sanity check of the local side and catch a
few simple error cases.

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 'nd/shallow-clone'</title>
<updated>2014-01-17T20:21:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-01-17T20:21:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb'/>
<id>urn:sha1:92251b1b5b5e53ac9de890105e2a2bd9d15e2ecb</id>
<content type='text'>
Fetching from a shallow-cloned repository used to be forbidden,
primarily because the codepaths involved were not carefully vetted
and we did not bother supporting such usage. This attempts to allow
object transfer out of a shallow-cloned repository in a controlled
way (i.e. the receiver become a shallow repository with truncated
history).

* nd/shallow-clone: (31 commits)
  t5537: fix incorrect expectation in test case 10
  shallow: remove unused code
  send-pack.c: mark a file-local function static
  git-clone.txt: remove shallow clone limitations
  prune: clean .git/shallow after pruning objects
  clone: use git protocol for cloning shallow repo locally
  send-pack: support pushing from a shallow clone via http
  receive-pack: support pushing to a shallow clone via http
  smart-http: support shallow fetch/clone
  remote-curl: pass ref SHA-1 to fetch-pack as well
  send-pack: support pushing to a shallow clone
  receive-pack: allow pushes that update .git/shallow
  connected.c: add new variant that runs with --shallow-file
  add GIT_SHALLOW_FILE to propagate --shallow-file to subprocesses
  receive/send-pack: support pushing from a shallow clone
  receive-pack: reorder some code in unpack()
  fetch: add --update-shallow to accept refs that update .git/shallow
  upload-pack: make sure deepening preserves shallow roots
  fetch: support fetching from a shallow repository
  clone: support remote shallow repository
  ...
</content>
</entry>
<entry>
<title>Merge branch 'jc/push-refmap'</title>
<updated>2013-12-27T22:57:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-12-27T22:57:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7cdebd8a2039cb3ec717b880709ea6dfd824e3c4'/>
<id>urn:sha1:7cdebd8a2039cb3ec717b880709ea6dfd824e3c4</id>
<content type='text'>
Make "git push origin master" update the same ref that would be
updated by our 'master' when "git push origin" (no refspecs) is run
while the 'master' branch is checked out, which makes "git push"
more symmetric to "git fetch" and more usable for the triangular
workflow.

* jc/push-refmap:
  push: also use "upstream" mapping when pushing a single ref
  push: use remote.$name.push as a refmap
  builtin/push.c: use strbuf instead of manual allocation
</content>
</entry>
<entry>
<title>fetch: support fetching from a shallow repository</title>
<updated>2013-12-11T00:14:17Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-05T13:02:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4820a33baa963c4559736d7a1c4c35f8dcb37293'/>
<id>urn:sha1:4820a33baa963c4559736d7a1c4c35f8dcb37293</id>
<content type='text'>
This patch just put together pieces from the 8 steps patch. We stop at
step 7 and reject refs that require new shallow commits.

Note that, by rejecting refs that require new shallow commits, we
leave dangling objects in the repo, which become "object islands" by
the next "git fetch" of the same source.

If the first fetch our "ours" set is zero and we do practically
nothing at step 7, "ours" is full at the next fetch and we may need to
walk through commits for reachability test. Room for improvement.

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>connect.c: teach get_remote_heads to parse "shallow" lines</title>
<updated>2013-12-11T00:14:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-05T13:02:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b06dcd7d6829c86afda6b311cadf009ee4b4dd59'/>
<id>urn:sha1:b06dcd7d6829c86afda6b311cadf009ee4b4dd59</id>
<content type='text'>
No callers pass a non-empty pointer as shallow_points at this
stage. As a result, all clients still refuse to talk to shallow
repository on the other end.

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.h: replace struct extra_have_objects with struct sha1_array</title>
<updated>2013-12-11T00:14:15Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-05T13:02:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=13eb4626c43b3116bb431671d593565eadc36852'/>
<id>urn:sha1:13eb4626c43b3116bb431671d593565eadc36852</id>
<content type='text'>
The latter can do everything the former can and is used in many more
places.

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>
