git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] apply: notice creation/removal patches produced by GNU diff
Date: Fri, 10 Jul 2009 20:32:01 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.01.0907102029570.3552@localhost.localdomain> (raw)
In-Reply-To: <7vbpnrrjld.fsf_-_@alter.siamese.dyndns.org>



On Fri, 10 Jul 2009, Junio C Hamano wrote:
>
> Unified context patch generated by GNU diff has UNIX epoch timestamp
> on the side that does not exist when the patch is about a creation or
> a deletion event.  Notice this convention when reading a non-git diff.

Hmm. Do you really want to do a regex here? That seems overkill. Why not 
just try to parse the date?

> +	const char stamp_regexp[] =
> +		"^[0-9][0-9][0-9][0-9]-[01][0-9]-[0-3][0-9]"
> +		" "
> +		"[0-2][0-9]:[0-5][0-9]:[0-6][0-9](\\.0+)?"
> +		" "
> +		"[-+][0-2][0-9][0-5][0-9]\n";

Also, why are you apparently expecting micro-seconds to always be all 
zeroes? Maybe that's the common case, but I'd expect that somebody has 
non-zero microseconds on filesystems that support them..

		Linus

  reply	other threads:[~2009-07-11  3:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4A5680B5.2090405@necel.com>
     [not found] ` <4A56B060.7090106@mips.com>
2009-07-10 10:47   ` What's happening with vr41xx_giu.c? Ralf Baechle
2009-07-10 16:20     ` Junio C Hamano
2009-07-11  3:14       ` Junio C Hamano
2009-07-11  3:20         ` [PATCH 1/2] tm_to_time_t(): allow times in year 1969 Junio C Hamano
2009-07-11  3:20         ` [PATCH 2/2] apply: notice creation/removal patches produced by GNU diff Junio C Hamano
2009-07-11  3:32           ` Linus Torvalds [this message]
2009-07-11  3:57             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.01.0907102029570.3552@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).