summaryrefslogtreecommitdiff
path: root/local-fetch.c
AgeCommit message (Collapse)Author
2006-05-19Log ref updates made by fetch.Shawn Pearce
If a ref is changed by http-fetch, local-fetch or ssh-fetch record the change and the remote URL/name in the log for the ref. This requires loading the config file to check logAllRefUpdates. Also fixed a bug in the ref lock generation; the log file name was not being produced right due to a bad prefix length. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-11-29Make networking commands to work from a subdirectory.Junio C Hamano
These are whole-tree operations and there is not much point making them operable from within a subdirectory, but it is easy to do so, and using setup_git_directory() upfront helps git:// proxy specification picked up from the correct place. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-29Do not mmap-copy the whole thing; just use copy_fd()Junio C Hamano
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-29Teach local-fetch about lazy object directories.Junio C Hamano
The latest init-db does not create .git/objects/??/ directories anymore and expects the users of the repository to create them as they are needed. local-fetch was not taught about it, which broke local cloning with Cogito. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-10-11[PATCH] Don't fetch objects that exist in the local repositoryNick Hengeveld
Be sure not to fetch objects that already exist in the local repository. The main process loop no longer performs this check, http-fetch now checks prior to starting a new request queue entry and when fetch_object() is called, and local-fetch now checks when fetch_object() is called. As discussed in this thread: http://marc.theaimsgroup.com/?t=112854890500001 Signed-off-by: Nick Hengeveld <nickh@reactrix.com>
2005-09-27[PATCH] Implement --recover for git-*-fetchDaniel Barkalow
With the --recover option, we verify that we have absolutely everything reachable from the target, not assuming that things reachable from refs will be complete. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Avoid confusing error messages on packed repositoriesSergey Vlasov
If the source repository was packed, and git-local-fetch needed to fetch a pack file, it spewed a misleading error message about not being able to find the unpacked object. Fixed by adding the warn_if_not_exists argument to copy_file(), which controls printing of error messages in case the source file does not exist. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] Fix "git-local-fetch -s" with packed source repositorySergey Vlasov
"git-local-fetch -s" did not work with a packed repository, because symlink() happily created a link to a non-existing object file, therefore fetch_file() always returned success, and fetch_pack() was not called. Fixed by calling stat() before symlink() to ensure the file really exists. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Avoid calling close(-1)Sergey Vlasov
After open() failure, copy_file() called close(ifd) with ifd == -1 (harmless, but causes Valgrind noise). The same thing was possible for the destination file descriptor. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-23[PATCH] git-local-fetch: Fix error checking and leak in setup_indices()Sergey Vlasov
setup_indices() did not check the return value of opendir(), and did not have a corresponding closedir() call. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-09-08Big tool rename.Junio C Hamano
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>