git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] guilt: fix date parsing
@ 2013-05-22  3:13 Theodore Ts'o
  2013-05-22  3:39 ` Josef 'Jeff' Sipek
  0 siblings, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2013-05-22  3:13 UTC (permalink / raw)
  To: jeffpc; +Cc: git, Theodore Ts'o

If the date field has a space in it, such as:

   Date: Tue, 14 May 2013 18:37:15 +0200

previously guilt would go belly up:

   + export GIT_AUTHOR_DATE=Tue, 14 May 2013 18:37:15 +0200
   /usr/local/bin/guilt: 571: export: 14: bad variable name

Fix this.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
---
 guilt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/guilt b/guilt
index 9953bdf..6e8d542 100755
--- a/guilt
+++ b/guilt
@@ -568,7 +568,7 @@ commit()
 				author_date_str=`sed -n -e '/^Date:/ { s/^Date: //; p; q; }; /^(diff |---$|--- )/ q' "$p"`
 			fi
 			if [ ! -z "$author_date_str" ]; then
-				export GIT_AUTHOR_DATE=`echo $author_date_str`
+				export GIT_AUTHOR_DATE="$author_date_str"
 			fi
 		fi
 
-- 
1.7.12.rc0.22.gcdd159b

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-05-22 13:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-22  3:13 [PATCH] guilt: fix date parsing Theodore Ts'o
2013-05-22  3:39 ` Josef 'Jeff' Sipek
2013-05-22 12:10   ` Theodore Ts'o
2013-05-22 13:31     ` Josef 'Jeff' Sipek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).