Thread (4 messages) flat view 4 messages, 4 authors, 2016-06-15

Re: What's the ".git/gitdir" file?

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:07:05

Possibly related (same subject, not in this thread)

Mike Rappazzo [off-list ref] writes:
On Tue, Oct 27, 2015 at 6:54 PM, Junio C Hamano [off-list ref] wrote:
quoted
Kyle Meyer [off-list ref] writes:
quoted
When a ".git" file points to another repo, a ".git/gitdir" file is
created in that repo.

For example, running

    $ mkdir repo-a repo-b
    $ cd repo-a
    $ git init
    $ cd ../repo-b
    $ echo "gitdir: ../repo-a/.git" > .git
    $ git status

results in a file "repo-a/.git/gitdir" that contains

    $ cat repo-a/.git/gitdir
    .git
Sounds like a bug in the recently added "worktree" stuff.  Perhaps
update_linked_gitdir() tweaked by 82fde87f (setup: update the right
file in multiple checkouts, 2015-08-25) is misbehaving?
I noticed that as I was working on the worktree list command that my
linked worktree gitdir files were being clobbered to '.git'.  I
attributed it to my work, but now that you mention it, I think it has
happened with the 2.6.1 release as well.
Thanks; I trust those who worked on the worktree feature in 2.6
timeframe would first take a look, OK?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help