diff options
author | Yuval Kogman <nothingmuch@woobling.org> | 2008-09-05 21:46:58 +0300 |
---|---|---|
committer | Yuval Kogman <nothingmuch@woobling.org> | 2009-01-12 10:25:39 +0200 |
commit | 5abd40ff97b0c4b96d06f7b0cb42befe9e91665d (patch) | |
tree | c69195303cce953953691641ab065362092269a4 /Porting/git-make-p4-refs | |
parent | 8a646e0bef48e453eac933b9fdf6710ec6285257 (diff) | |
download | perl-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-refs | 13 |
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" }' |