git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 27, 2007, 04:53 UTC
Message-ID
<7v7iom5twd.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7vfy3a5uzv.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <gitster@pobox.com> writes:
Show 9 quoted lines
> "Bradford Smith" <bradford.carl.smith@gmail.com> writes:
>
>> 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
Previous: Junio C HamanoNext: Johannes Schindelin
Message 5 of 7 in “use lockfile.c routines in git_commit_set_multivar()”
  1. use lockfile.c routines in git_commit_set_multivar()Bradford C. Smith, Jul 26, 2007
  2. Johannes SchindelinJul 26, 2007
  3. Bradford SmithJul 26, 2007
  4. Junio C HamanoJul 27, 2007
  5. Junio C HamanoJul 27, 2007
  6. Johannes SchindelinJul 27, 2007
  7. Bradford SmithJul 27, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.