Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
git-p4: fix keyword-expansion regex
author
Pete Wyckoff
<pw@padd.com>
Wed, 26 Nov 2008 18:52:15 +0000
(13:52 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 27 Nov 2008 21:17:58 +0000
(13:17 -0800)
This text:
my $dir = $File::Find::dir;
return if ($dir !~ m,$options->{dirpat}$,);
was improperly converted to:
my $dir = $File$dir !~ m,$options->{dirpat}$,);
by the keyword identifier expansion code. Add a \n
to make sure the regex doesn't go across end-of-line
boundaries.
Signed-off-by: Pete Wyckoff <pw@padd.com>
Acked-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
5aa3bdd
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 46136d49bf99f61a5c85a548bec055742ed140f8..2b122d3f5159d9a8206e16be9db7aca7dfe89bb6 100755
(executable)
--- a/
contrib/fast-import/git-p4
+++ b/
contrib/fast-import/git-p4
@@
-963,7
+963,7
@@
class P4Sync(Command):
if stat['type'] in ('text+ko', 'unicode+ko', 'binary+ko'):
text = re.sub(r'(?i)\$(Id|Header):[^$]*\$',r'$\1$', text)
elif stat['type'] in ('text+k', 'ktext', 'kxtext', 'unicode+k', 'binary+k'):
- text = re.sub(r'\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$]*\$',r'$\1$', text)
+ text = re.sub(r'\$(Id|Header|Author|Date|DateTime|Change|File|Revision):[^$
\n
]*\$',r'$\1$', text)
contents[stat['depotFile']] = text