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

Re: List all commits of a specified file in oldest to newest order

From
Vipul Kumar <kumar@onenetbeyond.org>
Date
Dec 14, 2021, 03:58 UTC
Message-ID
<71d21b15-a5db-dd7e-bc81-06bbef995e31@onenetbeyond.org>
In-Reply-To
<211109.864k8lvesb.gmgdl@evledraar.gmail.com>

Hi, sorry for delay reply. I was busy with some other works and couldn't find the time to look into it.

On 11/9/21 9:42 AM, Ævar Arnfjörð Bjarmason wrote:
Show 14 quoted lines
> 
>> Thanks, I didn't know "reverse" would change the traversal order. When
>> I looked for "--reverse" option in git-log(1), this what I found:
>>
>>    --reverse
>>        Output the commits chosen to be shown (see Commit Limiting
>>        section above) in reverse order. Cannot be combined with
>>       --walk-reflogs.
>>
>>  From this, I inferred that "--follow" would choose the commits and
>> "--reverse" reverses those commits order. Can we improve the wording
>> here? Especially, about "reverse" changes the traversing order.
> 
> Yes, definitely. Suggestions most welcome :)
   --reverse
       Traverse the commits chosen to be shown (see Commit Limiting 
section above) in reverse order. Cannot be combined with --walk-reflogs.

If we don't want to disallow combination of "--follow" and "--reverse", just like "--walk-reflogs" as combination doesn't make any sense[1]. We could do this:

   --reverse
       Traverse the commits chosen to be shown (see Commit Limiting 
section above) in reverse order. Cannot be combined with --walk-reflogs. 
Combination of --follow and --reverse won't produce an expected output, 
if we also want to follow renames. If there is nothing to follow it 
should behave as expected.

[1]: https://public-inbox.org/git/6c6ef97c-9de5-176f-f328-c4dffd96d495@onenetbeyond.org/

Does it sound good to you?
-v
Previous: Ævar Arnfjörð Bjarmason
Message 9 of 9 in “List all commits of a specified file in oldest to newest order”
  1. Vipul KumarNov 5, 2021
  2. Jeff KingNov 5, 2021
  3. Junio C HamanoNov 5, 2021
  4. Jeff KingNov 5, 2021
  5. Vipul KumarNov 9, 2021
  6. Ævar Arnfjörð BjarmasonNov 5, 2021
  7. Vipul KumarNov 9, 2021
  8. Ævar Arnfjörð BjarmasonNov 9, 2021
  9. Vipul KumarDec 14, 2021

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.