git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Simulating an empty git repository without having said repository on disk
@ 2012-01-16 18:34 Richard Hartmann
  2012-01-16 20:41 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Hartmann @ 2012-01-16 18:34 UTC (permalink / raw)
  To: Git List

Hi all,

for vcsh[1], I need a rather hackish feature: List all files untracked
by vcsh. The plan to achieve this is:

Get lists of all files by all repos which' GIT_WORK_TREE is in one
directory ($HOME, by default), merge all lists into one and use that
as a .gitignore or exclude. Then run `git status` with $GIT_WORK_TREE
pointing to $HOME while using said ignore/exclude. That will give me a
list of all files & directories which are not tracked by any of the
git repos managed by vcsh.

I could create an empty git repo to run this operation in, but that
seems wasteful. Thus, I would prefer to run this command against a
non-existing, empty git repo. Problem is, I could not find a way to do
this.


I know the empty tree's SHA is hard-coded into git so I was hoping
there would be a way to trick git using this, but I couldn't find a
way.


Any and all help appreciated, even if it's just a "no, this is not possible"


Thanks,
Richard


[1] https://github.com/RichiH/vcsh

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

end of thread, other threads:[~2012-01-16 23:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-16 18:34 Simulating an empty git repository without having said repository on disk Richard Hartmann
2012-01-16 20:41 ` Jeff King
2012-01-16 23:09   ` Richard Hartmann

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).