also sprach Johannes Schindelin <Johannes.Schindelin@xxxxxx> [2007.07.11.2326 +0200]: > Okay, after discussing this for a bit on IRC, here is what I would > do (I already said this on IRC, but the mailing list is really the > better medium for this): I agree. However, I find IRC to have its merits. For instance, all of our discussion yesterday would have taken days over the list, but on IRC I was able to interject when I did not understand something or you could stop me when I was going down a garden path. Of course, IRC isn't archived in the sense that lists are, which is why I make an effort to send updates to the list, such as I did to another thread yesterday: http://marc.info/?l=git&m=118418250002028&w=2 > I would actually rename .etc/ into gits/, because it is not > a directory containing settings, but a directory containing > repositories. Yes and no. I already use ~/.etc/ to store my settings and symlink into it, but I do like your idea too, actually. I have yet to go and try it, and I shall report back then. > Everytime I would work on, say, .vimrc, I would say > "--git-dir=$HOME/gits/vim.git", or maybe even make an alias in > $HOME/.gitconfig, which spares me that: I wish there were a way to determine which repository a file belongs to and then to automatically select the right repository. I guess one can script that by iterating all repos and using git-ls-files, possibly caching the result. Anyway, I tried your approach and failed: $ mkdir repo $ GIT_DIR=repo git init $ GIT_DIR=repo git config core.bare false $ echo 1 >a; GIT_DIR=repo git add a; GIT_DIR=repo git commit -m. fatal: add must be run in a work tree nothing to commit (use "git add file1 file2" to include for commit) I am probably doing something wrong, but what? > Come to think of it, this is maybe what I would have done, but it appears > to me that this is the _ideal_ use case for worktree: Yes, it does. I am downloading the source now and intend to work with the HEAD (is that the right term for what I used to call trunk when I was doing SVN?) from now on (instead of the Debian package). > - you have to say > > $ git --work-tree=$HOME --bare init > > which is a bit counterintuitive. After all, it is _not_ a bare > repository. The whole purpose of worktree, as far as I understand, is > to have a _detached_ repository, which would otherwise be called bare. I said GIT_DIR=repo git --work-tree `pwd` init and that seems to do everything it should, it sets core.worktree to . and core.bare to false. > Those are serious bugs. Matthias, any idea how to fix them? That would be splendid. I am operating off HEAD now, so feel free to prod me for any testing. -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck spamtraps: madduck.bogus@xxxxxxxxxxx "a scientist once wrote that all truth passes through three stages: first it is ridiculed, then violently opposed and eventually, accepted as self-evident." -- schopenhauer
Attachment:
signature.asc
Description: Digital signature (GPG/PGP)