Merge branch 'jn/t9010-work-around-broken-svnadmin'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Jan 2011 19:34:52 +0000 (11:34 -0800)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jan 2011 19:34:52 +0000 (11:34 -0800)
* jn/t9010-work-around-broken-svnadmin:
t9010: svnadmin can fail even if available

18 files changed:
Documentation/RelNotes/1.7.3.5.txt
Documentation/RelNotes/1.7.4.txt
Documentation/git-archive.txt
Documentation/git-svn.txt
Documentation/git.txt
Documentation/githooks.txt
GIT-VERSION-GEN
builtin/commit.c
git-submodule.sh
gitk-git/gitk [changed mode: 0644->0755]
t/t0000-basic.sh
t/t0001-init.sh
t/t1510-repo-setup.sh
t/t3032-merge-recursive-options.sh
t/t3301-notes.sh
t/t7400-submodule-basic.sh
t/t9157-git-svn-fetch-merge.sh
trace.c
index 8c266cde7212d85b44a7ee3386633ad7d5d9d97d..40f3ba579544cd0429df1e38646b88a6b8c43075 100644 (file)
@@ -30,3 +30,5 @@ Git 1.7.3.5 Release Notes
  * "git rebase --skip" to skip the last commit in a series used to fail
    to run post-rewrite hook and to copy notes from old commits that have
    successfully been rebased so far.  Now it do (backmerge ef88ad2).
+
+ * "gitweb" tried to show a wrong feed logo when none was specified.
index 375fea193567eda72b9511471b1a78f8f0b5c104..48dd9640d3e0264224b92801f38b9dca00b004b6 100644 (file)
@@ -15,7 +15,7 @@ Updates since v1.7.3
    themselves.  The name of a branch cannot begin with a dash now.
 
  * System-wide fallback default attributes can be stored in
-   /etc/gitattributes; core.attributesfile configuration variable can
+   /etc/gitattributes; the core.attributesfile configuration variable can
    be used to customize the path to this file.
 
  * The thread structure generated by "git send-email" has changed
@@ -25,34 +25,39 @@ Updates since v1.7.3
    cover letter of the previous series; this has been changed to make
    the patches in the new series replies to the new cover letter.
 
