git-p4: allow unshelving of branched files
authorSimon Williams <simon@no-dns-yet.org.uk>
Wed, 22 May 2019 06:21:20 +0000 (07:21 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 May 2019 17:54:42 +0000 (10:54 -0700)
commit0108f47eb30b9b473e044285b731e2fbca803170
treebfe757b758a8e2ebeccb4c7297024a2b951e1a8f
parentaeb582a98374c094361cba1bd756dc6307432c42
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>
git-p4.py
t/t9832-unshelve.sh