Re: [PATCH] use lockfile.c routines in git_commit_set_multivar()

Subsystems: the rest

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] use lockfile.c routines in git_commit_set_multivar()

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:24

Junio C Hamano [off-list ref] writes:
"Bradford Smith" [off-list ref] writes:
quoted
FWIW, I have successfully run 'make test' and also verified that it
behaves as I expect with my ~/.gitconfig symlink (in conjunction with
the my other patch for resolving symlinks).
Existing "make test" testsuite is not an appropriate thing to
say this patch is safe, as we do not have much symlinking in the
test git repository there.  Care to add a new test or two?
How about this?  On top of your "lockfile to keep symlink" and
"set-multivar to use lockfile protocol" patches.

---

 t/t1300-repo-config.sh |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 1c43cc3..187ca2d 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -595,4 +595,19 @@ echo >>result
 
 test_expect_success '--null --get-regexp' 'cmp result expect'
 
+test_expect_success 'symlinked configuration' '
+
+	ln -s notyet myconfig &&
+	GIT_CONFIG=myconfig git config test.frotz nitfol &&
+	test -h myconfig &&
+	test -f notyet &&
+	test "z$(GIT_CONFIG=notyet git config test.frotz)" = znitfol &&
+	GIT_CONFIG=myconfig git config test.xyzzy rezrov &&
+	test -h myconfig &&
+	test -f notyet &&
+	test "z$(GIT_CONFIG=notyet git config test.frotz)" = znitfol &&
+	test "z$(GIT_CONFIG=notyet git config test.xyzzy)" = zrezrov
+
+'
+
 test_done

Re: [PATCH] use lockfile.c routines in git_commit_set_multivar()

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:24

Hi,

On Thu, 26 Jul 2007, Junio C Hamano wrote:
How about this?  On top of your "lockfile to keep symlink" and
"set-multivar to use lockfile protocol" patches.
Looks very good to me!

Ciao,
Dscho

Re: [PATCH] use lockfile.c routines in git_commit_set_multivar()

From: Bradford Smith <hidden>
Date: 2016-06-15 22:43:24

That's great!

I've added this patch to my local branch and confirmed that all tests,
including the new ones, run successfully.

Thanks!

Bradford

On 7/27/07, Junio C Hamano [off-list ref] wrote:
quoted hunk
Junio C Hamano [off-list ref] writes:
quoted
"Bradford Smith" [off-list ref] writes:
quoted
FWIW, I have successfully run 'make test' and also verified that it
behaves as I expect with my ~/.gitconfig symlink (in conjunction with
the my other patch for resolving symlinks).
Existing "make test" testsuite is not an appropriate thing to
say this patch is safe, as we do not have much symlinking in the
test git repository there.  Care to add a new test or two?
How about this?  On top of your "lockfile to keep symlink" and
"set-multivar to use lockfile protocol" patches.

---

 t/t1300-repo-config.sh |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 1c43cc3..187ca2d 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -595,4 +595,19 @@ echo >>result

 test_expect_success '--null --get-regexp' 'cmp result expect'

+test_expect_success 'symlinked configuration' '
+
+       ln -s notyet myconfig &&
+       GIT_CONFIG=myconfig git config test.frotz nitfol &&
+       test -h myconfig &&
+       test -f notyet &&
+       test "z$(GIT_CONFIG=notyet git config test.frotz)" = znitfol &&
+       GIT_CONFIG=myconfig git config test.xyzzy rezrov &&
+       test -h myconfig &&
+       test -f notyet &&
+       test "z$(GIT_CONFIG=notyet git config test.frotz)" = znitfol &&
+       test "z$(GIT_CONFIG=notyet git config test.xyzzy)" = zrezrov
+
+'
+
 test_done
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help