* [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
* Re: [PATCH] guilt: fix date parsing
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
0 siblings, 1 reply; 4+ messages in thread
From: Josef 'Jeff' Sipek @ 2013-05-22 3:39 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: git
I applied this one and the "guilt: skip empty line after..." patch.
Jeff.
On Tue, May 21, 2013 at 11:13:31PM -0400, Theodore Ts'o wrote:
> 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
>
--
The obvious mathematical breakthrough would be development of an easy way to
factor large prime numbers.
- Bill Gates, The Road Ahead, pg. 265
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] guilt: fix date parsing
2013-05-22 3:39 ` Josef 'Jeff' Sipek
@ 2013-05-22 12:10 ` Theodore Ts'o
2013-05-22 13:31 ` Josef 'Jeff' Sipek
0 siblings, 1 reply; 4+ messages in thread
From: Theodore Ts'o @ 2013-05-22 12:10 UTC (permalink / raw)
To: Josef 'Jeff' Sipek; +Cc: git
On Tue, May 21, 2013 at 11:39:21PM -0400, Josef 'Jeff' Sipek wrote:
> I applied this one and the "guilt: skip empty line after..." patch.
Thanks! BTW, it looks like you are not using "git am -s" to apply
these patches? The reason why I ask is that whatever you're using
isn't removing the [XXX] subject prefix (e.g., [PATCH] or [PATCH -v2]
which is useful for mailing lists, but less useful in the git commit
descriptions.
If you're using guilt, do you have some script that preformats a Unix
mbox into guilt-friendly files? If so, maybe it would be good to
modify it to strip out the [PATCH] annotations. If not, let me know,
since I've been thinking about writing a script to take a Unix mbox,
and bursts it into a separate patch-per-file with a series file
suitable for use by guilt, removing mail headers and doing other
appropriate pre-parsing --- basically, a "guilt am" which works much
like "git am". But if someone else has done this already, no point
duplicating effort. :-)
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] guilt: fix date parsing
2013-05-22 12:10 ` Theodore Ts'o
@ 2013-05-22 13:31 ` Josef 'Jeff' Sipek
0 siblings, 0 replies; 4+ messages in thread
From: Josef 'Jeff' Sipek @ 2013-05-22 13:31 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: git
On Wed, May 22, 2013 at 08:10:10AM -0400, Theodore Ts'o wrote:
> On Tue, May 21, 2013 at 11:39:21PM -0400, Josef 'Jeff' Sipek wrote:
> > I applied this one and the "guilt: skip empty line after..." patch.
>
> Thanks! BTW, it looks like you are not using "git am -s" to apply
> these patches? The reason why I ask is that whatever you're using
> isn't removing the [XXX] subject prefix (e.g., [PATCH] or [PATCH -v2]
> which is useful for mailing lists, but less useful in the git commit
> descriptions.
>
> If you're using guilt, do you have some script that preformats a Unix
> mbox into guilt-friendly files? If so, maybe it would be good to
> modify it to strip out the [PATCH] annotations. If not, let me know,
> since I've been thinking about writing a script to take a Unix mbox,
> and bursts it into a separate patch-per-file with a series file
> suitable for use by guilt, removing mail headers and doing other
> appropriate pre-parsing --- basically, a "guilt am" which works much
> like "git am". But if someone else has done this already, no point
> duplicating effort. :-)
You are correct. I just `guilt import -P blah /tmp/mdir/cur/X` and then
hand-edit the patch to remove headers. Last night I was thinking about
making a `guilt import-mbox` that'd import a mbox or maildir. I don't know
off the top of my head how much `git am` would help in this instance.
Feel free to make the import-mbox or whatever command :)
Jeff.
--
Only two things are infinite, the universe and human stupidity, and I'm not
sure about the former.
- Albert Einstein
^ permalink raw reply [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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.