All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug] Custom git-dir directory shouldn't be listed as “untracked”
@ 2016-09-19 14:26 Nicolas Cuillery
  2016-09-19 17:45 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Nicolas Cuillery @ 2016-09-19 14:26 UTC (permalink / raw)
  To: git

Hi, I want to create a local repository with a custom dir name instead
of ".git", I used the env vars GIT_DIR and WORK_TREE:
>export GIT_DIR=".customgitdir"
>export GIT_WORK_TREE="."

Then I created a repo in an empty directory:
>$ git init
>Initialized empty Git repository in XXXXXXXXX/.customgitdir/

Then I ran git status:
>$ git status
>On branch master
>
>Initial commit
>
>Untracked files:
>  (use "git add <file>..." to include in what will be committed)
>
>    .customgitdir/
>
>nothing added to commit but untracked files present (use "git add" to track)

The local repo directory listed as "untracked files" which is a
problem when using "git add ." afterwards.

When using the default directory ".git", it logically doesn't appear
in the "git status" command's output. Don't you think it should be the
same when using a custom dir name ?

Git version 2.6.4 on MacOSX 10.11

Regards,
Nicolas

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bug] Custom git-dir directory shouldn't be listed as “untracked”
  2016-09-19 14:26 [Bug] Custom git-dir directory shouldn't be listed as “untracked” Nicolas Cuillery
@ 2016-09-19 17:45 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2016-09-19 17:45 UTC (permalink / raw)
  To: Nicolas Cuillery; +Cc: git

Nicolas Cuillery <nicolas.cuillery@gmail.com> writes:

> When using the default directory ".git", it logically doesn't appear
> in the "git status" command's output. Don't you think it should be the
> same when using a custom dir name ?

Not really.

GIT_DIR=<there> mechanism was never meant to be used to name a
directory that sitsinside your working tree (an exception is if it
is actually ".git" at the top).

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-19 17:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-19 14:26 [Bug] Custom git-dir directory shouldn't be listed as “untracked” Nicolas Cuillery
2016-09-19 17:45 ` Junio C Hamano

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.