From: Jens Lehmann <Jens.Lehmann@web.de>
To: "Torsten Bögershausen" <tboegi@web.de>,
"Junio C Hamano" <gitster@pobox.com>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 00/14] Add submodule test harness
Date: Wed, 09 Jul 2014 20:19:31 +0200 [thread overview]
Message-ID: <53BD87B3.8050901@web.de> (raw)
In-Reply-To: <53BCDDE2.1080301@web.de>
Am 09.07.2014 08:14, schrieb Torsten Bögershausen:
>
>>> There seems to be some other trouble under Mac OS, not yet fully tracked down,
>>> (may be related to the "diff -r")
>> Torsten sees failures of this kind under Mac OS:
>>
>> diff -r .git/modules/sub1/config sub1/.git/config
>> 6d5
>> < worktree = ../../../sub1
>> 8a8
>>> worktree = ../../../sub1
>> So the config contains the same content, but the worktree setting moved
>> to a different line. This seems to be the result of setting core.worktree
>> in the test_git_directory_is_unchanged function just before the "diff -r",
>> but only under Mac OS.
>>
> So I was suspecting diff -r beinng non-portable, but that doesn't seem to be the problem here.
> (But I wouldn't be surprised if there where problems with diff -r on some Unix systems)
> Anyway, checking all the files in the working tree seems to be a good thing to do,
> but that does not necessarily work for .git/config.
I agree, but this case is special. The test asserts that nobody
added, modified or removed *anything* inside the .git directory.
The reason for problem we are seeing here is that I have to
remove the core.worktree setting when moving the git directory
from .git/modules into the submodule work tree. So the test adds
it again to be able to diff it, and this happens in a different
line only on Mac OS as comparing the two core sections shows:
> ---------------------
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = false
> logallrefupdates = true
> worktree = ../../../sub1
> ignorecase = true
> precomposeunicode = true
> [remote "origin"]
vs.
> ----------------
> [core]
> repositoryformatversion = 0
> filemode = true
> bare = false
> logallrefupdates = true
> ignorecase = true
> precomposeunicode = true
> worktree = ../../../sub1
> [remote "origin"]
And now it's clear what happens here: On Mac OS the ignorecase
and precomposeunicode settings are added behind the worktree
line, then re-adding worktree later for the comparison adds it
after these two.
Could you please test the following? It should avoid this kind
of problem by removing the core.worktree setting temporarily
from the original config in .git/modules instead of adding it
temporarily to .git/config:
-----------------------8<-----------------------
diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh
index 3584755..98c86e3 100755
--- a/t/lib-submodule-update.sh
+++ b/t/lib-submodule-update.sh
@@ -143,18 +143,18 @@ replace_gitfile_with_git_dir () {
}
# Test that the .git directory in the submodule is unchanged (except for the
-# core.worktree setting, which we temporarily restore). Call this function
+# core.worktree setting, which we temporarily remove). Call this function
# before test_submodule_content as the latter might write the index file
# leading to false positive index differences.
test_git_directory_is_unchanged () {
(
- cd "$1" &&
- git config core.worktree "../../../$1"
+ cd ".git/modules/$1" &&
+ git config --unset core.worktree
) &&
diff -r ".git/modules/$1" "$1/.git" &&
(
- cd "$1" &&
- GIT_WORK_TREE=. git config --unset core.worktree
+ cd ".git/modules/$1" &&
+ git config core.worktree "../../../$1"
)
}
next prev parent reply other threads:[~2014-07-09 18:19 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-15 16:56 [PATCH 00/14] Add submodule test harness Jens Lehmann
2014-06-15 16:57 ` [PATCH 01/14] test-lib: add test_dir_is_empty() Jens Lehmann
2014-06-16 22:05 ` Junio C Hamano
2014-06-17 16:47 ` Jens Lehmann
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-06-15 16:58 ` [PATCH 02/14] submodules: Add the lib-submodule-update.sh test library Jens Lehmann
2014-06-16 22:49 ` Junio C Hamano
2014-06-17 17:33 ` Jens Lehmann
2014-06-17 18:44 ` Junio C Hamano
2014-06-17 20:46 ` Jens Lehmann
2014-06-17 21:05 ` Junio C Hamano
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-06-20 17:31 ` Junio C Hamano
2014-07-01 21:24 ` [PATCH v3 " Jens Lehmann
2014-06-15 16:58 ` [PATCH 03/14] checkout: call the new submodule update test framework Jens Lehmann
2014-06-15 16:59 ` [PATCH 04/14] apply: add t4137 for submodule updates Jens Lehmann
2014-06-15 16:59 ` [PATCH 05/14] read-tree: add t1013 " Jens Lehmann
2014-06-15 17:00 ` [PATCH 06/14] reset: add t7112 " Jens Lehmann
2014-06-15 17:01 ` [PATCH 07/14] bisect: add t6041 " Jens Lehmann
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-06-15 17:01 ` [PATCH 08/14] merge: add t7613 " Jens Lehmann
2014-06-15 17:02 ` [PATCH 09/14] rebase: add t3426 " Jens Lehmann
2014-06-16 9:57 ` Eric Sunshine
2014-06-17 17:41 ` Jens Lehmann
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-06-15 17:02 ` [PATCH 10/14] pull: add t5572 " Jens Lehmann
2014-06-15 17:03 ` [PATCH 11/14] cherry-pick: add t3512 " Jens Lehmann
2014-06-15 17:03 ` [PATCH 12/14] am: add t4255 " Jens Lehmann
2014-06-15 17:04 ` [PATCH 13/14] stash: add t3906 " Jens Lehmann
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-06-15 17:04 ` [PATCH 14/14] revert: add t3513 " Jens Lehmann
2014-06-19 20:12 ` [PATCH v2 " Jens Lehmann
2014-07-02 14:54 ` [PATCH 00/14] Add submodule test harness Torsten Bögershausen
2014-07-02 19:57 ` Jens Lehmann
2014-07-03 5:56 ` Torsten Bögershausen
2014-07-03 21:14 ` Jens Lehmann
2014-07-07 17:05 ` Junio C Hamano
2014-07-07 19:40 ` Torsten Bögershausen
2014-07-08 19:34 ` Jens Lehmann
2014-07-08 20:25 ` Ramsay Jones
2014-07-08 21:03 ` Ramsay Jones
2014-07-09 6:39 ` No fchmod() under msygit - Was: " Torsten Bögershausen
2014-07-09 20:00 ` Eric Wong
2014-07-14 11:31 ` Erik Faye-Lund
2014-07-14 13:55 ` Nico Williams
2014-07-14 14:02 ` Nico Williams
2014-07-14 19:30 ` Karsten Blees
2014-07-14 21:18 ` Junio C Hamano
2014-07-09 6:14 ` Torsten Bögershausen
2014-07-09 15:20 ` Junio C Hamano
2014-07-09 18:19 ` Jens Lehmann [this message]
2014-07-09 19:31 ` Junio C Hamano
2014-07-10 20:52 ` Junio C Hamano
2014-07-12 18:23 ` Jens Lehmann
2014-07-14 1:01 ` Junio C Hamano
2014-07-14 18:22 ` Jens Lehmann
2014-07-14 21:18 ` Junio C Hamano
2014-07-09 17:21 ` Johannes Sixt
2014-07-09 19:22 ` Junio C Hamano
2014-07-09 19:56 ` Eric Wong
2014-07-09 21:57 ` Junio C Hamano
2014-07-10 6:22 ` No fchmd. was: " Torsten Bögershausen
2014-07-10 19:49 ` Junio C Hamano
2014-07-10 20:55 ` Torsten Bögershausen
2014-07-10 21:43 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BD87B3.8050901@web.de \
--to=jens.lehmann@web.de \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=tboegi@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).