summaryrefslogtreecommitdiff
path: root/lib/checkout_op.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-09-22 07:47:43 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-09-23 08:57:31 (GMT)
commitab08b3630414dfb867825c4a5828438e1c69199d (patch)
treeae28f6641d8723d4ff73754a7bc357ff3aa84d65 /lib/checkout_op.tcl
parenta4bee597134aee9883adba1e79be926a92f80367 (diff)
downloadgit-ab08b3630414dfb867825c4a5828438e1c69199d.zip
git-ab08b3630414dfb867825c4a5828438e1c69199d.tar.gz
git-ab08b3630414dfb867825c4a5828438e1c69199d.tar.bz2
git-gui: Allow users to choose/create/clone a repository
If we are started outside of a git repository than it is likely the user started us from some sort of desktop shortcut icon in the operating system. In such a case the user is expecting us to prompt them to locate the git repository they want to work on, or to help them make a new repository, or to clone one from an existing location. This is a very simple wizard that offers the user one of these three choices. When we clone a repository we always use the name `master` in the local repository, even if the remote side does not appear to point to that name. I chose this as a policy decision. Much of the Git documentation talks about `master` being the default branch in a repository and that's what git-init does too. If the remote side doesn't call its default branch `master` most users just don't care, they just want to use Git the way the documentation describes. Rather than relying on the git-clone Porcelain that ships with git we build the new repository ourselves and then obtain content by git-fetch. This technique simplifies the entire clone process to roughly: `git init && git fetch && git pull`. Today we use three passes with git-fetch; the first pass gets us the bulk of the objects and the branches, the second pass gets us the tags, and the final pass gets us the current value of HEAD to initialize the default branch. If the source repository is on the local disk we try to use a hardlink to connect the objects into the new clone as this can be many times faster than copying the objects or packing them and passing the data through a pipe to index-pack. Unlike git-clone we stick to pure Tcl [file link -hard] operation thus avoiding the need to fork a cpio process to setup the hardlinks. If hardlinks do not appear to be supported (e.g. filesystem doesn't allow them or we are crossing filesystem boundaries) we use file copying instead. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/checkout_op.tcl')
0 files changed, 0 insertions, 0 deletions