From: Lars Hjemli <hidden> Date: 2016-06-15 22:44:10
This is a resend of my previous patches + an update to make git-submodule
work with the .git-file + a litte documentation.
PS: Regarding the color of the bikeshed, it seems that everyone can live
with "gitdir:" so that's what I ended up using.
Diffstat:
Documentation/repository-layout.txt | 5 ++-
git-submodule.sh | 4 +-
setup.c | 40 +++++++++++++++++++
t/t0002-gitfile.sh | 71 +++++++++++++++++++++++++++++++++++
4 files changed, 117 insertions(+), 3 deletions(-)
From: Lars Hjemli <hidden> Date: 2016-06-15 22:44:10
When git-submodule tried to detect 'active' submodules, it checked for the
existence of a directory named '.git'. This isn't good enough now that .git
can be a file pointing to the real $GIT_DIR so the tests are changed to
reflect this.
Signed-off-by: Lars Hjemli <redacted>
---
git-submodule.sh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
From: Lars Hjemli <hidden> Date: 2016-06-15 22:44:10
Verify that the basic plumbing works when .git is a file pointing at
the real git directory.
Signed-off-by: Lars Hjemli <redacted>
---
t/t0002-gitfile.sh | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 71 insertions(+), 0 deletions(-)
create mode 100755 t/t0002-gitfile.sh
From: Lars Hjemli <hidden> Date: 2016-06-15 22:44:10
This patch allows .git to be a regular textfile containing the path of
the real git directory (formatted like "gitdir: <path>\n"), which is
useful on platforms lacking support for real symlinks.
Signed-off-by: Lars Hjemli <redacted>
---
setup.c | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
@@ -3,7 +3,10 @@ git repository layout You may find these things in your git repository (`.git` directory for a repository associated with your working tree, or-`'project'.git` directory for a public 'bare' repository).+`'project'.git` directory for a public 'bare' repository. It is+also possible to have a working tree where `.git` is a plain+ascii file containing `gitdir: <path>\n`, i.e. the path to the+real git repository). objects:: Object store associated with this repository. Usually
From: Lars Hjemli <hidden> Date: 2016-06-15 22:44:10
On Feb 4, 2008 11:23 PM, Mike Hommey [off-list ref] wrote:
On Mon, Feb 04, 2008 at 09:59:21PM +0100, Lars Hjemli wrote:
quoted
- if ! test -d "$path"/.git
+ if ! test -e "$path"/.git
Is test -e supported by all shells we support ? I have some doubts...
I dunno, but we already use it two other places in git-submodule.
I guess we can rewrite it to something like
test -d $path || test -f $path || test -L $path || exist=0
if needed.
--
lh