* Shouldn't git-ls-files --others use $GIT_DIR?
@ 2006-11-19 13:37 Nikolai Weibull
2006-11-19 18:37 ` Petr Baudis
0 siblings, 1 reply; 3+ messages in thread
From: Nikolai Weibull @ 2006-11-19 13:37 UTC (permalink / raw)
To: git
If I do
GIT_DIR=$HOME/projects/<project>/.git git ls-files --others
from, e.g., $HOME, I get a list of all the files in $HOME and its
subdirectories that aren't in said git repository. Shouldn't --others
use $GIT_DIR, instead of ".", or am I missing something here?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Shouldn't git-ls-files --others use $GIT_DIR?
2006-11-19 13:37 Shouldn't git-ls-files --others use $GIT_DIR? Nikolai Weibull
@ 2006-11-19 18:37 ` Petr Baudis
2006-11-20 19:51 ` Nikolai Weibull
0 siblings, 1 reply; 3+ messages in thread
From: Petr Baudis @ 2006-11-19 18:37 UTC (permalink / raw)
To: Nikolai Weibull; +Cc: git
On Sun, Nov 19, 2006 at 02:37:42PM CET, Nikolai Weibull wrote:
> If I do
>
> GIT_DIR=$HOME/projects/<project>/.git git ls-files --others
>
> from, e.g., $HOME, I get a list of all the files in $HOME and its
> subdirectories that aren't in said git repository. Shouldn't --others
> use $GIT_DIR, instead of ".", or am I missing something here?
git-ls-files --others lists untracked files in the current directory by
comparing it to the index stored in $GIT_DIR/index and listing files
present in the current directory but not in the index.
GIT_DIR is a path to the Git repository the commands should work with,
but if they work on working tree, they look at the current directory for
it.
--
Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
The meaning of Stonehenge in Traflamadorian, when viewed from above, is:
"Replacement part being rushed with all possible speed."
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Shouldn't git-ls-files --others use $GIT_DIR?
2006-11-19 18:37 ` Petr Baudis
@ 2006-11-20 19:51 ` Nikolai Weibull
0 siblings, 0 replies; 3+ messages in thread
From: Nikolai Weibull @ 2006-11-20 19:51 UTC (permalink / raw)
To: Petr Baudis; +Cc: git
On 11/19/06, Petr Baudis <pasky@suse.cz> wrote:
> On Sun, Nov 19, 2006 at 02:37:42PM CET, Nikolai Weibull wrote:
> > If I do
> >
> > GIT_DIR=$HOME/projects/<project>/.git git ls-files --others
> >
> > from, e.g., $HOME, I get a list of all the files in $HOME and its
> > subdirectories that aren't in said git repository. Shouldn't --others
> > use $GIT_DIR, instead of ".", or am I missing something here?
>
> git-ls-files --others lists untracked files in the current directory by
> comparing it to the index stored in $GIT_DIR/index and listing files
> present in the current directory but not in the index.
Ah, of course; how silly of me. Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-20 19:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-19 13:37 Shouldn't git-ls-files --others use $GIT_DIR? Nikolai Weibull
2006-11-19 18:37 ` Petr Baudis
2006-11-20 19:51 ` Nikolai Weibull
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 NNTP newsgroup(s).