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

Re: DEVEL: Help with feature implementation

From
Antonio Russo <aerusso@aerusso.net>
Date
Jan 18, 2021, 18:19 UTC
Message-ID
<f29fadef-6497-403c-59e0-8bd7beec77af@aerusso.net>
In-Reply-To
<C8MHFL3YJDSF.1GLOUSV7BYS1X@localhost>
On 1/18/21 11:06 AM, Aiyee Bee wrote:
Show 8 quoted lines
> Hello everybody!
> 
> I want to implement a feature in git, and I'm looking for some help.
> 
> I wanted to add a history-simplification option to rev-list so that it
> doesn't simplify away any irrelevant commits if they have multiple
> relevant _children_, i.e. when they are the point where two relevant
> histories diverge.

I'm actually working on something that does the opposite---it ignores the fork point when drawing the graph. (I'm currently dog-fooding a partial implementation of this.)

Show 7 quoted lines
> Basically the effect I want for --show-forkpoints (named like --show-pulls):
> http://ix.io/2Ms6
> 
> But it seems there is no existing apparatus in the revision walker for
> deciding simplification on basis of *children*, am I correct? Admittedly
> my understanding of it is still a WIP, but I don't see anything that
> could help.

It's even worse than this. AFAICT, there are two code paths: one for when the git-commit-graph is enabled, and one when it is not. There's a special "revs->limited" option which lets you deal with the commits all at once, at the expense of losing all the speed improvements from the git-commit-graph efforts.

Aside: I want to get rid of that alternative path.  But I only have limited
time.
Show 8 quoted lines
> I was hoping that simply the flag CHILD_SHOWN could be checked, but it
> seems that's only set on boundary commits :(
> 
> This option would be pretty useful when used with some diffs, to see how
> much two forks have diverged. Currently if you use history simplification,
> the diffs for both divergent histories will be created against the last
> relevant commit instead of the last common ancestor, which creates pretty
> useless diffs with a lot of intersection between them.
Sounds neat!
> Are there any viable alternative means to do this that I can explore?
I too would like to hear about suggestions for this.
Show 5 quoted lines
> 
> Thanks!
> 
> FriendlyNeighborhoodShane
> 
Previous: Aiyee BeeNext: Derrick Stolee
Message 2 of 16 in “DEVEL: Help with feature implementation”
  1. Aiyee BeeJan 18, 2021
  2. Antonio RussoJan 18, 2021
  3. Derrick StoleeJan 18, 2021
  4. Aiyee BeeJan 18, 2021
  5. Junio C HamanoJan 18, 2021
  6. Aiyee BeeJan 18, 2021
  7. Aiyee BeeJan 18, 2021
  8. Derrick StoleeJan 18, 2021
  9. Antonio RussoJan 19, 2021
  10. Junio C HamanoJan 19, 2021
  11. Antonio RussoJan 19, 2021
  12. Derrick StoleeJan 20, 2021
  13. Derrick StoleeJan 19, 2021
  14. Aiyee BeeJan 19, 2021
  15. Aiyee BeeJan 19, 2021
  16. Antonio RussoJan 19, 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.