Menu

#5 Use --separate-git-dir= when cloning slaves

open
nobody
None
5
2012-01-28
2012-01-28
Jehan Bing
No

It would be nice if gitslave could use --separate-git-dir= when cloning a slave to put the slave's .git folder in the superproject's .git, similar to what git submodule does in recent versions of git.

This would make commands like "tree" or a recursive grep simpler to use (less stuff to exclude).

Discussion

  • Baka Project

    Baka Project - 2012-01-28

    An interesting idea. We will take it under consideration for the next time we are bored.

    You can of course use `gits grep` or --exclude to help avoid the problem, but of course that is a limited solution, or try to bribe us, or submit patches.

     
  • Jehan Bing

    Jehan Bing - 2012-01-30

    A variation of your comment "protection of the slave git repositories from errant rm -rf due to git clean or gits release." in the BugsTodo file is that if the slaves' .git directories are in the master's, a slave won't need to be re-cloned when switching between a branch that doesn't use it and the one that does.

     
  • Baka Project

    Baka Project - 2012-01-30

    I had that thought as well. However, given the more…dynamic…expected development pattern of subprojects with gitslave, we would probably want to save the non-tracked files as well as the git repo. I suppose we could do an automatic `git stash save --all "gitslave"` to stuff those away (at the possible massive cost of repository inflation), but I was thinking of actually rotating the entire redundant subproject to appear under .git/slaves (or where-ever).

     

Log in to post a comment.