- * Bash completion script in contrib/ has been adjusted to be usable with
-   Bash 4 (options with '=value' didn't complete)  It has been also made
+ * The Bash completion script in contrib/ has been adjusted to be usable with
+   Bash 4 (options with '=value' didn't complete).  It has been also made
    usable with zsh.
 
  * Different pagers can be chosen depending on which subcommand is
-   being run under the pager, using "pager.<subcommand>" variable.
+   being run under the pager, using the "pager.<subcommand>" variable.
 
- * The hardcoded tab-width of 8 used in whitespace breakage checks is now
+ * The hardcoded tab-width of 8 that is used in whitespace breakage checks is now
    configurable via the attributes mechanism.
 
  * Support of case insensitive filesystems (i.e. "core.ignorecase") has
    been improved.  For example, the gitignore mechanism didn't pay attention
-   to the case insensitivity.
+   to case insensitivity.
 
- * The <tree>:<path> syntax to name a blob in a tree, and :<path>
-   syntax to name a blob in the index (e.g. "master:Makefile",
+ * The <tree>:<path> syntax for naming a blob in a tree, and the :<path>
+   syntax for naming a blob in the index (e.g. "master:Makefile",
    ":hello.c") have been extended.  You can start <path> with "./" to
    implicitly have the (sub)directory you are in prefixed to the
    lookup.  Similarly, ":../Makefile" from a subdirectory would mean
    "the Makefile of the parent directory in the index".
 
- * "git blame" learned --show-email option to display the e-mail
+ * "git blame" learned the --show-email option to display the e-mail
    addresses instead of the names of authors.
 
- * "git commit" learned --fixup and --squash options to help later invocation
-   of the interactive rebase.
+ * "git commit" learned the --fixup and --squash options to help later invocation
+   of interactive rebase.
 
- * "git daemon" can be built in MinGW environment.
+ * Command line options to "git cvsimport" whose names are in capital
+   letters (-A, -M, -R and -S) can now be specified as the default in
+   the .git/config file by their longer names (cvsimport.authorsFile,
+   cvsimport.mergeRegex, cvsimport.trackRevisions, cvsimport.ignorePaths).
+
+ * "git daemon" can be built in the MinGW environment.
 
  * "git daemon" can take more than one --listen option to listen to
    multiple addresses.
@@ -60,13 +65,13 @@ Updates since v1.7.3
  * "git describe --exact-match" was optimized not to read commit
    objects unnecessarily.
 
- * "git diff" and "git grep" learned how functions and subroutines
+ * "git diff" and "git grep" learned what functions and subroutines
    in Fortran look like.
 
- * "git fetch" learned "--recurse-submodules" option.
+ * "git fetch" learned the "--recurse-submodules" option.
 
- * "git mergetool" tells vim/gvim to show three-way diff by default
-   (use vimdiff2/gvimdiff2 as the tool name for old behaviour).
+ * "git mergetool" tells vim/gvim to show three-way diff by default
+   (use vimdiff2/gvimdiff2 as the tool name for old behavior).
 
  * "git log -G<pattern>" limits the output to commits whose change has
    added or deleted lines that match the given pattern.
@@ -86,12 +91,12 @@ Updates since v1.7.3
    directory in one branch while a new file is created in place of that
    directory in the other branch.
 
- * "git rebase --autosquash" can use SHA-1 object names to name which
-   commit to fix up (e.g. "fixup! e83c5163").
+ * "git rebase --autosquash" can use SHA-1 object names to name the
+   commit which is to be fixed up (e.g. "fixup! e83c5163").
 
- * The default "recursive" merge strategy learned --rename-threshold
+ * The default "recursive" merge strategy learned the --rename-threshold
    option to influence the rename detection, similar to the -M option
-   of "git diff".  From "git merge" frontend, "-X<strategy option>"
+   of "git diff".  From the "git merge" frontend, the "-X<strategy option>"
    interface, e.g. "git merge -Xrename-threshold=50% ...", can be used
    to trigger this.
 
@@ -99,21 +104,21 @@ Updates since v1.7.3
    changes; the most notable is -Xignore-space-at-eol.
 
  * "git send-email" learned "--to-cmd", similar to "--cc-cmd", to read
-   recipient list from a command output.
+   the recipient list from a command output.
 
  * "git send-email" learned to read and use "To:" from its input files.
 
  * you can extend "git shell", which is often used on boxes that allow
-   git-only login over ssh as login shell, with custom set of
+   git-only login over ssh as login shell, with custom set of
    commands.
 
  * The current branch name in "git status" output can be colored differently
-   from the generic header color by setting "color.status.branch" variable.
+   from the generic header color by setting the "color.status.branch" variable.
 
  * "git submodule sync" updates metainformation for all submodules,
    not just the ones that have been checked out.
 
- * gitweb can use custom 'highlight' command with its configuration file.
+ * gitweb can use custom 'highlight' command with its configuration file.
 
  * other gitweb updates.
 
@@ -124,7 +129,7 @@ Also contains various documentation updates.
 Fixes since v1.7.3
 ------------------
 
-All of the fixes in v1.7.3.X maintenance series are included in this
+All of the fixes in the v1.7.3.X maintenance series are included in this
 release, unless otherwise noted.
 
  * "git log --author=me --author=her" did not find commits written by
@@ -141,6 +146,6 @@ release, unless otherwise noted.
 
 ---
 exec >/var/tmp/1
-O=v1.7.3.4-687-g2cd900f
+O=v1.7.4-rc1
 echo O=$(git describe master)
 git shortlog --no-merges ^maint ^$O master
index 4163a1bcb1643e7f05b6a79034ac9f63135d6ac9..bf5037ab2a5042a20e9cb603f0831bb186ac3b74 100644 (file)
@@ -116,7 +116,7 @@ Note that attributes are by default taken from the `.gitattributes` files
 in the tree that is being archived.  If you want to tweak the way the
 output is generated after the fact (e.g. you committed without adding an
 appropriate export-ignore in its `.gitattributes`), adjust the checked out
-`.gitattributes` file as necessary and use `--work-tree-attributes`
+`.gitattributes` file as necessary and use `--worktree-attributes`
 option.  Alternatively you can keep necessary attributes that should apply
 while archiving any tree in your `$GIT_DIR/info/attributes` file.
 
index 254d0441b391f2ce0c66651f9f4f69cd0121a98b..0ade2ce54efee3cd2241fc7e3009909eef5cf8bb 100644 (file)
@@ -729,8 +729,11 @@ have each person clone that repository with 'git clone':
        cd project
        git init
        git remote add origin server:/pub/project
-       git config --add remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
+       git config --replace-all remote.origin.fetch '+refs/remotes/*:refs/remotes/*'
        git fetch
+# Prevent fetch/pull from remote git server in the future,
+# we only want to use git svn for future updates
+       git config --remove-section remote.origin
 # Create a local branch from one of the branches just fetched
        git checkout -b master FETCH_HEAD
 # Initialize 'git svn' locally (be sure to use the same URL and -T/-b/-t options as were used on server)
index 72e98aaa0f4471ebb9c52c5cfe976dd893cb3abc..4e5fe4d4b53f3706be2f7daa72beb20f376de603 100644 (file)
@@ -44,9 +44,10 @@ unreleased) version of git, that is available from 'master'
 branch of the `git.git` repository.
 Documentation for older releases are available here:
 
-* link:v1.7.3.4/git.html[documentation for release 1.7.3.4]
+* link:v1.7.3.5/git.html[documentation for release 1.7.3.5]
 
 * release notes for
+  link:RelNotes/1.7.3.5.txt[1.7.3.5],
   link:RelNotes/1.7.3.4.txt[1.7.3.4],
   link:RelNotes/1.7.3.3.txt[1.7.3.3],
   link:RelNotes/1.7.3.2.txt[1.7.3.2],
index 7183aa9abbc35018dc50a7c0e5254cc72115af23..28edefa202fb0d1065f161f59787ceae39439eb3 100644 (file)
@@ -350,10 +350,6 @@ rebase::
 The commits are guaranteed to be listed in the order that they were
 processed by rebase.
 
-There is no default 'post-rewrite' hook, but see the
-`post-receive-copy-notes` script in `contrib/hooks` for an example
-that copies your git-notes to the rewritten commits.
-
 
 GIT
 ---
index 2b5133a27acbbfc60520d859101ee6dc8d96f084..c29b94447894b93638dc99064fab3cb2db7daab6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=GIT-VERSION-FILE
-DEF_VER=v1.7.4-rc0
+DEF_VER=v1.7.4-rc1
 
 LF='
 '
index 22ba54f9bb2ea9f9f9f01528e8a155723da7a4da..03cff5af631fec975442c528b1ffba264b879c8e 100644 (file)
@@ -45,9 +45,9 @@ static const char implicit_ident_advice[] =
 "    git config --global user.name \"Your Name\"\n"
 "    git config --global user.email you@example.com\n"
 "\n"
-"If the identity used for this commit is wrong, you can fix it with:\n"
+"After doing this, you may fix the identity used for this commit with:\n"
 "\n"
-"    git commit --amend --author='Your Name <you@example.com>'\n";
+"    git commit --amend --reset-author\n";
 
 static const char empty_amend_advice[] =
 "You asked to amend the most recent commit, but doing so would make\n"
index c21b77aee54cd045b7bb64ae7337387569bbf65a..8b9058971767dbb4d94e996876f6ba7ed178ddd6 100755 (executable)
@@ -37,12 +37,24 @@ resolve_relative_url ()
                die "remote ($remote) does not have a url defined in .git/config"
        url="$1"
        remoteurl=${remoteurl%/}
+       sep=/
        while test -n "$url"
        do
                case "$url" in
                ../*)
                        url="${url#../}"
-                       remoteurl="${remoteurl%/*}"
+                       case "$remoteurl" in
+                       */*)
+                               remoteurl="${remoteurl%/*}"
+                               ;;
+                       *:*)
+                               remoteurl="${remoteurl%:*}"
+                               sep=:
+                               ;;
+                       *)
+                               die "cannot strip one component off url '$remoteurl'"
+                               ;;
+                       esac
                        ;;
                ./*)
                        url="${url#./}"
@@ -51,7 +63,7 @@ resolve_relative_url ()
                        break;;
                esac
        done
-       echo "$remoteurl/${url%/}"
+       echo "$remoteurl$sep${url%/}"
 }
 
 #
old mode 100644 (file)
new mode 100755 (executable)
index 2f7002a5e57d61a69d418cc55d1e939198c6ac20..8deec75c3a0eef961986a0bb313a918ab532f58d 100755 (executable)
@@ -80,11 +80,11 @@ EOF
     chmod +x passing-todo.sh &&
     ./passing-todo.sh >out 2>err &&
     ! test -s err &&
-cat >expect <<EOF &&
-ok 1 - pretend we have fixed a known breakage # TODO known breakage
-# fixed 1 known breakage(s)
-# passed all 1 test(s)
-1..1
+sed -e 's/^> //' >expect <<EOF &&
+ok 1 - pretend we have fixed a known breakage # TODO known breakage
+# fixed 1 known breakage(s)
+# passed all 1 test(s)
+1..1
 EOF
     test_cmp expect out)
 "
@@ -164,19 +164,19 @@ EOF
     test_must_fail ./failing-cleanup.sh >out 2>err &&
     ! test -s err &&
     ! test -f \"trash directory.failing-cleanup/clean-after-failure\" &&
-sed -e 's/Z$//' >expect <<\EOF &&
-not ok - 1 tests clean up even after a failure
-#      Z
-#          touch clean-after-failure &&
-#          test_when_finished rm clean-after-failure &&
-#          (exit 1)
-#      Z
-not ok - 2 failure to clean up causes the test to fail
-#      Z
-#          test_when_finished \"(exit 2)\"
-#      Z
-# failed 2 among 2 test(s)
-1..2
+sed -e 's/Z$//' -e 's/^> //' >expect <<\EOF &&
+not ok - 1 tests clean up even after a failure
+> #    Z
+> #        touch clean-after-failure &&
+> #        test_when_finished rm clean-after-failure &&
+> #        (exit 1)
+> #    Z
+not ok - 2 failure to clean up causes the test to fail
+> #    Z
+> #        test_when_finished \"(exit 2)\"
+> #    Z
+# failed 2 among 2 test(s)
+1..2
 EOF
     test_cmp expect out)
 "
index af8b9c52a9d4c899a05f8d2877de005cb4d1437d..f6849932112f1bbea1dafad09150857a707b64e4 100755 (executable)
@@ -35,7 +35,7 @@ test_expect_success 'plain' '
 
 test_expect_success 'plain nested in bare' '
        (
-               unset GIT_DIR GIT_WORK_TREE &&
+               sane_unset GIT_DIR GIT_WORK_TREE &&
                git init --bare bare-ancestor.git &&
                cd bare-ancestor.git &&
                mkdir plain-nested &&
@@ -47,7 +47,7 @@ test_expect_success 'plain nested in bare' '
 
 test_expect_success 'plain through aliased command, outside any git repo' '
        (
-               unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
+               sane_unset GIT_DIR GIT_WORK_TREE GIT_CONFIG_NOGLOBAL &&
                HOME=$(pwd)/alias-config &&
                export HOME &&
                mkdir alias-config &&
@@ -65,7 +65,7 @@ test_expect_success 'plain through aliased command, outside any git repo' '
 
 test_expect_failure 'plain nested through aliased command' '
        (
-               unset GIT_DIR GIT_WORK_TREE &&
+               sane_unset GIT_DIR GIT_WORK_TREE &&
                git init plain-ancestor-aliased &&
                cd plain-ancestor-aliased &&
                echo "[alias] aliasedinit = init" >>.git/config &&
@@ -78,7 +78,7 @@ test_expect_failure 'plain nested through aliased command' '
 
 test_expect_failure 'plain nested in bare through aliased command' '
        (
-               unset GIT_DIR GIT_WORK_TREE &&
+               sane_unset GIT_DIR GIT_WORK_TREE &&
                git init --bare bare-ancestor-aliased.git &&
                cd bare-ancestor-aliased.git &&
                echo "[alias] aliasedinit = init" >>config &&
index 500ffafc22e58cd06a01fc40b60643ce31443bb9..c3798ce17917827c5a00bed09b2475d761fde32d 100755 (executable)
@@ -80,7 +80,7 @@ test_repo() {
 #  - cwd can't be outside worktree
 
 test_expect_success '#0: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 0 0/sub &&
        cd 0 && git init && cd ..
 '
@@ -123,7 +123,7 @@ EOF
 # GIT_WORK_TREE is ignored -> #0
 
 test_expect_success '#1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 1 1/sub 1.wt 1.wt/sub 1/wt 1/wt/sub &&
        cd 1 &&
        git init &&
@@ -174,7 +174,7 @@ EOF
 #  - cwd can't be outside worktree
 
 test_expect_success '#2: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 2 2/sub &&
        cd 2 && git init && cd ..
 '
@@ -241,7 +241,7 @@ EOF
 #  - cwd can be outside worktree
 
 test_expect_success '#3: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 3 3/sub 3/sub/sub 3.wt 3.wt/sub 3/wt 3/wt/sub &&
        cd 3 && git init && cd ..
 '
@@ -504,7 +504,7 @@ EOF
 # core.worktree is ignored -> #0
 
 test_expect_success '#4: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 4 4/sub &&
        cd 4 &&
        git init &&
@@ -550,7 +550,7 @@ EOF
 # GIT_WORK_TREE/core.worktree are ignored -> #0
 
 test_expect_success '#5: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 5 5/sub &&
        cd 5 &&
        git init &&
@@ -602,7 +602,7 @@ EOF
 #  - cwd can be outside worktree
 
 test_expect_success '#6: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 6 6/sub 6/sub/sub 6.wt 6.wt/sub 6/wt 6/wt/sub &&
        cd 6 && git init && cd ..
 '
@@ -889,7 +889,7 @@ EOF
 # core.worktree is overridden by GIT_WORK_TREE -> #3
 
 test_expect_success '#7: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 7 7/sub 7/sub/sub 7.wt 7.wt/sub 7/wt 7/wt/sub &&
        cd 7 &&
        git init &&
@@ -1155,7 +1155,7 @@ EOF
 # #0 except that git_dir is set by .git file
 
 test_expect_success '#8: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 8 8/sub &&
        cd 8 &&
        git init &&
@@ -1202,7 +1202,7 @@ EOF
 # #1 except that git_dir is set by .git file
 
 test_expect_success '#9: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 9 9/sub 9.wt 9.wt/sub 9/wt 9/wt/sub &&
        cd 9 &&
        git init &&
@@ -1251,7 +1251,7 @@ EOF
 # #2 except that git_dir is set by .git file
 
 test_expect_success '#10: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 10 10/sub &&
        cd 10 &&
        git init &&
@@ -1318,7 +1318,7 @@ EOF
 # #3 except that git_dir is set by .git file
 
 test_expect_success '#11: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 11 11/sub 11/sub/sub 11.wt 11.wt/sub 11/wt 11/wt/sub &&
        cd 11 &&
        git init &&
@@ -1586,7 +1586,7 @@ EOF
 
 
 test_expect_success '#12: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 12 12/sub 12/sub/sub 12.wt 12.wt/sub 12/wt 12/wt/sub &&
        cd 12 &&
        git init &&
@@ -1634,7 +1634,7 @@ EOF
 # #5 except that git_dir is set by .git file
 
 test_expect_success '#13: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 13 13/sub 13/sub/sub 13.wt 13.wt/sub 13/wt 13/wt/sub &&
        cd 13 &&
        git init &&
@@ -1684,7 +1684,7 @@ EOF
 # #6 except that git_dir is set by .git file
 
 test_expect_success '#14: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 14 14/sub 14/sub/sub 14.wt 14.wt/sub 14/wt 14/wt/sub &&
        cd 14 &&
        git init &&
@@ -1975,7 +1975,7 @@ EOF
 # #7 except that git_dir is set by .git file
 
 test_expect_success '#15: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 15 15/sub 15/sub/sub 15.wt 15.wt/sub 15/wt 15/wt/sub &&
        cd 15 &&
        git init &&
@@ -2247,7 +2247,7 @@ EOF
 #  - cwd can't be outside worktree
 
 test_expect_success '#16.1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 16 16/sub &&
        cd 16 &&
        git init &&
@@ -2378,7 +2378,7 @@ EOF
 # GIT_WORK_TREE is ignored -> #16.1 (with warnings perhaps)
 
 test_expect_success '#17.1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 17 17/sub &&
        cd 17 &&
        git init &&
@@ -2511,7 +2511,7 @@ EOF
 #  - cwd can't be outside worktree
 
 test_expect_success '#18: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 18 18/sub &&
        cd 18 &&
        git init &&
@@ -2578,7 +2578,7 @@ EOF
 # bare repo is overridden by GIT_WORK_TREE -> #3
 
 test_expect_success '#19: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 19 19/sub 19/sub/sub 19.wt 19.wt/sub 19/wt 19/wt/sub &&
        cd 19 &&
        git init &&
@@ -2844,7 +2844,7 @@ EOF
 # core.worktree is ignored -> #16.1
 
 test_expect_success '#20.1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 20 20/sub &&
        cd 20 &&
        git init &&
@@ -2972,7 +2972,7 @@ EOF
 # GIT_WORK_TREE/core.worktree are ignored -> #20.1
 
 test_expect_success '#21.1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 21 21/sub &&
        cd 21 &&
        git init &&
@@ -3108,7 +3108,7 @@ EOF
 #  - cwd can be outside worktree
 
 test_expect_success '#22.1: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 22 &&
        cd 22 &&
        git init &&
@@ -3439,7 +3439,7 @@ test_expect_success '#22.2: at root' '
 # core.worktree is overridden by GIT_WORK_TREE -> #19
 
 test_expect_success '#23: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 23 23/sub 23/sub/sub 23.wt 23.wt/sub 23/wt 23/wt/sub &&
        cd 23 &&
        git init &&
@@ -3706,7 +3706,7 @@ EOF
 # #16.2 except git_dir is set according to .git file
 
 test_expect_success '#24: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 24 24/sub &&
        cd 24 &&
        git init &&
@@ -3754,7 +3754,7 @@ EOF
 # #17.2 except git_dir is set according to .git file
 
 test_expect_success '#25: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 25 25/sub &&
        cd 25 &&
        git init &&
@@ -3804,7 +3804,7 @@ EOF
 # #18 except git_dir is set according to .git file
 
 test_expect_success '#26: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 26 26/sub &&
        cd 26 &&
        git init &&
@@ -3872,7 +3872,7 @@ EOF
 # #19 except git_dir is set according to .git file
 
 test_expect_success '#27: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 27 27/sub 27/sub/sub 27.wt 27.wt/sub 27/wt 27/wt/sub &&
        cd 27 &&
        git init &&
@@ -4140,7 +4140,7 @@ EOF
 # core.worktree is ignored -> #24
 
 test_expect_success '#28: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 28 28/sub &&
        cd 28 &&
        git init &&
@@ -4189,7 +4189,7 @@ EOF
 # GIT_WORK_TREE/core.worktree are ignored -> #28
 
 test_expect_success '#29: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 29 29/sub &&
        cd 29 &&
        git init &&
@@ -4239,7 +4239,7 @@ EOF
 # core.worktree and core.bare conflict, won't fly.
 
 test_expect_success '#30: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 30 &&
        cd 30 &&
        git init &&
@@ -4278,7 +4278,7 @@ test_expect_success '#30: at root' '
 # #23 except git_dir is set according to .git file
 
 test_expect_success '#31: setup' '
-       unset GIT_DIR GIT_WORK_TREE &&
+       sane_unset GIT_DIR GIT_WORK_TREE &&
        mkdir 31 31/sub 31/sub/sub 31.wt 31.wt/sub 31/wt 31/wt/sub &&
        cd 31 &&
        git init &&
index 2293797553d49c5221da10ca17f97eeba1f5d29d..de9ff89d14ff97f1691efee3a670084d4f20a249 100755 (executable)
@@ -16,13 +16,13 @@ test_description='merge-recursive options
 test_expect_success 'setup' '
        conflict_hunks () {
                sed -n -e "
-                       /^<<<</ b inconflict
+                       /^<<<</ b conflict
                        b
-                       : inconflict
+                       : conflict
                        p
                        /^>>>>/ b
                        n
-                       b inconflict
+                       b conflict
                " "$@"
        } &&
 
index dc2e04a0161c8d6b3f6eefc1873852a377a26393..1921ca3a73370d378e6aedd0820fd8d2a030da03 100755 (executable)
@@ -1067,7 +1067,7 @@ test_expect_success 'git notes copy diagnoses too many or too few parameters' '
 
 test_expect_success 'git notes get-ref (no overrides)' '
        git config --unset core.notesRef &&
-       unset GIT_NOTES_REF &&
+       sane_unset GIT_NOTES_REF &&
        test "$(git notes get-ref)" = "refs/notes/commits"
 '
 
index 2c49db9f6244225db7f82b574f21f05b58bfdc26..874279e32da98ac2c20137a207a0d115f073e444 100755 (executable)
@@ -446,4 +446,42 @@ test_expect_success 'add should fail when path is used by an existing directory'
        )
 '
 
+test_expect_success 'set up for relative path tests' '
+       mkdir reltest &&
+       (
+               cd reltest &&
+               git init &&
+               mkdir sub &&
+               (
+                       cd sub &&
+                       git init &&
+                       test_commit foo
+               ) &&
+               git add sub &&
+               git config -f .gitmodules submodule.sub.path sub &&
+               git config -f .gitmodules submodule.sub.url ../subrepo &&
+               cp .git/config pristine-.git-config
+       )
+'
+
+test_expect_success 'relative path works with URL' '
+       (
+               cd reltest &&
+               cp pristine-.git-config .git/config &&
+               git config remote.origin.url ssh://hostname/repo &&
+               git submodule init &&
+               test "$(git config submodule.sub.url)" = ssh://hostname/subrepo
+       )
+'
+
+test_expect_success 'relative path works with user@host:path' '
+       (
+               cd reltest &&
+               cp pristine-.git-config .git/config &&
+               git config remote.origin.url user@host:repo &&
+               git submodule init &&
+               test "$(git config submodule.sub.url)" = user@host:subrepo
+       )
+'
+
 test_done
index da582c53825a5719f6c9d82983e0951afcccd0df..991d2aa1be63c2440db93e6237201383e28a498a 100755 (executable)
@@ -6,6 +6,14 @@
 test_description='git svn merge detection'
 . ./lib-git-svn.sh
 
+svn_ver="$(svn --version --quiet)"
+case $svn_ver in
+0.* | 1.[0-4].*)
+       skip_all="skipping git-svn test - SVN too old ($svn_ver)"
+       test_done
+       ;;
+esac
+
 test_expect_success 'initialize source svn repo' '
        svn_cmd mkdir -m x "$svnrepo"/trunk &&
        svn_cmd mkdir -m x "$svnrepo"/branches &&
diff --git a/trace.c b/trace.c
index 02279b82c48eeb9b6e084b10dc2646eec5efbc01..35d388dce44a4a8e3d6053dfd6abcb652771818a 100644 (file)
--- a/trace.c
+++ b/trace.c
@@ -154,6 +154,7 @@ static const char *quote_crnl(const char *path)
 /* FIXME: move prefix to startup_info struct and get rid of this arg */
 void trace_repo_setup(const char *prefix)
 {
+       const char *git_work_tree;
        char cwd[PATH_MAX];
        char *trace = getenv("GIT_TRACE");
 
@@ -164,8 +165,14 @@ void trace_repo_setup(const char *prefix)
        if (!getcwd(cwd, PATH_MAX))
                die("Unable to get current working directory");
 
+       if (!(git_work_tree = get_git_work_tree()))
+               git_work_tree = "(null)";
+
+       if (!prefix)
+               prefix = "(null)";
+
        trace_printf("setup: git_dir: %s\n", quote_crnl(get_git_dir()));
-       trace_printf("setup: worktree: %s\n", quote_crnl(get_git_work_tree()));
+       trace_printf("setup: worktree: %s\n", quote_crnl(git_work_tree));
        trace_printf("setup: cwd: %s\n", quote_crnl(cwd));
        trace_printf("setup: prefix: %s\n", quote_crnl(prefix));
 }