aboutsummaryrefslogtreecommitdiff
path: root/builtin-clone.c
Commit message (Collapse)AuthorAge
* Merge branch 'maint'Junio C Hamano2008-07-09
|\ | | | | | | | | | | | | | | | | * maint: Start preparing release notes for 1.5.6.3 git-submodule - Fix bugs in adding an existing repo as a module bash: offer only paths after '--' Remove unnecessary pack-*.keep file after successful git-clone make deleting a missing ref more quiet
| * Remove unnecessary pack-*.keep file after successful git-cloneShawn O. Pearce2008-07-08
| | | | | | | | | | | | | | | | | | Once a clone is successful we no longer need to hold onto the .keep file created by the transport. Delete the file so we can later repack the complete repository. Signed-off-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'qq/maint'Junio C Hamano2008-07-07
|\ \ | |/ | | | | | | | | * qq/maint: mailinfo: feed the correct line length to decode_transfer_encoding() git-clone: remove leftover debugging fprintf().
| * git-clone: remove leftover debugging fprintf().Alex Riesen2008-07-06
| | | | | | | | | | Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'js/maint-clone-insteadof'Junio C Hamano2008-07-01
|\ \ | |/ | | | | | | | | * js/maint-clone-insteadof: clone: respect the settings in $HOME/.gitconfig and /etc/gitconfig clone: respect url.insteadOf setting in global configs
| * clone: respect the settings in $HOME/.gitconfig and /etc/gitconfigJohannes Schindelin2008-06-29
| | | | | | | | | | | | | | | | | | | | After initializing the config in the newly-created repository, we need to unset GIT_CONFIG so that the global configs are read again. Noticed by Pieter de Bie. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * clone: respect url.insteadOf setting in global configsJohannes Schindelin2008-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we call "git clone" with a url that has a rewrite rule in either $HOME/.gitconfig or /etc/gitconfig, the URL can be different from what the command line expects it to be. So, let's use the URL as the remote structure has it, not the literal string from the command line. Noticed by Pieter de Bie. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
| * clone: create intermediate directories of destination repoJeff King2008-06-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The shell version used to use "mkdir -p" to create the repo path, but the C version just calls "mkdir". Let's replicate the old behavior. We have to create the git and worktree leading dirs separately; while most of the time, the worktree dir contains the git dir (as .git), the user can override this using GIT_WORK_TREE. We can reuse safe_create_leading_directories, but we need to make a copy of our const buffer to do so. Since merge-recursive uses the same pattern, we can factor this out into a global function. This has two other cleanup advantages for merge-recursive: 1. mkdir_p wasn't a very good name. "mkdir -p foo/bar" actually creates bar, but this function just creates the leading directories. 2. mkdir_p took a mode argument, but it was completely ignored. Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | Merge branch 'jh/clone-packed-refs'Junio C Hamano2008-06-25
|\ \ | | | | | | | | | | | | | | | | | | | | | * jh/clone-packed-refs: Teach "git clone" to pack refs Prepare testsuite for a "git clone" that packs refs Move pack_refs() and friends into libgit Incorporate fetched packs in future object traversal
| * | Teach "git clone" to pack refsJohan Herland2008-06-19
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | In repos with many refs, it is unlikely that most refs will ever change. This fact is already exploited by "git gc" by executing "git pack-refs" to consolidate all refs into a single file. When cloning a repo with many refs, it does not make sense to create the loose refs in the first place, just to have the next "git gc" consolidate them into one file. Instead, make "git clone" create the packed refs file immediately, and forego the loose refs completely. Signed-off-by: Johan Herland <johan@herland.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* | clone: create intermediate directories of destination repoJeff King2008-06-24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | The shell version used to use "mkdir -p" to create the repo path, but the C version just calls "mkdir". Let's replicate the old behavior. We have to create the git and worktree leading dirs separately; while most of the time, the worktree dir contains the git dir (as .git), the user can override this using GIT_WORK_TREE. We can reuse safe_create_leading_directories, but we need to make a copy of our const buffer to do so. Since merge-recursive uses the same pattern, we can factor this out into a global function. This has two other cleanup advantages for merge-recursive: 1. mkdir_p wasn't a very good name. "mkdir -p foo/bar" actually creates bar, but this function just creates the leading directories. 2. mkdir_p took a mode argument, but it was completely ignored. Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Use nonrelative paths instead of absolute paths for cloned repositoriesDaniel Barkalow2008-06-06
| | | | | | | | | | Particularly for the "alternates" file, if one will be created, we want a path that doesn't depend on the current directory, but we want to retain any symlinks in the path as given and any in the user's view of the current directory when the path was given. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* clone: make sure we support the transport typeJeff King2008-05-27
| | | | | | | | | | | | | | If we use an unsupported transport (e.g., http when curl support is not compiled in), transport_get reports an error to the user, but we still get a transport object. We need to manually check and abort the clone process at that point, or we end up with a segfault. Noticed by Thomas Rast. Signed-off-by: Jeff King <peff@peff.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Merge branch 'js/config-cb'v1.5.6-rc0Junio C Hamano2008-05-25
| | | | | | | | | | * js/config-cb: Provide git_config with a callback-data parameter Conflicts: builtin-add.c builtin-cat-file.c
* clone: fall back to copying if hardlinking failsDaniel Barkalow2008-05-21
| | | | | | | Note that it stops trying hardlinks if any fail. Signed-off-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* builtin-clone.c: Need to closedir() in copy_or_link_directory()Brandon Casey2008-05-18
| | | | | | | So not to leak file descriptors, close the directory after opening it. Signed-off-by: Brandon Casey <drafnel@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* builtin-clone: fix initial checkoutJohannes Schindelin2008-05-15
| | | | | | | | | | | | | Somewhere in the process of finishing up builtin-clone, the update of the working tree was lost. This was due to not using the option "merge" for unpack_trees(). Breakage noticed by Kevin Ballard. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Tested-by: Jeff King <peff@peff.net> Acked-by: Daniel Barkalow <barkalow@iabervon.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
* Build in cloneDaniel Barkalow2008-05-04
Thanks to Johannes Schindelin for various comments and improvements, including supporting cloning full bundles. Signed-off-by: Junio C Hamano <gitster@pobox.com>