Is there an easy way to grab files or directory listings from a remote bare git repository (preferably over SSH or git:// protocols)?
Background
I am trying to migrate from SVN to Git and we have some processes that download files directly from the Subversion repository over DAV deep within the tree (wget http://server/svn/branches/production/dir1/file). I need to replicate this behavior in git, but I don't think it's possible without checking out (& keeping updated) a remote working directory with apache pointing at it.
I see a git ls-remote git@server:repo.git
but I don't think you can go deeper into actual files.
I realize that doing this isn't the best way and I am also open to other ideas about how to handle processes needing specific files out of the tree.
I think the only way to do what you want is to maintain an updated git tree locally (though I could be wrong, and someone will correct me if I am).
What you're doing with SVN is really a hack -- If you were using svnserve instead of SVN-over-HTTP/DAV I don't believe you'd be able to do what you're doing. It just happens that the confluence of software you're using for SVN makes this possible.
The closest analog I can come up with would be an automatically-updating git repository in a directory accessible over HTTP, and that's a pretty hideous solution.
Have you tried
git show
(git show hash:filename
)? That definitely works for a local repo and may work remotely.