summaryrefslogtreecommitdiff
path: root/Porting/git-make-p4-refs
diff options
context:
space:
mode:
authorYuval Kogman <nothingmuch@woobling.org>2008-09-05 21:46:58 +0300
committerYuval Kogman <nothingmuch@woobling.org>2009-01-12 10:25:39 +0200
commit5abd40ff97b0c4b96d06f7b0cb42befe9e91665d (patch)
treec69195303cce953953691641ab065362092269a4 /Porting/git-make-p4-refs
parent8a646e0bef48e453eac933b9fdf6710ec6285257 (diff)
downloadperl-5abd40ff97b0c4b96d06f7b0cb42befe9e91665d.tar.gz
add git-make-p4-refs script to Porting
Diffstat (limited to 'Porting/git-make-p4-refs')
-rw-r--r--Porting/git-make-p4-refs13
1 files changed, 13 insertions, 0 deletions
diff --git a/Porting/git-make-p4-refs b/Porting/git-make-p4-refs
new file mode 100644
index 0000000000..931abe76c1
--- /dev/null
+++ b/Porting/git-make-p4-refs
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# this script creates a tag for every p4raw-id
+# the output can be appended to .git/packed-refs, but make sure to back up
+# first
+
+# then you can do:
+
+# git show perl@1234 where 1234 is a perforce change, and 'perl' is the p4
+# depot
+
+git log -z -F --grep='p4raw-id:' --pretty='format:%H %b' | \
+perl -0ne 'chomp; if ( @t = m{([a-f0-9]{40}).*?p4raw-id: //depot/(.*?\@\d+)}s ) { print "@t\n" }'