filter-branch: do not forget the '@' prefix to force git-timestamp
authorJunio C Hamano <gitster@pobox.com>
Mon, 9 Jul 2012 23:53:34 +0000 (16:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Jul 2012 03:42:54 +0000 (20:42 -0700)
For some reason, this script reinvents, instead of refactoring the
existing one in git-sh-setup, the logic to grab ident information
from an existing commit; it was missed when the corresponding logic
in git-sh-setup was updated with 2c733fb (parse_date(): '@' prefix
forces git-timestamp, 2012-02-02).

Teach the script that it is OK to have a way ancient timestamp in
the commits that are being filtered.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-filter-branch.sh
index 804a7f4bc912ab0c9c51038456d9abe4216947a5..b9cded5a28e6f7329e9fed23300449b371c00952 100755 (executable)
@@ -84,7 +84,7 @@ set_ident () {
                        s/.*/GIT_'$uid'_EMAIL='\''&'\''; export GIT_'$uid'_EMAIL/p
 
                        g
-                       s/^'$lid' [^<]* <[^>]*> \(.*\)$/\1/
+                       s/^'$lid' [^<]* <[^>]*> \(.*\)$/@\1/
                        s/'\''/'\''\'\'\''/g
                        s/.*/GIT_'$uid'_DATE='\''&'\''; export GIT_'$uid'_DATE/p