diff options
-rw-r--r-- | Documentation/RelNotes/1.7.3.5.txt | 2 | ||||
-rw-r--r-- | Documentation/RelNotes/1.7.4.txt | 57 | ||||
-rw-r--r-- | Documentation/git-archive.txt | 2 | ||||
-rw-r--r-- | Documentation/git-svn.txt | 5 | ||||
-rw-r--r-- | Documentation/git.txt | 3 | ||||
-rw-r--r-- | Documentation/githooks.txt | 4 | ||||
-rwxr-xr-x | GIT-VERSION-GEN | 2 | ||||
-rw-r--r-- | builtin/commit.c | 4 | ||||
-rwxr-xr-x | git-submodule.sh | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | gitk-git/gitk | 0 | ||||
-rwxr-xr-x | t/t0000-basic.sh | 36 | ||||
-rwxr-xr-x | t/t0001-init.sh | 8 | ||||
-rwxr-xr-x | t/t1510-repo-setup.sh | 64 | ||||
-rwxr-xr-x | t/t3032-merge-recursive-options.sh | 6 | ||||
-rwxr-xr-x | t/t3301-notes.sh | 2 | ||||
-rwxr-xr-x | t/t7400-submodule-basic.sh | 38 | ||||
-rwxr-xr-x | t/t9157-git-svn-fetch-merge.sh | 8 | ||||
-rw-r--r-- | trace.c | 9 |
18 files changed, 169 insertions, 97 deletions
diff --git a/Documentation/RelNotes/1.7.3.5.txt b/Documentation/RelNotes/1.7.3.5.txt index 8c266cde72..40f3ba5795 100644 --- a/Documentation/RelNotes/1.7.3.5.txt +++ b/Documentation/RelNotes/1.7.3.5.txt @@ -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. diff --git a/Documentation/RelNotes/1.7.4.txt b/Documentation/RelNotes/1.7.4.txt index 375fea1935..48dd9640d3 100644 --- a/Documentation/RelNotes/1.7.4.txt +++ b/Documentation/RelNotes/1.7.4.txt @@ -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 a 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 a 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 a 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 diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 4163a1bcb1..bf5037ab2a 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -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. diff --git a/Documentation/git-svn.txt b/Documentation/git-svn.txt index 254d0441b3..0ade2ce54e 100644 --- a/Documentation/git-svn.txt +++ b/Documentation/git-svn.txt @@ -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) diff --git a/Documentation/git.txt b/Documentation/git.txt index 72e98aaa0f..4e5fe4d4b5 100644 --- a/Documentation/git.txt +++ b/Documentation/git.txt @@ -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], diff --git a/Documentation/githooks.txt b/Documentation/githooks.txt index 7183aa9abb..28edefa202 100644 --- a/Documentation/githooks.txt +++ b/Documentation/githooks.txt @@ -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 --- diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 2b5133a27a..c29b944478 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v1.7.4-rc0 +DEF_VER=v1.7.4-rc1 LF=' ' diff --git a/builtin/commit.c b/builtin/commit.c index 22ba54f9bb..03cff5af63 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -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" diff --git a/git-submodule.sh b/git-submodule.sh index c21b77aee5..8b90589717 100755 --- a/git-submodule.sh +++ b/git-submodule.sh @@ -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%/}" } # diff --git a/gitk-git/gitk b/gitk-git/gitk index e82c6bfede..e82c6bfede 100644..100755 --- a/gitk-git/gitk +++ b/gitk-git/gitk diff --git a/t/t0000-basic.sh b/t/t0000-basic.sh index 2f7002a5e5..8deec75c3a 100755 --- a/t/t0000-basic.sh +++ b/t/t0000-basic.sh @@ -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) " diff --git a/t/t0001-init.sh b/t/t0001-init.sh index af8b9c52a9..f684993211 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -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 && diff --git a/t/t1510-repo-setup.sh b/t/t1510-repo-setup.sh index 500ffafc22..c3798ce179 100755 --- a/t/t1510-repo-setup.sh +++ b/t/t1510-repo-setup.sh @@ -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 && diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh index 2293797553..de9ff89d14 100755 --- a/t/t3032-merge-recursive-options.sh +++ b/t/t3032-merge-recursive-options.sh @@ -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 " "$@" } && diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh index dc2e04a016..1921ca3a73 100755 --- a/t/t3301-notes.sh +++ b/t/t3301-notes.sh @@ -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" ' diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 2c49db9f62..874279e32d 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -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 diff --git a/t/t9157-git-svn-fetch-merge.sh b/t/t9157-git-svn-fetch-merge.sh index da582c5382..991d2aa1be 100755 --- a/t/t9157-git-svn-fetch-merge.sh +++ b/t/t9157-git-svn-fetch-merge.sh @@ -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 && @@ -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)); } |