]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/fast-import/git-p4
git-p4 support for perforce renames.
authorChris Pettitt <cpettitt@gmail.com>
Tue, 16 Oct 2007 05:15:06 +0000 (22:15 -0700)
committerSimon Hausmann <simon@lst.de>
Sat, 20 Oct 2007 15:12:16 +0000 (17:12 +0200)
commitd9a5f25b67951eb68e80d872611542b58ce5aa33
treebf36e5e1945b507d0ebeb1f6fb92aeaff3c377d8
parent209471493afbf30d5c1fc80feadfc4836b86dc42
git-p4 support for perforce renames.

The current git-p4 implementation does support file renames. However, because
it does not use the "p4 integrate" command, the history for the renamed file is
not linked to the new file.

This changeset adds support for perforce renames with the integrate command.
Currently this feature is only enabled when calling git-p4 submit with the -M
option. This is intended to look and behave similar to the "detect renames"
feature of other git commands.

The following sequence is used for renamed files:

    p4 integrate -Dt x x'
    p4 edit x'
    rm x'
    git apply
    p4 delete x

By default, perforce will not allow an integration with a target file that has
been deleted. That is, if x' in the example above is the name of a previously
deleted file then perforce will fail the integrate. The -Dt option tells
perforce to allow the target of integrate to be a previously deleted file.

Signed-off-by: Chris Pettitt <cpettitt@gmail.com>
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4