Skip to content

Commit

Permalink
[PATCH] guilt: fix date parsing
Browse files Browse the repository at this point in the history
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" <[email protected]>
Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
  • Loading branch information
tytso authored and jeffpc committed May 22, 2013
1 parent 45636dc commit c2a5bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guilt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit c2a5bae

Please sign in to comment.