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

Re: Feature Request: Option to make "git rev-list --objects" output duplicate objects

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 24, 2023, 16:50 UTC
Message-ID
<xmqq4jqa3xgj.fsf@gitster.g>
In-Reply-To
<AS1PR02MB8185A45DB63216699AFB2C5494849@AS1PR02MB8185.eurprd02.prod.outlook.com>
"Baumann, Moritz" <moritz.baumann@sap.com> writes:
> Is there any alternative for my use case that doesn't involve walking the
> commits one-by-one?

I do not think there currently is such an option, and not showing the same object twice is pretty much fundamental in the operation of the command, so it is unclear what the new feature should look like.

Should it also show the same commit it encounters during its history walk (remember, a history can have forks and merges in it) in duplicates if it encounters it more than once? Should it show all the subtrees and blobs in the tree of each commit, even if most of them do not change from commit to commit? How does the user control which ones are duplicated and which ones are to be visited only once? How does the command line option used by the user to tell the command to give such a choice look like?

Once there things are designed well, implementation of such a mode would not be too hard.

By the way, "rev-list" internally uses walking the commits one-by-one, anyway ;-).

Previous: Baumann, MoritzNext: Baumann, Moritz
Message 2 of 9 in “Feature Request: Option to make "git rev-list --objects" output duplicate objects”
  1. Baumann, MoritzMar 24, 2023
  2. Junio C HamanoMar 24, 2023
  3. Baumann, MoritzMar 27, 2023
  4. Junio C HamanoMar 27, 2023
  5. Jeff KingMar 24, 2023
  6. Baumann, MoritzMar 28, 2023
  7. docs: document caveats of rev-list's object-name outputJeff King, Mar 28, 2023
  8. Baumann, MoritzMar 30, 2023
  9. Jeff KingMar 28, 2023

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.