git-p4: allow unshelving of branched files

When unshelving a changelist, git-p4 tries to work out the appropriate
parent commit in a given branch (default: HEAD).  To do this, it looks
at the state of any pre-existing files in the target Perforce branch,
omitting files added in the shelved changelist.  Currently, only files
added (or move targets) are classed as new.  However, files integrated
from other branches (i.e. a 'branch' action) also need to be considered
as added, for this purpose.

Signed-off-by: Simon Williams <simon@no-dns-yet.org.uk>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Simon Williams
2019-05-22 07:21:20 +01:00
committed by Junio C Hamano
parent aeb582a983
commit 0108f47eb3
2 changed files with 8 additions and 2 deletions

View File

@ -1309,7 +1309,7 @@ class GitLFS(LargeFileSystem):
class Command:
delete_actions = ( "delete", "move/delete", "purge" )
add_actions = ( "add", "move/add" )
add_actions = ( "add", "branch", "move/add" )
def __init__(self):
self.usage = "usage: %prog [options]"