threads / patch / 3007

patch.gitignore git-describe

Subject: [PATCH] .gitignore git-describe

## tl;dr

8 messages between Jan 8, 2006 and Jan 9, 2006. Diffs are folded; open one to read it.

replies: 7people: 4as markdown or json

Andreas Ericsson· Jan 8, 2006, 14:15 UTC · lore
Signed-off-by: Andreas Ericsson <ae@op5.se>
---
 .gitignore |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
265df952d4c61f60eae42261aeea90e9b6d8e414
Show changes to .gitignore +1 −0
diff --git a/.gitignore b/.gitignore
index 1a9090b..4335061 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,6 +23,7 @@ git-count-objects
 git-cvsexportcommit
 git-cvsimport
 git-daemon
+git-describe
 git-diff
 git-diff-files
 git-diff-index
-- 
1.0.7-gb38d1
Timo Hirvonen· Jan 8, 2006, 14:40 UTC · re: Andreas Ericsson · lore

git-format-patch Date header

git-format-patch uses "date '+%s %z'" format for the Date header. Sylpheed does not understand this format. How common this convention is? Should we change git-format-patch to use more standard date format?

OTOH, I like the %s format because it is so simple and easy to parse :)
-- 
http://onion.dynserv.net/~timo/
Andreas Ericsson· Jan 8, 2006, 15:21 UTC · re: Timo Hirvonen · lore

Re: git-format-patch Date header

Timo Hirvonen wrote:
Show 6 quoted lines
> git-format-patch uses "date '+%s %z'" format for the Date header.
> Sylpheed does not understand this format.  How common this convention
> is?  Should we change git-format-patch to use more standard date format?
> 
> OTOH, I like the %s format because it is so simple and easy to parse :)
> 

Actually, that's what's printed in the commit message, so any change would have to be put there and that would break backwards compatibility for new tools that might want to use it.

On an unrelated note, please don't start a new thread by replying to an old message. It's very confusing to follow and people may not see your message. This time it was doubly so because the next mail in my inbox is a patch for git-format-patch, to which I thought you replied.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Timo Hirvonen· Jan 8, 2006, 15:37 UTC · re: Andreas Ericsson · lore

Re: git-format-patch Date header

On Sun, 08 Jan 2006 16:21:13 +0100 Andreas Ericsson <ae@op5.se> wrote:

Show 11 quoted lines
> Timo Hirvonen wrote:
> > git-format-patch uses "date '+%s %z'" format for the Date header.
> > Sylpheed does not understand this format.  How common this convention
> > is?  Should we change git-format-patch to use more standard date format?
> > 
> > OTOH, I like the %s format because it is so simple and easy to parse :)
> > 
> 
> Actually, that's what's printed in the commit message, so any change 
> would have to be put there and that would break backwards compatibility 
> for new tools that might want to use it.

So fixing Sylpheed (and maybe other email clients too) is the right solution...

> On an unrelated note, please don't start a new thread by replying to an 
> old message. It's very confusing to follow and people may not see your 
> message. This time it was doubly so because the next mail in my inbox is 
> a patch for git-format-patch, to which I thought you replied.

Sorry. I replied to your message because it was the message having Date header in the "%s %z" format.

-- 
http://onion.dynserv.net/~timo/
Andreas Ericsson· Jan 8, 2006, 15:44 UTC · re: Timo Hirvonen · lore

Re: git-format-patch Date header

Timo Hirvonen wrote:
Show 21 quoted lines
> On Sun, 08 Jan 2006 16:21:13 +0100
> Andreas Ericsson <ae@op5.se> wrote:
> 
> 
>>Timo Hirvonen wrote:
>>
>>>git-format-patch uses "date '+%s %z'" format for the Date header.
>>>Sylpheed does not understand this format.  How common this convention
>>>is?  Should we change git-format-patch to use more standard date format?
>>>
>>>OTOH, I like the %s format because it is so simple and easy to parse :)
>>>
>>
>>Actually, that's what's printed in the commit message, so any change 
>>would have to be put there and that would break backwards compatibility 
>>for new tools that might want to use it.
> 
> 
> So fixing Sylpheed (and maybe other email clients too) is the right
> solution...
> 

Nopes. In this case fixing my home-hacked git-send-patch script is the right thing to do. git-format-patch has always printed that format, though, so the error lies with me and the patch I sent. I shall have to re-visit it after reading rfc 822 a bit more closely.

Show 10 quoted lines
> 
>>On an unrelated note, please don't start a new thread by replying to an 
>>old message. It's very confusing to follow and people may not see your 
>>message. This time it was doubly so because the next mail in my inbox is 
>>a patch for git-format-patch, to which I thought you replied.
> 
> 
> Sorry.  I replied to your message because it was the message having Date
> header in the "%s %z" format.
> 
I just noticed. Thanks, and sorry.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
H. Peter Anvin· Jan 8, 2006, 22:05 UTC · re: Andreas Ericsson · lore

Re: git-format-patch Date header

Andreas Ericsson wrote:
Show 6 quoted lines
> 
> Nopes. In this case fixing my home-hacked git-send-patch script is the 
> right thing to do. git-format-patch has always printed that format, 
> though, so the error lies with me and the patch I sent. I shall have to 
> re-visit it after reading rfc 822 a bit more closely.
> 
RFC 2822, please.
	-hpa
Andreas Ericsson· Jan 8, 2006, 23:30 UTC · re: H. Peter Anvin · lore

Re: git-format-patch Date header

H. Peter Anvin wrote:
Show 11 quoted lines
> Andreas Ericsson wrote:
> 
>>
>> Nopes. In this case fixing my home-hacked git-send-patch script is the 
>> right thing to do. git-format-patch has always printed that format, 
>> though, so the error lies with me and the patch I sent. I shall have 
>> to re-visit it after reading rfc 822 a bit more closely.
>>
> 
> RFC 2822, please.
> 
Right you are.
-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
Linus Torvalds· Jan 9, 2006, 06:11 UTC · re: Andreas Ericsson · lore

Re: git-format-patch Date header

On Sun, 8 Jan 2006, Andreas Ericsson wrote:
> 
> Actually, that's what's printed in the commit message, so any change 
> would have to be put there and that would break backwards compatibility 
> for new tools that might want to use it.

No, git should always take the date in any of a million different formats, and always turn it into "seconds + timezone" internally.

The fact that git-format-patch also prints it out in the internal format is unambiguous (nice) but human-unreadable (bad).

There are other unambiguous formats it could use, notably standard rfc2822 format ("date -R").

The git "show_date()" function hopefully does exactly that rfc2822 format, but you'd have to make a helper program to do the conversion in git-format-patch.sh.

		Linus

← back to recent threads