git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC 5/5] Support 'master@2 hours ago' syntax

From
Junio C Hamano <junkio@cox.net>
Date
May 17, 2006, 18:32 UTC
Message-ID
<7v7j4kec3h.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0605170745270.10823@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
Show 10 quoted lines
> On Wed, 17 May 2006, Junio C Hamano wrote:
>> 
>> This does not allow '2006-05-17 00:00:00' as the timespec, and
>> the documentation carefully avoids giving that example, but I
>> think it is better to spell that limitation out.
>
> It doesn't? The "approxidate()" function should handle any reasonable date 
> specifier, and the above is certainly more than reasonable.
>
> Why doesn't approxidate handle it?

The way I read the code is that get_sha1() would first do its magic at the first colon and feeds get_sha1_1() with prefix up to the first colon. This gets passed down to get_sha1_basic() and what approxidate() is fed is the suffix of that prefix. It ends up seeing stuff between '@' and ':'. I.e.

	"master@2006-05-17 00:00:00:cache.h"

would ask for "00:00:cache.h" file in the "master" branch as of timestamp "2006-05-17 00".

Previous: Linus TorvaldsNext: Shawn Pearce
Message 4 of 7 in “[RFC 5/5] Support 'master@2 hours ago' syntax”
  1. Shawn PearceMay 17, 2006
  2. Junio C HamanoMay 17, 2006
  3. Linus TorvaldsMay 17, 2006
  4. Junio C HamanoMay 17, 2006
  5. Shawn PearceMay 17, 2006
  6. Shawn PearceMay 17, 2006
  7. Shawn PearceMay 17, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.