git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-p4 support for perforce renames.

From
CPChris Pettitt <cpettitt@gmail.com>
Date
Oct 16, 2007, 04:35 UTC
Message-ID
<1192509345-21340-1-git-send-email-cpettitt@gmail.com>

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>
 contrib/fast-import/git-p4 |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
-- 
1.5.3.4.206.g58ba4
Message 1 of 1 in “git-p4 support for perforce renames.”
  1. git-p4 support for perforce renames.Chris Pettitt, Oct 16, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.