🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
8 messages
8 total messages Started by Phillip Wood Thu, 08 Oct 2026 15:25
Re: [PATCH] branch: let --delete-merged find squash merged branches
#105
Author: Phillip Wood
Date: Thu, 08 Oct 2026 15:25
31 lines
9609 bytes
Hi Harald

On 04/10/2026 23:28, Harald Nordgren wrote:
> ...
>> If you know your repository only has squash merges that were not rebased
>> it would be a lot more efficient to just look at the trees and
>> merge-bases, especially in a blobless clone. Having an option to turn
>> off the patch-id based detection would probably be useful in that case.
> 
> Maybe yes, but for users I imagine they want the interface to be as
> simple as possible.

Agreed, they also don't want to wait to find squashed merges they know 
they do not have.

> I'm iterating on the code on my side (sharing logic between branches,
> etc) and it became fast on my local Git repo. If there are no
> performance concerns then would we still want the option to turn it
> off?

Even an efficient implementation is going to be a lot slower when it is 
trying to find branches that have been squashed, so I think we probably 
do want a way to turn it off. That's especially true in partial clones 
where we'll have to download a bunch of blobs to do the squash 
detection. So long as it isn't diabolically slow enabling it by default 
is probably fine.

Thanks

Phillip
Re: [PATCH] branch: let --delete-merged find squash merged branches
#120
Author: Harald Nordgren
Date: Thu, 08 Oct 2026 18:42
23 lines
10000 bytes
> Even an efficient implementation is going to be a lot slower when it is
> trying to find branches that have been squashed, so I think we probably
> do want a way to turn it off. That's especially true in partial clones
> where we'll have to download a bunch of blobs to do the squash
> detection. So long as it isn't diabolically slow enabling it by default
> is probably fine.

A bit slower (depends on how much!) could be worth it for improved
usability. This is not a command that users will run multiple times a
day.

I would hope we could have it on by default and add a flag to turn it
off instead.

For partial or shallow clones, we should probably warn the user that
detection won't be able to search the full history, and offer them to
unshallow, etc. It's very reasonable that some parts are turned off,
when the user doesn't want to hold the complete repo.



Harald
Re: [PATCH] branch: let --delete-merged find squash merged branches
#153
Author: "Kristoffer Haugsbakk"
Date: Fri, 09 Oct 2026 08:16
26 lines
10901 bytes
On Thu, Oct 8, 2026, at 20:42, Harald Nordgren wrote:
>> Even an efficient implementation is going to be a lot slower when it is
>> trying to find branches that have been squashed, so I think we probably
>> do want a way to turn it off. That's especially true in partial clones
>> where we'll have to download a bunch of blobs to do the squash
>> detection. So long as it isn't diabolically slow enabling it by default
>> is probably fine.
>
> A bit slower (depends on how much!) could be worth it for improved
> usability. This is not a command that users will run multiple times a
> day.

I would really like a solid delete operation that I can run, say,
overnight. I have better hygiene practices today but I didn’t back then,
so things have piled up.

One big cleanup is worth a nightly run. So I don’t care about how slow
it is.

>[snip]
Re: [PATCH] branch: let --delete-merged find squash merged branches
#162
Author: Harald Nordgren
Date: Fri, 09 Oct 2026 11:11
39 lines
10804 bytes
On Fri, Oct 9, 2026 at 10:16 AM Kristoffer Haugsbakk
<kristofferhaugsbakk@fastmail.com> wrote:
>
> On Thu, Oct 8, 2026, at 20:42, Harald Nordgren wrote:
> >> Even an efficient implementation is going to be a lot slower when it is
> >> trying to find branches that have been squashed, so I think we probably
> >> do want a way to turn it off. That's especially true in partial clones
> >> where we'll have to download a bunch of blobs to do the squash
> >> detection. So long as it isn't diabolically slow enabling it by default
> >> is probably fine.
> >
> > A bit slower (depends on how much!) could be worth it for improved
> > usability. This is not a command that users will run multiple times a
> > day.
>
> I would really like a solid delete operation that I can run, say,
> overnight. I have better hygiene practices today but I didn’t back then,
> so things have piled up.
>
> One big cleanup is worth a nightly run. So I don’t care about how slow
> it is.

I would love to have a `full-clean` command that bundles
`deleted-merged` and all `prune` commands, and uses sensible defaults
for each one. (I have a hard time believing that it would need to run
overnight anyway).

I have known people who just delete the whole repo on any signs of
trouble. People out there are so scared of Git, so let's give them
sensible defaults to work with.


Harald
Re: [PATCH] branch: let --delete-merged find squash merged branches
#163
Author: Harald Nordgren
Date: Fri, 09 Oct 2026 11:18
7 lines
9376 bytes
Interesting to note is that merged branches inside our repo change
when Junio signs off on them. So without this functionality they are
not cleaned either.


Harald
Re: [PATCH] branch: let --delete-merged find squash merged branches
#177
Author: Phillip Wood
Date: Fri, 09 Oct 2026 13:37
31 lines
9808 bytes
Hi Harald

On 08/10/2026 19:42, Harald Nordgren wrote:
>> Even an efficient implementation is going to be a lot slower when it is
>> trying to find branches that have been squashed, so I think we probably
>> do want a way to turn it off. That's especially true in partial clones
>> where we'll have to download a bunch of blobs to do the squash
>> detection. So long as it isn't diabolically slow enabling it by default
>> is probably fine.
> 
> A bit slower (depends on how much!) could be worth it for improved
> usability. This is not a command that users will run multiple times a
> day.
> 
> I would hope we could have it on by default and add a flag to turn it
> off instead.

That's my hope too

> For partial or shallow clones, we should probably warn the user that
> detection won't be able to search the full history, and offer them to
> unshallow, etc. It's very reasonable that some parts are turned off,
> when the user doesn't want to hold the complete repo.
I've not really though much about shallow clones, but for partial clones 
I think it is perfectly reasonable to go and fetch the blobs we need to 
calculate the patch ids and warn in the documentation that it can be slow.

Thanks

Phillip
Re: [PATCH] branch: let --delete-merged find squash merged branches
#175
Author: Phillip Wood
Date: Fri, 09 Oct 2026 13:40
16 lines
9179 bytes
Hi Harald

On 09/10/2026 12:18, Harald Nordgren wrote:
> Interesting to note is that merged branches inside our repo change
> when Junio signs off on them. So without this functionality they are
> not cleaned either.
That's true for a patched based workflow like the one on this list 
whether or not the maintainer signs off the commits. It is slightly 
different from the squash merge case because you need to look for the 
individual commits upstream, rather than the combined changes from the 
branch.

Thanks

Phillip
Re: [PATCH] branch: let --delete-merged find squash merged branches
#191
Author: Harald Nordgren
Date: Fri, 09 Oct 2026 15:27
10 lines
9539 bytes
> I've not really though much about shallow clones, but for partial clones
> I think it is perfectly reasonable to go and fetch the blobs we need to
> calculate the patch ids and warn in the documentation that it can be slow.

Would you say the blobless case should be handled now, or can be left
as a follow-up topic?


Harald
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads