From: Dmitry Gutov <dgutov@yandex.ru>
To: Michael Welsh Duggan <mwd@md5i.com>,
Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Gary Oberbrunner <garyo@oberbrunner.com>, emacs-devel@gnu.org
Subject: Re: project.el: git submodules?
Date: Tue, 12 May 2020 23:53:19 +0300 [thread overview]
Message-ID: <95a8c285-125f-afda-b1bc-d1c0452e5c31@yandex.ru> (raw)
In-Reply-To: <87v9l0nar5.fsf@md5i.com>
On 12.05.2020 23:45, Michael Welsh Duggan wrote:
> Stefan Monnier<monnier@iro.umontreal.ca> writes:
>
>>> FWIW, the examples of git worktrees on my machine all include a ".git/"
>>> directory. It's just that some of its contents are symbolic links.
>> Hmm... are you sure these are Git worktrees?
>> Maybe they're "poor man's git-worktrees" created by the old
>> `git-new-workdir` hack which has been made obsolete by the "new" `git
>> worktree` feature.
> Pretty sure.
>
> /tmp/$ git --version
> /tmp$ mkdir git-test
> /tmp$ cd git-test
> /tmp/git-test$ mkdir repo
> /tmp/git-test$ cd repo
> /tmp/git-test/repo$ git init
> Initialized empty Git repository in/tmp/git-test/repo/.git/
> /tmp/git-test/repo$ echo "Test file" > repo
> /tmp/git-test/repo$ git add repo
> /tmp/git-test/repo$ git commit -m "Initial commit."
> [master (root-commit) 544fba2] Initial commit.
> 1 file changed, 1 insertion(+)
> create mode 100644 repo
> /tmp/git-test/repo$ git worktree add ../worktree
> Preparing worktree (new branch 'worktree')
> HEAD is now at 544fba2 Initial commit.
> /tmp/git-test/repo$ cd ../worktree/
> /tmp/git-test/worktree$ ls -la .git
> -rw-r--r-- 1 md5i md5i 51 May 12 16:42 .git
> /tmp/git-test/worktree$ cat .git
> gitdir:/tmp/git-test/repo/.git/worktrees/worktree
Perhaps you could suggest an additional test to determine whether a
directory is a submodule, then?
The contents of '.git' there are fairly similar:
gitdir: ../../.git/modules/site-lisp/company
I guess we could look inside and see whether '.git/modules/' is a
substring. Detecting a project over Tramp will become a little bit
slower as a result, though.
next prev parent reply other threads:[~2020-05-12 20:53 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 15:31 project.el: git submodules? Gary Oberbrunner
2020-05-12 15:53 ` Dmitry Gutov
2020-05-12 18:05 ` Michael Welsh Duggan
2020-05-12 18:27 ` Dmitry Gutov
2020-05-12 19:36 ` Stefan Monnier
2020-05-12 19:39 ` Dmitry Gutov
2020-05-12 20:45 ` Michael Welsh Duggan
2020-05-12 20:53 ` Dmitry Gutov [this message]
2020-05-12 21:04 ` Stefan Monnier
2020-05-12 21:06 ` Dmitry Gutov
2020-05-12 21:09 ` Stefan Monnier
2020-05-14 0:32 ` Dmitry Gutov
2020-05-14 2:55 ` Stefan Monnier
2020-05-14 15:04 ` Dmitry Gutov
2020-05-14 17:57 ` Stefan Monnier
2020-05-14 19:29 ` Dmitry Gutov
2020-05-14 20:01 ` Stefan Monnier
2020-05-14 20:13 ` Dmitry Gutov
2020-05-14 21:17 ` Dmitry Gutov
2020-05-14 21:38 ` Michael Welsh Duggan
2020-05-15 1:21 ` Dmitry Gutov
2020-05-15 5:11 ` Dmitry Gutov
2020-05-15 7:40 ` Kévin Le Gouguec
2020-05-15 19:17 ` Dmitry Gutov
2020-05-12 20:53 ` Michael Welsh Duggan
2020-05-12 20:51 ` Michael Welsh Duggan
2020-05-12 20:58 ` John Yates
2020-05-13 7:19 ` Andreas Schwab
2020-05-12 18:33 ` Gary Oberbrunner
2020-05-12 19:28 ` Dmitry Gutov
2020-05-12 19:34 ` Gary Oberbrunner
2020-05-12 19:41 ` Dmitry Gutov
2020-05-12 19:44 ` Doug Davis
2020-05-12 19:50 ` Gary Oberbrunner
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=95a8c285-125f-afda-b1bc-d1c0452e5c31@yandex.ru \
--to=dgutov@yandex.ru \
--cc=emacs-devel@gnu.org \
--cc=garyo@oberbrunner.com \
--cc=monnier@iro.umontreal.ca \
--cc=mwd@md5i.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.