Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > On Mon, 16 Jul 2007, Matthias Lederhofer wrote: > > > Johannes Schindelin <Johannes.Schindelin@xxxxxx> wrote: > > Use > > > > $ git --work-tree "$HOME" --git-dir . init > > > > instead. > > Why _should_ that be necessary at all? I _already_ told git that the > working tree is somewhere else. It makes _no sense at all_ to treat the > cwd as anything else than the GIT_DIR, when --work-tree but no --git-dir > were specified. > > > IMHO the --bare flag did not make much sense before the introduction > > of GIT_WORK_TREE and doesn't after, at least not with the meaning it > > has: why should 'git --bare' mean to use the repository from cwd? > > To the contrary, it makes tons of sense. If you want to initialise a bare > repository, what _more_ natural way than to say "git init --bare"? And > what _more_ natural place to pick for GIT_DIR than the cwd, when you did > not specify --git-dir? Ah, for git init it makes sense to have the --bare flag and also to use the cwd as GIT_DIR when GIT_WORK_TREE is specified. > > > [descriptions of bugs, that have been largely ignored] The last paragraphs were for the second and fourth one (git status/add from outside the working tree): it should be possible to fix this but it might be a bit complicated. And if it is done for a few commands probably all commands should support this. For the third one (git picks up another git repository even if it is inside a 'detached working tree') I have no idea how to fix this. The working tree cannot be recognized in any way. Maybe you can/should use a symlink to the real repository named .git in this case? But this only works as long as you checkout only one repository in the directory. > > Up to now you are supposed to be in the working tree all the time when > > using it. Therefore I'd call these feature requests rather than bugs :) > > Feature requests? WTF? What reason is there for the _requirement_ to > specify a working tree, when git does not make use of it? Hmm? Sorry, I don't understand what you mean yet. Where does git require you to specify a working tree? - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html