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

Re: [Question]: Does "git log" involve some stochastic operations?

From
WLWang, Lei <lei4.wang@intel.com>
Date
Aug 13, 2022, 10:15 UTC
Message-ID
<27fe218d-886d-2c26-e436-104acd2b9bf6@intel.com>
In-Reply-To
<CAPx1GveLZm0NH7hBqRSKHJMXttT8Wwnqm3ebjUEpbEXNwh+61w@mail.gmail.com>

Wonderful! That make sense that each time I do the calculation, the result will be slightly different.

BR, Lei

On 8/13/2022 10:35 AM, Chris Torek wrote:
Show 22 quoted lines
> On Fri, Aug 12, 2022 at 7:11 PM Wang, Lei <lei4.wang@intel.com> wrote:
>>   > git log --numstat --since="2022-06-01" --until="2022-06-21"
>> --no-merges --format=%n%n%s%n%H%n%cs%n%an\<%ae
>>
>> The number of the commits in the output is slightly different. I didn't
>> do any sync operation in the repo, so the only reason I can found is
>> that maybe git log involves some stochastic operations, so each time the
>> output will be a little changed. Is my assumption right?
> The `--since` and `--until` date values use the *current time* if you do
> not specify an exact time.  For instance, "yesterday" means "precisely
> 24 hours ago" (86400 seconds ago), and "--since 2022-06-01" means
> "since 1 June 2022 at whatever time of day it is right now".  If you want
> commits with timestamps that are since *midnight* on that day, include
> the midnight part in the date.
>
> (This is probably a UX bug, of sorts: to mean "at now-oclock on a given
> date" we should probably have a syntax like "2022-06-21:(now)" and
> when a specific date is given, the default should be midnight for "since"
> and 23:59:59 for "until", or 23:59:60 if that's a leap-second date.  But
> changing this is probably not in the cards.)
>
> Chris
Previous: Chris Torek
Message 3 of 3 in “[Question]: Does "git log" involve some stochastic operations?”
  1. Wang, LeiAug 13, 2022
  2. Chris TorekAug 13, 2022
  3. Wang, LeiAug 13, 2022

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.