summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-05-07 20:14:17 +0200
committerLibravatar Simon Hausmann <simon@lst.de>2007-05-07 20:14:17 +0200
commita844b7406f17ac6e069e617509a2997d7e128500 (patch)
treeba9c0c1649d624085b81244a6002b9dc857220d5 /contrib
parentCleanup, removed the old tagging code (diff)
downloadtgif-a844b7406f17ac6e069e617509a2997d7e128500.tar.xz
Document some implementation details, for the curious... :)
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fast-import/git-p4.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4.txt b/contrib/fast-import/git-p4.txt
index d36a1cf18c..ff0da9d0c8 100644
--- a/contrib/fast-import/git-p4.txt
+++ b/contrib/fast-import/git-p4.txt
@@ -121,3 +121,20 @@ Example
git-p4 rebase
+Implementation Details...
+=========================
+
+* Changesets from Perforce are imported using git fast-import.
+* The import does not require anything from the Perforce client view as it just uses
+ "p4 print //depot/path/file#revision" to get the actual file contents.
+* Every imported changeset has a special [git-p4...] line at the
+ end of the log message that gives information about the corresponding
+ Perforce change number and is also used by git-p4 itself to find out
+ where to continue importing when doing incremental imports.
+ Basically when syncing it extracts the perforce change number of the
+ latest commit in the "p4" branch and uses "p4 changes //depot/path/...@changenum,#head"
+ to find out which changes need to be imported.
+* git-p4 submit uses "git rev-list" to pick the commits between the "p4" branch
+ and the current branch.
+ The commits themselves are applied using git diff-tree ... | patch -p1
+