From 774368249653cf97079abda92c5240beedf8f22c Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Sat, 8 Aug 2009 19:29:32 -0400 Subject: [PATCH] Import of a version of this file from an old emacs backup I had. --- get-emacs-backup-files-into-git.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/get-emacs-backup-files-into-git.sh b/get-emacs-backup-files-into-git.sh index 5a897b9..e7354d0 100755 --- a/get-emacs-backup-files-into-git.sh +++ b/get-emacs-backup-files-into-git.sh @@ -1,8 +1,10 @@ #!/bin/sh -for i in `ls -r1t $1.~*~ $1`; do - date=`stat -c '%y' $i|perl -pe 's/^(\S+)\s+.*$/$1/;'` +for i in `ls -r1t $1.~*~`; do + date=`stat -c '%y' $i` + logdate=`stat -c '%y' $i|perl -pe 's/^(\S+)\s+.*$/$1/;'` echo $date $i cp -pa $i $2 - svn commit -m " * file as it stood on $date" $2 + export GIT_AUTHOR_DATE="$date" + git commit -m "Brought in file from ~ backup files, as it was on $logdate" $2 done