git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* DEVEL: Help with feature implementation
@ 2021-01-18 18:06 Aiyee Bee
  2021-01-18 18:19 ` Antonio Russo
  2021-01-18 18:26 ` Derrick Stolee
  0 siblings, 2 replies; 19+ messages in thread
From: Aiyee Bee @ 2021-01-18 18:06 UTC (permalink / raw)
  To: git

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.

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.

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.

Are there any viable alternative means to do this that I can explore?

Thanks!

FriendlyNeighborhoodShane

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: DEVEL: Help with feature implementation
@ 2021-01-19  5:20 Aiyee Bee
  0 siblings, 0 replies; 19+ messages in thread
From: Aiyee Bee @ 2021-01-19  5:20 UTC (permalink / raw)
  To: Derrick Stolee; +Cc: git, Junio C Hamano, Antonio Russo

Forwarded message from Aiyee Bee on Tue Jan 19, 2021 at 4:58 AM:
Hi Derrick and Junio!

Thanks for confirming my suspicions, that there isn't existing apparatus
for doing this, and a new bit can be added as a flag. Thanks for the
*pointers, I'll try working it out! With Antonio, in fact, since they'd
need the same thing for implementing the opposite feature.

As for the justification, to elaborate on what I said in the opening
mail:

This option would be pretty useful when used with diff options, to see
how
much two forks have diverged. I recently wanted to compare two
long-running
forks of a project and see how far they have diverged. I used the
options:
--simplufy-by-decoration --decorate-refs="refs/remotes/*/main" -p

But currently with this history simplification, the diffs for both
divergent
histories will be created against the last "relevant" (decorated) commit
instead of the last common ancestor, which creates pretty useless diffs
with
a lot of intersection between them.

You're right that the option doesn't sound very useful when thought of
in
regards to history limiting by path, but IMO it's pretty useful in cases
like these, when you use simplify to get an 'overview' of the history.

Also sorry for the blank/duplicate emails everyone! My email client
seems to
be misbehaving, largely because I tried to tinker with it :P

- Aiyee Bee


^ permalink raw reply	[flat|nested] 19+ messages in thread
* Re: DEVEL: Help with feature implementation
@ 2021-01-19  4:58 Aiyee Bee
  0 siblings, 0 replies; 19+ messages in thread
From: Aiyee Bee @ 2021-01-19  4:58 UTC (permalink / raw)
  To: git; +Cc: Junio C Hamano, Derrick Stolee, Antonio Russo

Hi Derrick and Junio!

Thanks for confirming my suspicions, that there isn't existing apparatus
for doing this, and a new bit can be added as a flag. Thanks for the
*pointers, I'll try working it out! With Antonio, in fact, since they'd
need the same thing for implementing the opposite feature.

As for the justification, to elaborate on what I said in the opening mail:

This option would be pretty useful when used with diff options, to see how
much two forks have diverged. I recently wanted to compare two long-running
forks of a project and see how far they have diverged. I used the options:
--simplufy-by-decoration --decorate-refs="refs/remotes/*/main" -p

But currently with this history simplification, the diffs for both divergent
histories will be created against the last "relevant" (decorated) commit
instead of the last common ancestor, which creates pretty useless diffs with
a lot of intersection between them.

You're right that the option doesn't sound very useful when thought of in
regards to history limiting by path, but IMO it's pretty useful in cases
like these, when you use simplify to get an 'overview' of the history.

Also sorry for the blank/duplicate emails everyone! My email client seems to
be misbehaving, largely because I tried to tinker with it :P

- Aiyee Bee

^ permalink raw reply	[flat|nested] 19+ messages in thread
* DEVEL: Help with feature implementation
@ 2021-01-18 18:00 FriendlyNeighborhoodShane
  0 siblings, 0 replies; 19+ messages in thread
From: FriendlyNeighborhoodShane @ 2021-01-18 18:00 UTC (permalink / raw)
  To: git



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2021-01-20  2:27 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-18 18:06 DEVEL: Help with feature implementation Aiyee Bee
2021-01-18 18:19 ` Antonio Russo
2021-01-18 18:26 ` Derrick Stolee
2021-01-18 19:15   ` Aiyee Bee
2021-01-18 22:54     ` Junio C Hamano
2021-01-18 19:25   ` Aiyee Bee
2021-01-18 19:31   ` Aiyee Bee
2021-01-18 20:58     ` Derrick Stolee
2021-01-19  0:54       ` Antonio Russo
2021-01-19  1:24         ` Junio C Hamano
2021-01-19 14:52           ` Antonio Russo
2021-01-20  2:21             ` Derrick Stolee
2021-01-19  2:39         ` Derrick Stolee
2021-01-19  5:35           ` Aiyee Bee
2021-01-19  5:38           ` Aiyee Bee
2021-01-19 15:13           ` Antonio Russo
  -- strict thread matches above, loose matches on Subject: below --
2021-01-19  5:20 Aiyee Bee
2021-01-19  4:58 Aiyee Bee
2021-01-18 18:00 FriendlyNeighborhoodShane

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).