git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] filter-branch: do not forget the '@' prefix to force git-timestamp

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2012, 23:56 UTC
Message-ID
<7vobnoij4u.fsf@alter.siamese.dyndns.org>

For some reason, this script reinvents, instead of refactoring the existing one in git-sh-setup, in the ident logic, and it was missed when 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-filter-branch.sh b/git-filter-branch.sh
index 804a7f4..b9cded5 100755
--- a/git-filter-branch.sh
+++ b/git-filter-branch.sh
@@ -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
 
-- 
1.7.11.1.294.gf7b86df
Message 1 of 1 in “filter-branch: do not forget the '@' prefix to force git-timestamp”
  1. filter-branch: do not forget the '@' prefix to force git-timestampJunio C Hamano, Jul 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.