You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Shuai Lin (JIRA)" <ji...@apache.org> on 2015/12/21 15:38:46 UTC

[jira] [Created] (MESOS-4216) post-reviews.py should support multiple git worktrees

Shuai Lin created MESOS-4216:
--------------------------------

             Summary: post-reviews.py should support multiple git worktrees
                 Key: MESOS-4216
                 URL: https://issues.apache.org/jira/browse/MESOS-4216
             Project: Mesos
          Issue Type: Improvement
          Components: build
            Reporter: Shuai Lin
            Priority: Trivial


Git 2.5 add a new feature "multiple worktrees", e.g. one can checkout multiple worktrees of the same local git repo, which share the same .git directory.

For example, the following command:

{code} 
git worktree add -b new-branch ../mesos-new-branch master 
{code}

would create a new folder {{mesos-new-branch}} in the parent folder of mesos source tree.

See [this github blog|https://github.com/blog/2042-git-2-5-including-multiple-worktrees-and-triangular-workflows] for details.

This feature is quite handy when developing mesos: you can avoid re-compiling mesos (really costs a lot of time) when you need to temporary switch to another branch and switch back soon after: you just create a worktree, and do stuff there.

Currently the {{post-reviews.py}} script doesn't work well if not running in the default worktree, becase it would look for the {{.git}} folder. In non-default worktree, `.git` is a file whose content points to the real `.git` dir.

{code} 
$ cd ~/dev/mesos-new-branch 
$ cat .git 
gitdir: ~/dev/mesos/.git/worktrees/mesos-new-branch 
{code}




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)