From c6d499a82fbb02e2a03fe3d858ff144fa570fb34 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Dec 2006 21:49:45 -0800 Subject: [PATCH 01/10] git-svn: remove svnadmin dependency from the tests We require the libraries now, so we can create repositories using them (and save some executable load time while we're at it). Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- t/lib-git-svn.sh | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/t/lib-git-svn.sh b/t/lib-git-svn.sh index 99ada71349..af42ccc8d1 100644 --- a/t/lib-git-svn.sh +++ b/t/lib-git-svn.sh @@ -7,26 +7,10 @@ then exit fi -perl -e 'use SVN::Core; $SVN::Core::VERSION gt "1.1.0" or die' >/dev/null 2>&1 -if test $? -ne 0 -then - test_expect_success 'Perl SVN libraries not found, skipping test' : - test_done - exit -fi - GIT_DIR=$PWD/.git GIT_SVN_DIR=$GIT_DIR/svn/git-svn SVN_TREE=$GIT_SVN_DIR/svn-tree -svnadmin >/dev/null 2>&1 -if test $? -ne 1 -then - test_expect_success 'skipping git-svn tests, svnadmin not found' : - test_done - exit -fi - svn >/dev/null 2>&1 if test $? -ne 1 then @@ -37,13 +21,24 @@ fi svnrepo=$PWD/svnrepo -set -e - -if svnadmin create --help | grep fs-type >/dev/null +perl -w -e " +use SVN::Core; +use SVN::Repos; +\$SVN::Core::VERSION gt '1.1.0' or exit(42); +SVN::Repos::create('$svnrepo', undef, undef, undef, + { 'fs-config' => 'fsfs'}); +" +x=$? +if test $x -ne 0 then - svnadmin create --fs-type fsfs "$svnrepo" -else - svnadmin create "$svnrepo" + if test $x -eq 42; then + err='Perl SVN libraries must be >= 1.1.0' + else + err='Perl SVN libraries not found or unusable, skipping test' + fi + test_expect_success "$err" : + test_done + exit fi svnrepo="file://$svnrepo" From 5bd3870c37dfb613e5e055f7b6d4c80a7b823719 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Dec 2006 21:49:46 -0800 Subject: [PATCH 02/10] git-svn: t/t9100-git-svn-basic: remove old check for NO_SYMLINK We don't support the svn command-line client anymore; nor do we support anything before SVN 1.1.0, so we can be certain symlinks will be supported in the SVN repository. Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- t/t9100-git-svn-basic.sh | 84 +++++++++++++++++----------------------- 1 file changed, 35 insertions(+), 49 deletions(-) diff --git a/t/t9100-git-svn-basic.sh b/t/t9100-git-svn-basic.sh index c22fe47213..040da92756 100755 --- a/t/t9100-git-svn-basic.sh +++ b/t/t9100-git-svn-basic.sh @@ -24,10 +24,7 @@ test_expect_success \ mkdir import && cd import && echo foo > foo && - if test -z '$NO_SYMLINK' - then - ln -s foo foo.link - fi + ln -s foo foo.link mkdir -p dir/a/b/c/d/e && echo 'deep dir' > dir/a/b/c/d/e/file && mkdir bar && @@ -136,48 +133,43 @@ test_expect_success "$name" " test -x '$SVN_TREE'/exec.sh" -if test -z "$NO_SYMLINK" -then - name='executable file becomes a symlink to bar/zzz (file)' +name='executable file becomes a symlink to bar/zzz (file)' +test_expect_success "$name" " + rm exec.sh && + ln -s bar/zzz exec.sh && + git update-index exec.sh && + git commit -m '$name' && + git-svn set-tree --find-copies-harder --rmdir \ + remotes/git-svn..mybranch5 && + svn up '$SVN_TREE' && + test -L '$SVN_TREE'/exec.sh" - test_expect_success "$name" " - rm exec.sh && - ln -s bar/zzz exec.sh && - git update-index exec.sh && - git commit -m '$name' && - git-svn set-tree --find-copies-harder --rmdir \ - remotes/git-svn..mybranch5 && - svn up '$SVN_TREE' && - test -L '$SVN_TREE'/exec.sh" +name='new symlink is added to a file that was also just made executable' - name='new symlink is added to a file that was also just made executable' - - test_expect_success "$name" " - chmod +x bar/zzz && - ln -s bar/zzz exec-2.sh && - git update-index --add bar/zzz exec-2.sh && - git commit -m '$name' && - git-svn set-tree --find-copies-harder --rmdir \ - remotes/git-svn..mybranch5 && - svn up '$SVN_TREE' && - test -x '$SVN_TREE'/bar/zzz && - test -L '$SVN_TREE'/exec-2.sh" - - name='modify a symlink to become a file' - test_expect_success "$name" " - echo git help > help || true && - rm exec-2.sh && - cp help exec-2.sh && - git update-index exec-2.sh && - git commit -m '$name' && - git-svn set-tree --find-copies-harder --rmdir \ - remotes/git-svn..mybranch5 && - svn up '$SVN_TREE' && - test -f '$SVN_TREE'/exec-2.sh && - test ! -L '$SVN_TREE'/exec-2.sh && - diff -u help $SVN_TREE/exec-2.sh" -fi +test_expect_success "$name" " + chmod +x bar/zzz && + ln -s bar/zzz exec-2.sh && + git update-index --add bar/zzz exec-2.sh && + git commit -m '$name' && + git-svn set-tree --find-copies-harder --rmdir \ + remotes/git-svn..mybranch5 && + svn up '$SVN_TREE' && + test -x '$SVN_TREE'/bar/zzz && + test -L '$SVN_TREE'/exec-2.sh" +name='modify a symlink to become a file' +test_expect_success "$name" " + echo git help > help || true && + rm exec-2.sh && + cp help exec-2.sh && + git update-index exec-2.sh && + git commit -m '$name' && + git-svn set-tree --find-copies-harder --rmdir \ + remotes/git-svn..mybranch5 && + svn up '$SVN_TREE' && + test -f '$SVN_TREE'/exec-2.sh && + test ! -L '$SVN_TREE'/exec-2.sh && + diff -u help $SVN_TREE/exec-2.sh" if test "$have_utf8" = t then @@ -203,12 +195,6 @@ test_expect_success "$name" \ git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b && diff -u a b" -if test -n "$NO_SYMLINK" -then - test_done - exit 0 -fi - name='check imported tree checksums expected tree checksums' rm -f expected if test "$have_utf8" = t From 43853554542700e0d129ce853a3d4b16740035d4 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 31 Dec 2006 21:49:47 -0800 Subject: [PATCH 03/10] git-svn: t/t91??-*: optimize the tests a bit This removes some unnecessary 'svn up' calls throughout t9103-git-svn-graft-branches.sh: * removed an 'svn log' call that was leftover from debugging * removed multiple git-svn calls with a multi-init / multi-fetch combination (which weren't tested before, either) * replaced `rev-list ... | head -n1` with `rev-parse ...` (not sure what I was thinking when I wrote that) All this saves about 9 seconds from a test run (53s -> 44s for 'make t91*') on my 1.3GHz Athlon Signed-off-by: Eric Wong Signed-off-by: Junio C Hamano --- t/t9101-git-svn-props.sh | 11 +++-------- t/t9103-git-svn-graft-branches.sh | 14 ++++---------- t/t9104-git-svn-follow-parent.sh | 1 - 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/t/t9101-git-svn-props.sh b/t/t9101-git-svn-props.sh index 5543b07f16..46fcec50a5 100755 --- a/t/t9101-git-svn-props.sh +++ b/t/t9101-git-svn-props.sh @@ -57,13 +57,10 @@ test_expect_success 'setup some commits to svn' \ 'cd test_wc && echo Greetings >> kw.c && svn commit -m "Not yet an Id" && - svn up && echo Hello world >> kw.c && svn commit -m "Modified file, but still not yet an Id" && - svn up && svn propset svn:keywords Id kw.c && - svn commit -m "Propset Id" && - svn up && + svn commit -m "Propset Id" cd ..' test_expect_success 'initialize git-svn' "git-svn init $svnrepo" @@ -86,8 +83,7 @@ test_expect_success "propset CR on crlf files" \ svn propset svn:eol-style CR empty && svn propset svn:eol-style CR crlf && svn propset svn:eol-style CR ne_crlf && - svn commit -m "propset CR on crlf files" && - svn up && + svn commit -m "propset CR on crlf files" cd ..' test_expect_success 'fetch and pull latest from svn and checkout a new wc' \ @@ -111,8 +107,7 @@ cd test_wc svn propset svn:eol-style CRLF ne_cr && svn propset svn:keywords Id cr && svn propset svn:keywords Id ne_cr && - svn commit -m "propset CRLF on cr files" && - svn up' + svn commit -m "propset CRLF on cr files"' cd .. test_expect_success 'fetch and pull latest from svn' \ 'git-svn fetch && git pull . remotes/git-svn' diff --git a/t/t9103-git-svn-graft-branches.sh b/t/t9103-git-svn-graft-branches.sh index 293b98f928..b5f7677021 100755 --- a/t/t9103-git-svn-graft-branches.sh +++ b/t/t9103-git-svn-graft-branches.sh @@ -16,25 +16,19 @@ test_expect_success 'initialize repo' " cd wc && echo feedme >> branches/a/readme && svn commit -m hungry && - svn up && cd trunk && svn merge -r3:4 $svnrepo/branches/a && svn commit -m 'merge with a' && cd ../.. && - svn log -v $svnrepo && - git-svn init -i trunk $svnrepo/trunk && - git-svn init -i a $svnrepo/branches/a && - git-svn init -i tags/a $svnrepo/tags/a && - git-svn fetch -i tags/a && - git-svn fetch -i a && - git-svn fetch -i trunk + git-svn multi-init $svnrepo -T trunk -b branches -t tags && + git-svn multi-fetch " r1=`git-rev-list remotes/trunk | tail -n1` r2=`git-rev-list remotes/tags/a | tail -n1` r3=`git-rev-list remotes/a | tail -n1` -r4=`git-rev-list remotes/a | head -n1` -r5=`git-rev-list remotes/trunk | head -n1` +r4=`git-rev-parse remotes/a` +r5=`git-rev-parse remotes/trunk` test_expect_success 'test graft-branches regexes and copies' " test -n "$r1" && diff --git a/t/t9104-git-svn-follow-parent.sh b/t/t9104-git-svn-follow-parent.sh index 8d2e2fec39..400c21cd49 100755 --- a/t/t9104-git-svn-follow-parent.sh +++ b/t/t9104-git-svn-follow-parent.sh @@ -17,7 +17,6 @@ test_expect_success 'initialize repo' " cd wc && echo world >> trunk/readme && svn commit -m 'another commit' && - svn up && svn mv -m 'rename to thunk' trunk thunk && svn up && echo goodbye >> thunk/readme && From 9d0524d42f340fc49f9e175d966afb7dce3854bb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Jan 2007 12:07:26 -0800 Subject: [PATCH 04/10] Update send-pack pipeline documentation. The pipeline was much more complex and needed documentation, but now it is trivial and straightforward. Signed-off-by: Junio C Hamano --- .../technical/send-pack-pipeline.txt | 81 ++++--------------- 1 file changed, 16 insertions(+), 65 deletions(-) diff --git a/Documentation/technical/send-pack-pipeline.txt b/Documentation/technical/send-pack-pipeline.txt index bd32aff00b..681efe4219 100644 --- a/Documentation/technical/send-pack-pipeline.txt +++ b/Documentation/technical/send-pack-pipeline.txt @@ -27,86 +27,37 @@ Overall operation Pack_objects pipeline --------------------- -This function gets one file descriptor (`out`) which is either a +This function gets one file descriptor (`fd`) which is either a socket (over the network) or a pipe (local). What's written to this fd goes to git-receive-pack to be unpacked. send-pack ---> fd ---> receive-pack -It somehow forks once, but does not wait for it. I am not sure -why. - -The forked child calls rev_list_generate() with that file -descriptor (while the parent closes `out` -- the child will be -the one that writes the packfile to the other end). +The function pack_objects creates a pipe and then forks. The +forked child execs pack-objects with --revs to receive revision +parameters from its standard input. This process will write the +packfile to the other end. send-pack | - rev-list-generate ---> fd ---> receive-pack - - -Then rev-list-generate forks after creates a pipe; the child -will become a pipeline "rev-list --stdin | pack-objects", which -is the rev_list() function, while the parent feeds that pipeline -the list of refs. - - send-pack - | - rev-list-generate ---> fd ---> receive-pack + pack_objects() ---> fd ---> receive-pack | ^ (pipe) v | - rev-list + (child) -The child process, before calling rev-list, rearranges the file -descriptors: - -. what it reads from rev-list-generate via pipe becomes the - stdin; this is to feed the upstream of the pipeline which will - be git-rev-list process. - -. what it writes to its stdout goes to the fd connected to - receive-pack. - -On the other hand, the parent process, before starting to feed -the child pipeline, closes the reading side of the pipe and fd -to receive-pack. +The child dup2's to arrange its standard output to go back to +the other end, and read its standard input to come from the +pipe. After that it exec's pack-objects. On the other hand, +the parent process, before starting to feed the child pipeline, +closes the reading side of the pipe and fd to receive-pack. send-pack | - rev-list-generate + pack_objects(parent) | v [0] - rev-list [1] ---> receive-pack - -The parent then writes to the pipe and later closes it. There -is a commented out waitpid to wait for the rev-list side before -it exits, I again do not understand why. - -The rev-list function further sets up a pipe and forks to run -git-rev-list piped to git-pack-objects. The child side, before -exec'ing git-pack-objects, rearranges the file descriptors: - -. what it reads from the pipe becomes the stdin; this gets the - list of objects from the git-rev-list process. - -. its stdout is already connected to receive-pack, so what it - generates goes there. - -The parent process arranges its file descriptors before exec'ing -git-rev-list: - -. its stdout is sent to the pipe to feed git-pack-objects. - -. its stdin is already connected to rev-list-generate and will - read the set of refs from it. - - - send-pack - | - rev-list-generate - | - v [0] - git-rev-list [1] ---> [0] git-pack-objects [1] ---> receive-pack - + pack-objects [0] ---> receive-pack +[jc: the pipeline was much more complex and needed documentation before + I understood an earlier bug, but now it is trivial and straightforward.] From d1014a1745a8aa90c8de2a5ac7624d8175f96724 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Sun, 31 Dec 2006 23:21:50 -0800 Subject: [PATCH 05/10] fail pull/merge early in the middle of conflicted merge After a pull that results in a conflicted merge, a new user often tries another "git pull" in desperation. When the index is unmerged, merge backends correctly bail out without touching either index nor the working tree, so this does not make the wound any worse. The user will however see several lines of messsages during this process, such as "filename: needs merge", "you need to resolve your current index first", "Merging...", and "Entry ... would be overwritten by merge. Cannot merge.". They are unnecessarily alarming, and cause useful conflict messages from the first pull scroll off the top of the terminal. This changes pull and merge to run "git-ls-files -u" upfront and stop them much earlier than we currently do. Old timers may know better and would not to try pulling again before cleaning things up; this change adds extra overhead that is unnecessary for them. But this would be worth paying for to save new people from needless confusion. Signed-off-by: Junio C Hamano --- git-merge.sh | 3 +++ git-pull.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/git-merge.sh b/git-merge.sh index ba42260426..477002910e 100755 --- a/git-merge.sh +++ b/git-merge.sh @@ -8,6 +8,9 @@ USAGE='[-n] [--no-commit] [--squash] [-s ] [-m=] &2 "Fetch failure: $remote" @@ -397,7 +406,7 @@ fetch_main () { pack) continue ;; keep) - pack_lockfile="$GIT_OBJECT_DIRECTORY/pack/pack-$remote_name.keep" + keepfile="$GIT_OBJECT_DIRECTORY/pack/pack-$remote_name.keep" continue ;; esac found= @@ -429,8 +438,8 @@ fetch_main () { append_fetch_head "$sha1" "$remote" \ "$remote_name" "$remote_nick" "$local_name" \ "$not_for_merge" || exit - done && - if [ "$pack_lockfile" ]; then rm -f "$pack_lockfile"; fi + done + ) ) || exit ;; esac From 33a59fd07d8d75e58a5b1edbcc3c5798c98aa8bf Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Mon, 1 Jan 2007 16:39:06 -0500 Subject: [PATCH 07/10] Documentation: update git-pull.txt for new clone behavior Update examples, stop using branch named "origin" as an example. Remove large example of use of remotes; that particular case is nicely automated by default, so it's not so pressing to explain, and we can refer to git-repo-config for the details. Signed-off-by: "J. Bruce Fields" Signed-off-by: Junio C Hamano --- Documentation/git-pull.txt | 67 ++++++++++++++------------------------ 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/Documentation/git-pull.txt b/Documentation/git-pull.txt index 2a5aea73ba..13be992006 100644 --- a/Documentation/git-pull.txt +++ b/Documentation/git-pull.txt @@ -37,17 +37,27 @@ EXAMPLES -------- git pull, git pull origin:: - Fetch the default head from the repository you cloned - from and merge it into your current branch. + Update the remote-tracking branches for the repository + you cloned from, then merge one of them into your + current branch. Normally the branch merged in is + the HEAD of the remote repository, but the choice is + determined by the branch..remote and + branch..merge options; see gitlink:git-repo-config[1] + for details. -git pull -s ours . obsolete:: - Merge local branch `obsolete` into the current branch, - using `ours` merge strategy. +git pull origin next:: + Merge into the current branch the remote branch `next`; + leaves a copy of `next` temporarily in FETCH_HEAD, but + does not update any remote-tracking branches. git pull . fixes enhancements:: Bundle local branch `fixes` and `enhancements` on top of the current branch, making an Octopus merge. +git pull -s ours . obsolete:: + Merge local branch `obsolete` into the current branch, + using `ours` merge strategy. + git pull --no-commit . maint:: Merge local branch `maint` into the current branch, but do not make a commit automatically. This can be used @@ -61,48 +71,19 @@ release/version name would be acceptable. Command line pull of multiple branches from one repository:: + ------------------------------------------------ -$ cat .git/remotes/origin -URL: git://git.kernel.org/pub/scm/git/git.git -Pull: master:origin - $ git checkout master -$ git fetch origin master:origin +pu:pu maint:maint -$ git pull . origin +$ git fetch origin +pu:pu maint:tmp +$ git pull . tmp ------------------------------------------------ + -Here, a typical `.git/remotes/origin` file from a -`git-clone` operation is used in combination with -command line options to `git-fetch` to first update -multiple branches of the local repository and then -to merge the remote `origin` branch into the local -`master` branch. The local `pu` branch is updated -even if it does not result in a fast forward update. -Here, the pull can obtain its objects from the local -repository using `.`, as the previous `git-fetch` is -known to have already obtained and made available -all the necessary objects. - - -Pull of multiple branches from one repository using `.git/remotes` file:: +This updates (or creates, as necessary) branches `pu` and `tmp` +in the local repository by fetching from the branches +(respectively) `pu` and `maint` from the remote repository. + ------------------------------------------------- -$ cat .git/remotes/origin -URL: git://git.kernel.org/pub/scm/git/git.git -Pull: master:origin -Pull: +pu:pu -Pull: maint:maint - -$ git checkout master -$ git pull origin ------------------------------------------------- +The `pu` branch will be updated even if it is does not +fast-forward; the others will not be. + -Here, a typical `.git/remotes/origin` file from a -`git-clone` operation has been hand-modified to include -the branch-mapping of additional remote and local -heads directly. A single `git-pull` operation while -in the `master` branch will fetch multiple heads and -merge the remote `origin` head into the current, -local `master` branch. +The final command then merges the newly fetched `tmp` into master. If you tried a pull which resulted in a complex conflicts and @@ -112,7 +93,7 @@ gitlink:git-reset[1]. SEE ALSO -------- -gitlink:git-fetch[1], gitlink:git-merge[1] +gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1] Author From 6f0b4ac0d730c99ab1c2962168675b920febb187 Mon Sep 17 00:00:00 2001 From: "J. Bruce Fields" Date: Mon, 1 Jan 2007 16:40:23 -0500 Subject: [PATCH 08/10] Documentation: remove master:origin example from pull-fetch-param.txt This is no longer a useful example. Signed-off-by: "J. Bruce Fields" Signed-off-by: Junio C Hamano --- Documentation/pull-fetch-param.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Documentation/pull-fetch-param.txt b/Documentation/pull-fetch-param.txt index e852f41a32..8d4e950abc 100644 --- a/Documentation/pull-fetch-param.txt +++ b/Documentation/pull-fetch-param.txt @@ -39,10 +39,6 @@ checkout -b my-B remote-B`). Run `git fetch` to keep track of the progress of the remote side, and when you see something new on the remote branch, merge it into your development branch with `git pull . remote-B`, while you are on `my-B` branch. -The common `Pull: master:origin` mapping of a remote `master` -branch to a local `origin` branch, which is then merged to a -local development branch, again typically named `master`, is made -when you run `git clone` for you to follow this pattern. + [NOTE] There is a difference between listing multiple From a597fb0e713d172a34efb4bf6f65cf2f64cf4536 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Jan 2007 15:07:35 -0800 Subject: [PATCH 09/10] Strongly discourage --update-head-ok in fetch-options documentation. "Use it with care" is a wrong wording to say "this is purely internal and you are supposed to know what you are doing if you use this". Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 13f34d3ca2..39bf77fbef 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -36,6 +36,8 @@ -u, \--update-head-ok:: By default `git-fetch` refuses to update the head which corresponds to the current branch. This flag disables the - check. Note that fetching into the current branch will not - update the index and working directory, so use it with care. + check. This is purely for the internal use for `git-pull` + to communicate with `git-fetch`, and unless you are + implementing your own Porcelain you are not supposed to + use it. From f4bf2184ae8b79f95b9f56c1ea5455d04e559299 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 1 Jan 2007 15:08:06 -0800 Subject: [PATCH 10/10] Update clone/fetch documentation with --depth (shallow clone) option Signed-off-by: Junio C Hamano --- Documentation/fetch-options.txt | 5 +++++ Documentation/git-clone.txt | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Documentation/fetch-options.txt b/Documentation/fetch-options.txt index 39bf77fbef..5b4d184a73 100644 --- a/Documentation/fetch-options.txt +++ b/Documentation/fetch-options.txt @@ -41,3 +41,8 @@ implementing your own Porcelain you are not supposed to use it. +\--depth=:: + Deepen the history of a 'shallow' repository created by + `git clone` with `--depth=` option (see gitlink:git-clone[1]) + by the specified number of commits. + diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 96523204dd..e7085fdf5f 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -11,7 +11,7 @@ SYNOPSIS [verse] 'git-clone' [--template=] [-l [-s]] [-q] [-n] [--bare] [-o ] [-u ] [--reference ] - [] + [--depth=] [] DESCRIPTION ----------- @@ -31,6 +31,7 @@ the remote branch heads under `$GIT_DIR/refs/remotes/origin` and by initializing `remote.origin.url` and `remote.origin.fetch` configuration variables. + OPTIONS ------- --local:: @@ -95,6 +96,15 @@ OPTIONS if unset the templates are taken from the installation defined default, typically `/usr/share/git-core/templates`. +--depth=:: + Create a 'shallow' clone with a history truncated to the + specified number of revs. A shallow repository has + number of limitations (you cannot clone or fetch from + it, nor push from nor into it), but is adequate if you + want to only look at near the tip of a large project + with a long history, and would want to send in a fixes + as patches. + :: The (possibly remote) repository to clone from. It can be any URL git-fetch supports.