summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Norris <briannorris@google.com>2024-09-17 15:53:37 -0700
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-09-19 00:11:52 +0000
commitb577444a90e29558ff4222c2ed9e43aeaf3d2c44 (patch)
tree912b77c53a6c5f5f2128783965ce6fd2ed954881
parent1e19f7dd61923b8835d9c6e1a7e560575dafaf1e (diff)
downloadgit-repo-b577444a90e29558ff4222c2ed9e43aeaf3d2c44.tar.gz
project: Copy and link files even with local branches
In the winding maze that constitutes Sync_LocalHalf(), there are paths in which we don't copy-and-link files. Examples include something like: cd some/project/ repo start head . # do some work, make some commit, upload that commit to Gerrit [[ ... in the meantime, someone addes a <linkfile ...> for some/project/ in the manifest ... ]] cd some/project/ git pull --rebase repo sync In this case, we never hit a `repo rebase` case, which might have saved us. Instead, the developer is left confused why some/project/ never had its <linkfile>s created. Notably, this opens up one more corner case in which <linkfile ... /> or <copyfile ... /> could potentially clobber existing work in the destination directory, but there are existing cases where that's true, and frankly, those seem like bigger holes than this new one. Change-Id: I394b0e4529023a8ee319dc25d03d513a19251a4a Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/437421 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Brian Norris <briannorris@google.com> Commit-Queue: Brian Norris <briannorris@google.com>
-rw-r--r--project.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/project.py b/project.py
index 27ea748f..dda01331 100644
--- a/project.py
+++ b/project.py
@@ -1694,6 +1694,8 @@ class Project:
1694 project=self.name, 1694 project=self.name,
1695 ) 1695 )
1696 ) 1696 )
1697 return
1698 syncbuf.later1(self, _doff, not verbose)
1697 return 1699 return
1698 elif pub == head: 1700 elif pub == head:
1699 # All published commits are merged, and thus we are a 1701 # All published commits are merged, and thus we are a