aboutsummaryrefslogtreecommitdiff
path: root/transport.c
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Junio C Hamano2009-08-12
|\ | | | | | | | | | | | | | | | | * maint: push: point to 'git pull' and 'git push --force' in case of non-fast forward Documentation: add: <filepattern>... is optional Change mentions of "git programs" to "git commands" Documentation: merge: one <remote> is required help.c: give correct structure's size to memset()
| * push: point to 'git pull' and 'git push --force' in case of non-fast forwardMatthieu Moy2009-08-12
| | | | | | | | | | | | | | | | | | | | | | | | 'git push' failing because of non-fast forward is a very common situation, and a beginner does not necessarily understand "fast forward" immediately. Add a new section to the git-push documentation and refer them to it. Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jk/push-quiet'Junio C Hamano2009-08-10
|\ \ | | | | | | | | | | | | | | | | | | * jk/push-quiet: transport: don't show push status if --quiet is given transport: pass "quiet" flag to pack-objects push: add --quiet flag
| * | transport: don't show push status if --quiet is givenJeff King2009-08-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When --quiet is given, the user generally only wants to see errors. So let's suppress printing the ref status table unless there is an error, in which case we print out the whole table. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | transport: pass "quiet" flag to pack-objectsJeff King2009-08-05
| |/ | | | | | | | | | | | | | | | | | | When pushing over the git protocol, pack-objects gives progress reports about the pack being sent. If "push" is given the --quiet flag, it now passes "-q" to pack-objects, suppressing this output. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/run-command-updates'Junio C Hamano2009-08-10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | * js/run-command-updates: api-run-command.txt: describe error behavior of run_command functions run-command.c: squelch a "use before assignment" warning receive-pack: remove unnecessary run_status report run_command: report failure to execute the program, but optionally don't run_command: encode deadly signal number in the return value run_command: report system call errors instead of returning error codes run_command: return exit code as positive value MinGW: simplify waitpid() emulation macros
| * run_command: report failure to execute the program, but optionally don'tJohannes Sixt2009-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where a program was not found, it was still the task of the caller to report an error to the user. Usually, this is an interesting case but only few callers actually reported a specific error (though many call sites report a generic error message regardless of the cause). With this change the error is reported by run_command, but since there is one call site in git.c that does not want that, an option is added to struct child_process, which is used to turn the error off. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * run_command: report system call errors instead of returning error codesJohannes Sixt2009-07-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this change is that system call failures are serious errors that should be reported to the user, but only few callers took the burden to decode the error codes that the functions returned into error messages. If at all, then only an unspecific error message was given. A prominent example is this: $ git upload-pack . | : fatal: unable to run 'git-upload-pack' In this example, git-upload-pack, the external command invoked through the git wrapper, dies due to SIGPIPE, but the git wrapper does not bother to report the real cause. In fact, this very error message is copied to the syslog if git-daemon's client aborts the connection early. With this change, system call failures are reported immediately after the failure and only a generic failure code is returned to the caller. In the above example the error is now to the point: $ git upload-pack . | : error: git-upload-pack died of signal Note that there is no error report if the invoked program terminated with a non-zero exit code, because it is reasonable to expect that the invoked program has already reported an error. (But many run_command call sites nevertheless write a generic error message.) There was one special return code that was used to identify the case where run_command failed because the requested program could not be exec'd. This special case is now treated like a system call failure with errno set to ENOENT. No error is reported in this case, because the call site in git.c expects this as a normal result. Therefore, the callers that carefully decoded the return value still check for this condition. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'ld/push-porcelain-output-format'Junio C Hamano2009-07-09
|\ \ | | | | | | | | | | | | * ld/push-porcelain-output-format: add --porcelain option to git-push
| * | add --porcelain option to git-pushLarry D'Anna2009-06-27
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | If --porcelain is used git-push will produce machine-readable output. The output status line for each ref will be tab-separated and sent to stdout instead of stderr. The full symbolic names of the refs will be given. For example $ git push --dry-run --porcelain master :foobar 2>/dev/null \ | perl -pe 's/\t/ TAB /g' = TAB refs/heads/master:refs/heads/master TAB [up to date] - TAB :refs/heads/foobar TAB [deleted] Signed-off-by: Larry D'Anna <larry@elder-gods.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'tr/die_errno'Junio C Hamano2009-07-06
|\ \ | |/ |/| | | | | | | | | | | * tr/die_errno: Use die_errno() instead of die() when checking syscalls Convert existing die(..., strerror(errno)) to die_errno() die_errno(): double % in strerror() output just in case Introduce die_errno() that appends strerror(errno) to die()
| * Use die_errno() instead of die() when checking syscallsThomas Rast2009-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of die() calls did not actually report the kind of error, which can leave the user confused as to the real problem. Use die_errno() where we check a system/library call that sets errno on failure, or one of the following that wrap such calls: Function Passes on error from -------- -------------------- odb_pack_keep open read_ancestry fopen read_in_full xread strbuf_read xread strbuf_read_file open or strbuf_read_file strbuf_readlink readlink write_in_full xwrite Signed-off-by: Thomas Rast <trast@student.ethz.ch> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'rc/http-push'Junio C Hamano2009-06-13
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rc/http-push: (22 commits) http*: add helper methods for fetching objects (loose) http*: add helper methods for fetching packs http: use new http API in fetch_index() http*: add http_get_info_packs http-push.c::fetch_symref(): use the new http API http-push.c::remote_exists(): use the new http API http.c::http_fetch_ref(): use the new http API transport.c::get_refs_via_curl(): use the new http API http.c: new functions for the http API http: create function end_url_with_slash http*: move common variables and macros to http.[ch] transport.c::get_refs_via_curl(): do not leak refs_url Don't expect verify_pack() callers to set pack_size http-push: do not SEGV after fetching a bad pack idx file http*: copy string returned by sha1_to_hex http-walker: verify remote packs http-push, http-walker: style fixes t5550-http-fetch: test fetching of packed objects http-push: fix missing "#ifdef USE_CURL_MULTI" around "is_running_queue" http-push: send out fetch requests on queue ...
| * | transport.c::get_refs_via_curl(): use the new http APIMike Hommey2009-06-06
| | | | | | | | | | | | | | | | | | Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * | transport.c::get_refs_via_curl(): do not leak refs_urlMike Hommey2009-06-06
| | | | | | | | | | | | | | | | | | Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'cb/match_refs_internal_tail'Junio C Hamano2009-06-13
|\ \ \ | |_|/ |/| | | | | | | | * cb/match_refs_internal_tail: match_refs: search ref list tail internally
| * | match_refs: search ref list tail internallyClemens Buchacher2009-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid code duplication by moving list tail search to match_refs(). This does not change the semantics, except for http-push, which now inserts to the front of the ref list in order to get rid of the global remote_tail. Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'fc/decorate-tag'Junio C Hamano2009-05-23
|\ \ \ | |_|/ |/| | | | | | | | | | | * fc/decorate-tag: Prettify log decorations even more Change prettify_ref to prettify_refname
| * | Change prettify_ref to prettify_refnameFelipe Contreras2009-05-13
| | | | | | | | | | | | | | | | | | | | | | | | In preparation to be used when the ref object is not available Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Acked-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | | Merge branch 'ar/unlink-err'Junio C Hamano2009-05-18
|\ \ \ | | |/ | |/| | | | | | | | | | | | | * ar/unlink-err: print unlink(2) errno in copy_or_link_directory replace direct calls to unlink(2) with unlink_or_warn Introduce an unlink(2) wrapper which gives warning if unlink failed
| * | replace direct calls to unlink(2) with unlink_or_warnAlex Riesen2009-04-29
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to notice when something's going wrong, especially on systems which lock open files. I used the following criteria when selecting the code for replacement: - it was already printing a warning for the unlink failures - it is in a function which already printing something or is called from such a function - it is in a static function, returning void and the function is only called from a builtin main function (cmd_) - it is in a function which handles emergency exit (signal handlers) - it is in a function which is obvously cleaning up the lockfiles Signed-off-by: Alex Riesen <raa.lkml@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | fetch: Strip usernames from url's before storing themAndreas Ericsson2009-04-21
|/ | | | | | | | | | | | | | | | | When pulling from a remote, the full URL including username is by default added to the commit message. Since it adds very little value but could be used by malicious people to glean valid usernames (with matching hostnames), we're far better off just stripping the username before storing the remote URL locally. Note that this patch has no lasting visible effect when "git pull" does not create a merge commit. It simply alters what gets written to .git/FETCH_HEAD, which is used by "git merge" to automagically create its messages. Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'db/push-cleanup'Junio C Hamano2009-03-26
|\ | | | | | | | | | | | | | | | | * db/push-cleanup: Move push matching and reporting logic into transport.c Use a common function to get the pretty name of refs Conflicts: transport.c
| * Move push matching and reporting logic into transport.cDaniel Barkalow2009-03-09
| | | | | | | | | | | | | | | | | | | | | | For native-protocol pushes (and other protocols as they are converted to the new method), this moves the refspec match, tracking update, and report message out of send-pack() and into transport_push(), where it can be shared completely with other protocols. This also makes fetch and push more similar in terms of what code is in what file. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | rsync transport: allow local paths, and fix testsJohannes Schindelin2009-03-10
|/ | | | | | | | | | | | | | | | | | | | | Earlier, the rsync tests were disabled by default, as they needed a running rsyncd daemon. This was only due to the limitation that our rsync transport only allowed full URLs of the form rsync://<host>/<path> Relaxing the URLs to allow rsync:<path> permitted the change in the tests to run whenever rsync is available, without requiring a fully configured and running rsyncd. While at it, the tests were fixed so that they run in directories with a space in their name. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* add is_dot_or_dotdot inline functionAlexander Potashev2009-01-11
| | | | | | | | | | A new inline function is_dot_or_dotdot is used to check if the directory name is either "." or "..". It returns a non-zero value if the given string is "." or "..". It's applicable to a lot of Git source code. Signed-off-by: Alexander Potashev <aspotashev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'rs/alloc-ref'Junio C Hamano2008-10-21
|\ | | | | | | | | | | | | * rs/alloc-ref: make alloc_ref_from_str() the new alloc_ref() use alloc_ref_from_str() everywhere add alloc_ref_with_prefix()
| * make alloc_ref_from_str() the new alloc_ref()René Scharfe2008-10-18
| | | | | | | | | | | | | | | | | | | | | | With all calls to alloc_ref() gone, we can remove it and then we're free to give alloc_ref_from_str() the shorter name. It's a much nicer interface, as the callers always need to have a name string when they allocate a ref anyway and don't need to calculate and pass its length+1 any more. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * use alloc_ref_from_str() everywhereRené Scharfe2008-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace pairs of alloc_ref() and strcpy() with alloc_ref_from_str(), simplifying the code. In connect.c, also a pair of alloc_ref() and memcpy() is replaced -- the additional cost of a strlen() call should not have too much of an impact. Consistency and simplicity are more important. In remote.c, the code was allocating 11 bytes more than needed for the name part, but I couldn't see them being used for anything. Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Implement git clone -vMiklos Vajna2008-10-09
|/ | | | | | | | | | The new -v option forces the progressbar, even in case the output is not a terminal. This can be useful if the caller is an IDE or wrapper which wants to scrape the progressbar from stderr and show its information in a different format. Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* Merge branch 'maint'Shawn O. Pearce2008-10-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * maint: Update release notes for 1.6.0.3 Teach rebase -i to honor pre-rebase hook docs: describe pre-rebase hook do not segfault if make_cache_entry failed make prefix_path() never return NULL fix bogus "diff --git" header from "diff --no-index" Fix fetch/clone --quiet when stdout is connected builtin-blame: Fix blame -C -C with submodules. bash: remove fetch, push, pull dashed form leftovers Conflicts: diff.c
| * Fix fetch/clone --quiet when stdout is connectedTuncer Ayaz2008-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the `git clone --quiet` issue raised by Dave Jones in http://marc.info/?l=git&m=121529226023180&w=2 With this simple patch applied we no longer see the following remote messages as no-progress is correctly sent to the remote site: remote: Counting objects: 84102, done. remote: Compressing objects: 100% (24720/24720), done. remote: Total 84102 (delta 60949), reused 80810 (delta 57900) Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
* | push: prepare sender to receive extended ref information from the receiverJunio C Hamano2008-09-09
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | "git push" enhancement allows the receiving end to report not only its own refs but refs in repositories it borrows from via the alternate object store mechanism. By telling the sender that objects reachable from these extra refs are already complete in the receiving end, the number of objects that need to be transfered can be cut down. These entries are sent over the wire with string ".have", instead of the actual names of the refs. This string was chosen so that they are ignored by older programs at the sending end. If we sent some random but valid looking refnames for these entries, "matching refs" rule (triggered when running "git push" without explicit refspecs, where the sender learns what refs the receiver has, and updates only the ones with the names of the refs the sender also has) and "delete missing" rule (triggered when "git push --mirror" is used, where the sender tells the receiver to delete the refs it itself does not have) would try to update/delete them, which is not what we want. This prepares the send-pack (and "push" that runs native protocol) to accept extended existing ref information and make use of it. The ".have" entries are excluded from ref matching rules, and are exempt from deletion rule while pushing with --mirror option, but are still used for pack generation purposes by providing more "bottom" range commits. Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'maint'Junio C Hamano2008-08-09
|\ | | | | | | | | | | | | | | | | * maint: asciidoc markup fixes Fail properly when cloning from invalid HTTP URL Conflicts: Documentation/git-push.txt
| * Fail properly when cloning from invalid HTTP URLPetr Baudis2008-08-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, when cloning from invalid HTTP URL, git clone will possibly return curl error, then a confusing message about remote HEAD and then return success and leave an empty repository behind, confusing either the end-user or the automated service calling it (think repo.or.cz). This patch changes the error() calls in get_refs_via_curl() to die()s, akin to the other get_refs_*() functions. Cc: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Petr Baudis <pasky@suse.cz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'qq/maint'Junio C Hamano2008-07-05
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qq/maint: clone -q: honor "quiet" option over native transports. attribute documentation: keep EXAMPLE at end builtin-commit.c: Use 'git_config_string' to get 'commit.template' http.c: Use 'git_config_string' to clean up SSL config. diff.c: Use 'git_config_string' to get 'diff.external' convert.c: Use 'git_config_string' to get 'smudge' and 'clean' builtin-log.c: Use 'git_config_string' to get 'format.subjectprefix' and 'format.suffix' Documentation cvs: Clarify when a bare repository is needed Documentation: be precise about which date --pretty uses Conflicts: Documentation/gitattributes.txt
| * clone -q: honor "quiet" option over native transports.Junio C Hamano2008-07-05
| | | | | | | | | | | | | | | | The earlier built-in conversion seems to have broken "git-clone"; this teaches the command to honor the "-q" option again when talking to the remote end over native transports (file://, git:// and ssh://). Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Windows: Disambiguate DOS style paths from SSH URLs.Johannes Sixt2008-06-26
|/ | | | | | | | If on Windows a path is specified as C:/path, then this is also a valid SSH URL. To disambiguate between the two interpretations we take an URL that looks like a path with a drive letter as a local URL. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
* Merge branch 'db/clone-in-c'Junio C Hamano2008-05-25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * db/clone-in-c: Add test for cloning with "--reference" repo being a subset of source repo Add a test for another combination of --reference Test that --reference actually suppresses fetching referenced objects clone: fall back to copying if hardlinking fails builtin-clone.c: Need to closedir() in copy_or_link_directory() builtin-clone: fix initial checkout Build in clone Provide API access to init_db() Add a function to set a non-default work tree Allow for having for_each_ref() list extra refs Have a constant extern refspec for "--tags" Add a library function to add an alternate to the alternates file Add a lockfile function to append to a file Mark the list of refs to fetch as const Conflicts: cache.h t/t5700-clone-reference.sh
| * Mark the list of refs to fetch as constDaniel Barkalow2008-05-04
| | | | | | | | | | | | | | | | | | Fetching the objects doesn't actually modify the list in any of the code paths, so this will allow code that fetches the entire (const) list of available refs to just pass the list in directly. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | alloc_ref_from_str(): factor out a common pattern of alloc_ref from stringKrzysztof Kowalczyk2008-05-11
| | | | | | | | | | | | | | Also fix an underallocation in walker.c::interpret_target(). Signed-off-by: Krzysztof Kowalczyk <kkowalczyk@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Make ls-remote http://... list HEAD, like for git://...Daniel Barkalow2008-04-26
|/ | | | | | | | | | This makes a struct ref able to represent a symref, and makes http.c able to recognize one, and makes transport.c look for "HEAD" as a ref in the list, and makes it dereference symrefs for the resulting ref, if any. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Teach git-fetch to exploit server side automatic tag followingShawn O. Pearce2008-03-04
| | | | | | | | | | | | | | | | | | | | | | | | | If the remote peer upload-pack process supports the include-tag protocol extension then we can avoid running a second fetch cycle on the client side by letting the server send us the annotated tags along with the objects it is packing for us. In the following graph we can now fetch both "tag1" and "tag2" on the same connection that we fetched "master" from the remote when we only have L available on the local side: T - tag1 S - tag2 / / L - o ------ o ------ B \ \ \ \ origin/master master The objects for "tag1" are implicitly downloaded without our direct knowledge. The existing "quickfetch" optimization within git-fetch discovers that tag1 is complete after the first connection and does not open a second connection. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'mh/maint-http-proxy-fix'Junio C Hamano2008-03-02
|\ | | | | | | | | * mh/maint-http-proxy-fix: Set proxy override with http_init()
| * Set proxy override with http_init()Mike Hommey2008-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In transport.c, proxy setting (the one from the remote conf) was set through curl_easy_setopt() call, while http.c already does the same with the http.proxy setting. We now just use this infrastructure instead, and make http_init() now take the struct remote as argument so that it can take the http_proxy setting from there, and any other property that would be added later. At the same time, we make get_http_walker() take a struct remote argument too, and pass it to http_init(), which makes remote defined proxy be used for more than get_refs_via_curl(). We leave out http-fetch and http-push, which don't use remotes for the moment, purposefully. Signed-off-by: Mike Hommey <mh@glandium.org> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * Work around curl-gnutls not liking to be reinitializedMike Hommey2008-02-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | curl versions 7.16.3 to 7.18.0 included had a regression in which https requests following curl_global_cleanup/init sequence would fail with ASN1 parser errors with curl-gnutls. Such sequences happen in some cases such as git fetch. We work around this by removing the http_init and http_cleanup calls from get_refs_via_curl, replacing them with a transport->data initialization with the http_walker (which does http_init). While the http_walker is not currently used in get_refs_via_curl, http and walker code refactor will make it use it. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Always use the current connection's remote ref list in git protocolDaniel Barkalow2008-02-29
| | | | | | | | | | | | | | | | | | | | | | We always report to the user the list of refs we got from the first connection, even if we do multiple connections. But we should always use each connection's own list of refs in the communication with the server, in case we got a different server out of DNS rotation or the timing was surprising or something. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'db/no-separate-ls-remote-connection' (early part)Junio C Hamano2008-02-11
|\ \ | | | | | | | | | | | | | | | * 'db/no-separate-ls-remote-connection' (early part): Fix "git clone" for git:// protocol Reduce the number of connects when fetching
| * | Reduce the number of connects when fetchingDaniel Barkalow2008-02-05
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This shares the connection between getting the remote ref list and getting objects in the first batch. (A second connection is still used to follow tags). When we do not fetch objects (i.e. either ls-remote disconnects after getting list of refs, or we decide we are already up-to-date), we clean up the connection properly; otherwise the connection is left open in need of cleaning up to avoid getting an error message from the remote end when ssh is used. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Work around curl-gnutls not liking to be reinitializedMike Hommey2008-02-09
|/ | | | | | | | | | | | | | | | | curl versions 7.16.3 to 7.18.0 included had a regression in which https requests following curl_global_cleanup/init sequence would fail with ASN1 parser errors with curl-gnutls. Such sequences happen in some cases such as git fetch. We work around this by removing the http_init and http_cleanup calls from get_refs_via_curl, replacing them with a transport->data initialization with the http_walker (which does http_init). While the http_walker is not currently used in get_refs_via_curl, http and walker code refactor will make it use it. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>