- 12 1月, 2009 1 次提交
-
-
由 Alexander Potashev 提交于
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: NAlexander Potashev <aspotashev@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 18 10月, 2008 2 次提交
-
-
由 René Scharfe 提交于
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: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 René Scharfe 提交于
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: NRene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 10月, 2008 1 次提交
-
-
由 Miklos Vajna 提交于
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: NMiklos Vajna <vmiklos@frugalware.org> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 06 10月, 2008 1 次提交
-
-
由 Tuncer Ayaz 提交于
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: NTuncer Ayaz <tuncer.ayaz@gmail.com> Acked-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 10 9月, 2008 1 次提交
-
-
由 Junio C Hamano 提交于
"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: NJunio C Hamano <gitster@pobox.com>
-
- 08 8月, 2008 1 次提交
-
-
由 Petr Baudis 提交于
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: NPetr Baudis <pasky@suse.cz> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 7月, 2008 1 次提交
-
-
由 Junio C Hamano 提交于
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: NJunio C Hamano <gitster@pobox.com>
-
- 26 6月, 2008 1 次提交
-
-
由 Johannes Sixt 提交于
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: NJohannes Sixt <johannes.sixt@telecom.at>
-
- 12 5月, 2008 1 次提交
-
-
由 Krzysztof Kowalczyk 提交于
Also fix an underallocation in walker.c::interpret_target(). Signed-off-by: NKrzysztof Kowalczyk <kkowalczyk@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 05 5月, 2008 1 次提交
-
-
由 Daniel Barkalow 提交于
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: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 27 4月, 2008 1 次提交
-
-
由 Daniel Barkalow 提交于
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: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 05 3月, 2008 1 次提交
-
-
由 Shawn O. Pearce 提交于
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: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 29 2月, 2008 1 次提交
-
-
由 Daniel Barkalow 提交于
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: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 28 2月, 2008 1 次提交
-
-
由 Mike Hommey 提交于
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: NMike Hommey <mh@glandium.org> Acked-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 2月, 2008 1 次提交
-
-
由 Mike Hommey 提交于
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: NMike Hommey <mh@glandium.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 2月, 2008 1 次提交
-
-
由 Mike Hommey 提交于
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: NMike Hommey <mh@glandium.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 05 2月, 2008 1 次提交
-
-
由 Daniel Barkalow 提交于
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: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 05 1月, 2008 1 次提交
-
-
由 Jim Meyering 提交于
A NUL byte at beginning of file, or just after a newline would provoke an invalid buf[-1] access in a few places. * builtin-grep.c (cmd_grep): Don't access buf[-1]. * builtin-pack-objects.c (get_object_list): Likewise. * builtin-rev-list.c (read_revisions_from_stdin): Likewise. * bundle.c (read_bundle_header): Likewise. * server-info.c (read_pack_info_file): Likewise. * transport.c (insert_packed_refs): Likewise. Signed-off-by: NJim Meyering <meyering@redhat.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 15 12月, 2007 2 次提交
-
-
由 Mike Hommey 提交于
Also, replace whitespaces with tabs in some places Signed-off-by: NMike Hommey <mh@glandium.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Mike Hommey 提交于
Signed-off-by: NMike Hommey <mh@glandium.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 06 12月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
The code calls fetch_pack() to get the list of refs it fetched, and discards refs and always returns 0 to signal success. But builtin-fetch-pack.c::fetch_pack() has error cases. The function returns NULL if error is detected (shallow-support side seems to choose to die but I suspect that is easily fixable to error out as well). Make fetch_refs_via_pack() propagate that error to the caller. Acked-By: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 04 12月, 2007 1 次提交
-
-
由 Sam Vilain 提交于
As well as allowing a default http.proxy option, allow it to be set per-remote. Signed-off-by: NSam Vilain <sam.vilain@catalyst.net.nz> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 11月, 2007 1 次提交
-
-
由 Jeff King 提交于
Because this function is static and used only by the http-walker, when NO_CURL is defined, gcc emits a "defined but not used" warning. Signed-off-by: NJeff King <peff@peff.net> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 12 11月, 2007 1 次提交
-
-
由 Steffen Prohaska 提交于
A --verbose option to push should also be passed to the transport layer, i.e. git-send-pack, git-http-push. git push is modified to do so. Signed-off-by: NSteffen Prohaska <prohaska@zib.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 10 11月, 2007 1 次提交
-
-
由 Andy Whitcroft 提交于
Plumb in the --mirror mode for git-push. Signed-off-by: NAndy Whitcroft <apw@shadowen.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 09 11月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 03 11月, 2007 2 次提交
-
-
由 Daniel Barkalow 提交于
Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Daniel Barkalow 提交于
The list of remote refs in struct transport should be const, because builtin-fetch will get confused if it changes. The url in git_connect should be const (and work on a copy) instead of requiring the caller to copy it. match_refs doesn't modify the refspecs it gets. get_fetch_map and get_remote_ref don't change the list they get. Allow transport get_refs_list methods to modify the struct transport. Add a function to copy a list of refs, when a function needs a mutable copy of a const list. Add a function to check the type of a ref, as per the code in connect.c Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 02 11月, 2007 1 次提交
-
-
由 Blake Ramsdell 提交于
The variable is always set if it is going to be used; gcc just does not notice it. Signed-off-by: NBlake Ramsdell <blaker@gmail.com> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 21 10月, 2007 1 次提交
-
-
由 Johannes Sixt 提交于
This prepares the API of git_connect() and finish_connect() to operate on a struct child_process. Currently, we just use that object as a placeholder for the pid that we used to return. A follow-up patch will change the implementation of git_connect() and finish_connect() to make full use of the object. Old code had early-return-on-error checks at the calling sites of git_connect(), but since git_connect() dies on errors anyway, these checks were removed. [sp: Corrected style nit of "conn == NULL" to "!conn"] Signed-off-by: NJohannes Sixt <johannes.sixt@telecom.at> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 16 10月, 2007 3 次提交
-
-
由 Shawn O. Pearce 提交于
If the end-user requested a dry-run push we need to pass that flag over to http-push and additionally make sure it does not actually upload any changes to the remote server. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Shawn O. Pearce 提交于
If the end-user requested a dry-run push we should pass that flag though to rsync so that the rsync command can show what it would do (or not do) if push was to be executed without the --dry-run flag. Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
由 Johannes Schindelin 提交于
There were a few places which did not cope well without curl. This fixes all of them. We still need to link against the walker.o part of the library as some parts of transport.o still call into there even though we don't have HTTP support enabled. If compiled with NO_CURL=1 we now get the following useful error message: $ git-fetch http://www.example.com/git error: git was compiled without libcurl support. fatal: Don't know how to fetch from http://www.example.com/gitSigned-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NShawn O. Pearce <spearce@spearce.org>
-
- 03 10月, 2007 1 次提交
-
-
由 Daniel Barkalow 提交于
This adds a verbosity level below 0 for suppressing default messages with --quiet, and makes the default for http be verbose instead of quiet. This matches the behavior of the shell script version of git-fetch. Signed-off-by: NDaniel Barkalow <barkalow@iabervon.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 01 10月, 2007 1 次提交
-
-
由 Johannes Schindelin 提交于
We lost rsync support when transitioning from shell to C. Support it again (even if the transport is technically deprecated, some people just do not have any chance to use anything else). Also, add a test to t5510. Since rsync transport is not configured by default on most machines, and especially not such that you can write to rsync://127.0.0.1$(pwd)/, it is disabled by default; you can enable it by setting the environment variable TEST_RSYNC. Signed-off-by: NJohannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 30 9月, 2007 1 次提交
-
-
由 Junio C Hamano 提交于
Currently alloc_ref() expects the length of the refname plus 1 as its parameter, prepares that much space and returns a "ref" structure for the caller to fill the refname. One caller in transport.c::get_refs_from_bundle() however allocated one byte less. It may be a good idea to change the calling convention to give alloc_ref() the length of the refname, but that clean-up can be done in a separate patch. This patch only fixes the bug and makes all callers consistent. There was also one overallocation in connect.c, which would not hurt but was wasteful. This patch fixes it as well. Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
- 19 9月, 2007 3 次提交
-
-
由 Shawn O. Pearce 提交于
Most transport implementations tend to allocate a data buffer in the struct transport instance during transport_get() so we need to free that data buffer when we disconnect it. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Shawn O. Pearce 提交于
The only way to configure the unpacking limit is currently through the .git/config (or ~/.gitconfig) mechanism as we have no existing command line option interface to control this threshold on a per invocation basis. This was intentional by design as the storage policy of the repository should be a repository-wide decision and should not be subject to variations made on individual command executions. Earlier builtin-fetch was bypassing the unpacking limit chosen by the user through the configuration file as it did not reread the configuration options through fetch_pack_config if we called the internal fetch_pack() API directly. We now ensure we always run the config file through fetch_pack_config at least once in this process, thereby setting our unpackLimit properly. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-
由 Shawn O. Pearce 提交于
Copying the arguments from a fetch_pack_args into static globals within the builtin-fetch-pack module is error-prone and may lead rise to cases where arguments supplied via the struct from the new fetch_pack() API may not be honored by the implementation. Here we reorganize all of the static globals into a single static struct fetch_pack_args instance and use memcpy() to move the data from the caller supplied structure into the globals before we execute our pack fetching implementation. This strategy is more robust to additions and deletions of properties. As keep_pack is a single bit we have also introduced lock_pack to mean not only download and store the packfile via index-pack but also to lock it against repacking by creating a .keep file when the packfile itself is stored. The caller must remove the .keep file when it is safe to do so. Signed-off-by: NShawn O. Pearce <spearce@spearce.org> Signed-off-by: NJunio C Hamano <gitster@pobox.com>
-