summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorTao Klerks <tao@klerks.biz>2022-04-04 05:10:54 +0000
committerJunio C Hamano <gitster@pobox.com>2022-04-06 12:59:40 -0700
commit17f273ffbad8724278e0fa4da592a7ec7c6abc83 (patch)
treeb39f9ab97061355d831922507c2001ccb1342c97 /builtin/commit.c
parentfaa21c10d44184f616d391c158dcbb13b9c72ef3 (diff)
git-p4: support explicit sync of arbitrary existing git-p4 refs
With the --branch argument of the "sync" subcommand, git-p4 enables you to import a perforce branch/path to an arbitrary git ref, using a full ref path, or to refs/remotes/p4/* or refs/heads/p4/*, depending on --import-local, using a short ref name. However, when you later want to explicitly sync such a given ref to pick up subsequent p4 changes, it only works if the ref was placed in the p4 path *and* has only one path component (no "/"). This limitation results from a bad assumption in the existing-branch sync logic, and also means you cannot individually sync branches detected by --detect-branches, as these also get a "/" in their names. Fix "git p4 sync --branch", when called with an existing ref, so that it works correctly regardless of whether the ref is in the p4 path or not, and (in the case of refs in the p4 path) regardless of whether it has a "/" in its short name or not. Also add tests to validate that these branch-specific syncs work as expected. Signed-off-by: Tao Klerks <tao@klerks.biz> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions