diff options
author | Luke Diamand <luke@diamand.org> | 2018-10-15 14:14:08 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-10-16 07:28:49 +0300 |
commit | 89143ac28a61578487af7324c653a9efa5e40034 (patch) | |
tree | 149cba5b6bfcef8adef542d19814ca433b069b3a /Documentation/git-p4.txt | |
parent | 088131273b7e781174eb1cffb7d4e0eb51066cba (diff) |
git-p4: fully support unshelving changelists
The previous git-p4 unshelve support would check for changes
in Perforce to the files being unshelved since the original
shelve, and would complain if any were found.
This was to ensure that the user wouldn't end up with both the
shelved change delta, and some deltas from other changes in their
git commit.
e.g. given fileA:
the
quick
brown
fox
change1: s/the/The/ <- p4 shelve this change
change2: s/fox/Fox/ <- p4 submit this change
git p4 unshelve 1 <- FAIL
This change teaches the P4Unshelve class to always create a parent
commit which matches the P4 tree (for the files being unshelved) at
the point prior to the P4 shelve being created (which is reported
in the p4 description for a shelved changelist).
That then means git-p4 can always create a git commit matching the
P4 shelve that was originally created, without any extra deltas.
The user might still need to use the --origin option though - there
is no way for git-p4 to work out the versions of all of the other
*unchanged* files in the shelve, since this information is not recorded
by Perforce.
Additionally this fixes handling of shelved 'move' operations.
Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-p4.txt')
-rw-r--r-- | Documentation/git-p4.txt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Documentation/git-p4.txt b/Documentation/git-p4.txt index 6c0017e36e..f0a0280954 100644 --- a/Documentation/git-p4.txt +++ b/Documentation/git-p4.txt @@ -177,8 +177,8 @@ Unshelving will take a shelved P4 changelist, and produce the equivalent git com in the branch refs/remotes/p4-unshelved/<changelist>. The git commit is created relative to the current origin revision (HEAD by default). -If the shelved changelist's parent revisions differ, git-p4 will refuse to unshelve; -you need to be unshelving onto an equivalent tree. +A parent commit is created based on the origin, and then the unshelve commit is +created based on that. The origin revision can be changed with the "--origin" option. |