* git format-patch from date never set
@ 2009-07-25 21:39 Dan Savilonis
2009-07-25 22:31 ` Alex Riesen
0 siblings, 1 reply; 5+ messages in thread
From: Dan Savilonis @ 2009-07-25 21:39 UTC (permalink / raw)
To: git
git format-patch always sets the date in the From: line to the git
default date, e.g.
From b9ff0ba6f3e228e1a8b67a25bc7be6b1da5ed1f3 Mon Sep 17 00:00:00 2001
The command uses GIT_COMMITTER_DATE as the date, but this env variable
is never set in cmd_format_patch(). Is this a bug or 'feature'?
--
Dan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git format-patch from date never set
2009-07-25 21:39 git format-patch from date never set Dan Savilonis
@ 2009-07-25 22:31 ` Alex Riesen
2009-07-25 22:49 ` Dan Savilonis
0 siblings, 1 reply; 5+ messages in thread
From: Alex Riesen @ 2009-07-25 22:31 UTC (permalink / raw)
To: Dan Savilonis; +Cc: git
On Sat, Jul 25, 2009 at 23:39, Dan Savilonis<djs@n-cube.org> wrote:
> git format-patch always sets the date in the From: line to the git
> default date, e.g.
>
> From b9ff0ba6f3e228e1a8b67a25bc7be6b1da5ed1f3 Mon Sep 17 00:00:00 2001
>
> The command uses GIT_COMMITTER_DATE as the date, but this env variable
> is never set in cmd_format_patch(). Is this a bug or 'feature'?
Neither. This is not a date, but a part of "loosely defined" mbox format.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git format-patch from date never set
2009-07-25 22:31 ` Alex Riesen
@ 2009-07-25 22:49 ` Dan Savilonis
2009-07-25 23:03 ` Junio C Hamano
0 siblings, 1 reply; 5+ messages in thread
From: Dan Savilonis @ 2009-07-25 22:49 UTC (permalink / raw)
To: Alex Riesen; +Cc: git
On Sat, Jul 25, 2009 at 6:31 PM, Alex Riesen<raa.lkml@gmail.com> wrote:
> Neither. This is not a date, but a part of "loosely defined" mbox format.
>
In the examples of mbox format I have found, the date in the From:
line is generally the same as in the Date: line, albeit in a more
ambiguous format. Further, the the git code treats it as a date and
attempts to set it. It remains at the default date only because
git_committer_info() is called without GIT_COMMITTER_DATE set.
So is the code misleading? Was it designed to just meet the minimal
requirement of having a date-like string to comform to the mbox
format? What's the disadvantage to using the real commit date?
--
Dan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git format-patch from date never set
2009-07-25 22:49 ` Dan Savilonis
@ 2009-07-25 23:03 ` Junio C Hamano
2009-07-26 0:06 ` Dan Savilonis
0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2009-07-25 23:03 UTC (permalink / raw)
To: Dan Savilonis; +Cc: Alex Riesen, git
Dan Savilonis <djs@n-cube.org> writes:
> On Sat, Jul 25, 2009 at 6:31 PM, Alex Riesen<raa.lkml@gmail.com> wrote:
>> Neither. This is not a date, but a part of "loosely defined" mbox format.
>>
>
> In the examples of mbox format I have found, the date in the From:
> line is generally the same as in the Date: line, albeit in a more
> ambiguous format. Further, the the git code treats it as a date and
> attempts to set it. It remains at the default date only because
> git_committer_info() is called without GIT_COMMITTER_DATE set.
>
> So is the code misleading? Was it designed to just meet the minimal
> requirement of having a date-like string to comform to the mbox
> format? What's the disadvantage to using the real commit date?
Having it as a fixed date-looking string was to help /etc/magic entry
people may want to invent to detect format-patch output.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: git format-patch from date never set
2009-07-25 23:03 ` Junio C Hamano
@ 2009-07-26 0:06 ` Dan Savilonis
0 siblings, 0 replies; 5+ messages in thread
From: Dan Savilonis @ 2009-07-26 0:06 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Alex Riesen, git
Okay, I can see that. I suppose I don't really have an argument in
favor of using the real date, other than aesthetics.
--
Dan
On Sat, Jul 25, 2009 at 7:03 PM, Junio C Hamano<gitster@pobox.com> wrote:
> Dan Savilonis <djs@n-cube.org> writes:
>
>> On Sat, Jul 25, 2009 at 6:31 PM, Alex Riesen<raa.lkml@gmail.com> wrote:
>>> Neither. This is not a date, but a part of "loosely defined" mbox format.
>>>
>>
>> In the examples of mbox format I have found, the date in the From:
>> line is generally the same as in the Date: line, albeit in a more
>> ambiguous format. Further, the the git code treats it as a date and
>> attempts to set it. It remains at the default date only because
>> git_committer_info() is called without GIT_COMMITTER_DATE set.
>>
>> So is the code misleading? Was it designed to just meet the minimal
>> requirement of having a date-like string to comform to the mbox
>> format? What's the disadvantage to using the real commit date?
>
> Having it as a fixed date-looking string was to help /etc/magic entry
> people may want to invent to detect format-patch output.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-26 0:06 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-25 21:39 git format-patch from date never set Dan Savilonis
2009-07-25 22:31 ` Alex Riesen
2009-07-25 22:49 ` Dan Savilonis
2009-07-25 23:03 ` Junio C Hamano
2009-07-26 0:06 ` Dan Savilonis
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).