summaryrefslogtreecommitdiffstats
path: root/subcmds/rebase.py
diff options
context:
space:
mode:
authorDavid James <davidjames@google.com>2013-10-11 17:03:19 -0700
committerDavid James <davidjames@google.com>2013-10-14 15:34:32 -0700
commit8d20116038ff78b22069dd4e993b5819775f03d1 (patch)
tree4c7ec381f2452d3ae4ed5332230a8d7a61e6ec2b /subcmds/rebase.py
parentb25ea555c39cd500740acb74fa9f1dab71588266 (diff)
downloadgit-repo-8d20116038ff78b22069dd4e993b5819775f03d1.tar.gz
repo: Support multiple branches for the same project.
It is often useful to be able to include the same project more than once, but with different branches and placed in different paths in the workspace. Add this feature. This CL adds the concept of an object directory. The object directory stores objects that can be shared amongst several working trees. For newly synced repositories, we set up the git repo now to share its objects with an object repo. Each worktree for a given repo shares objects, but has an independent set of references and branches. This ensures that repo only has to update the objects once; however the references for each worktree are updated separately. Storing the references separately is needed to ensure that commits to a branch on one worktree will not change the HEAD commits of the others. One nice side effect of sharing objects between different worktrees is that you can easily cherry-pick changes between the two worktrees without needing to fetch them. Bug: Issue 141 Change-Id: I5e2f4e1a7abb56f9d3f310fa6fd0c17019330ecd
Diffstat (limited to 'subcmds/rebase.py')
-rw-r--r--subcmds/rebase.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/subcmds/rebase.py b/subcmds/rebase.py
index b9a7774d..1bdc1f0b 100644
--- a/subcmds/rebase.py
+++ b/subcmds/rebase.py
@@ -62,6 +62,9 @@ branch but need to incorporate new upstream changes "underneath" them.
62 if opt.interactive and not one_project: 62 if opt.interactive and not one_project:
63 print('error: interactive rebase not supported with multiple projects', 63 print('error: interactive rebase not supported with multiple projects',
64 file=sys.stderr) 64 file=sys.stderr)
65 if len(args) == 1:
66 print('note: project %s is mapped to more than one path' % (args[0],),
67 file=sys.stderr)
65 return -1 68 return -1
66 69
67 for project in all_projects: 70 for project in all_projects: