develooper Front page | perl.perl5.porters | Postings from February 2020

Re: The great dead-branch prune part 1

Thread Previous | Thread Next
From:
demerphq
Date:
February 9, 2020 17:22
Subject:
Re: The great dead-branch prune part 1
Message ID:
CANgJU+XXFuFynXYR-Hp3wesG2kTTw0Qc=trn1BCoqYJXXMd0dQ@mail.gmail.com
On Sun, 9 Feb 2020 at 17:52, demerphq <demerphq@gmail.com> wrote:

>
> Branch origin/smoke-me/khw-wild
> This branch has 3 commits.
> merge-base is: 813e85a03dc214f719dc8248bda36156897b0757 -
> v5.31.6-121-g813e85a03d
> All commits are upstream:
> in blead [-] patch-id upstream
>   author            : Karl Williamson <khw@cpan.org>
>   subject           : regexec.c: Clarify comment
>   blead commit date : 2019-12-11 07:30:17 -0700 - 9 weeks ago
>   blead sha1        : c5d31466e2689b92b744444fa4659738b9980833
>   blead describe    : v5.31.6-129-gc5d31466e2
>   branch sha1       : 2fb88d9fbecf79f96b438166b4c3cd233438a0c8
>   branch describe   : v5.31.6-124-g2fb88d9fbe
> in blead [-] patch-id upstream
>   author            : Karl Williamson <khw@cpan.org>
>   subject           : Rmv leading underscore from macro name
>   blead commit date : 2019-12-11 07:30:17 -0700 - 9 weeks ago
>   blead sha1        : d1c7f3436a105c18cc516aac6a7447e185b2bc8a
>   blead describe    : v5.31.6-128-gd1c7f3436a
>   branch sha1       : e050d739834a497f146002b26f2bf72dd3ef5c8a
>   branch describe   : v5.31.6-123-ge050d73983
> msg only in branch [-] patch-id upstream
>   author            : Karl Williamson <khw@cpan.org>
>   subject           : Only allow punct delimiter for subpattern
>   branch commit date: 2019-12-09 20:37:29 -0700 - 9 weeks ago
>   branch sha1       : 93c07a985e7fc7872598f96cab462e36e7fbaaa6
>   branch describe   : v5.31.6-122-g93c07a985e
> Recommend that this branch be deleted.
>
>
BTW, the logic that does git-cherry is the same  logic that is used by
rebase. Watch what happens if I rebase smoke-me/khw-wild. (Note my prompt
shows my current branch and directory):

blead:~/git_tree/perl$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Total 5 (delta 4), reused 5 (delta 4), pack-reused 0
Unpacking objects: 100% (5/5), done.
From github.com:Perl/perl5
   4b16e2bb0c..ff788636f0  blead      -> origin/blead
Updating 4b16e2bb0c..ff788636f0
Fast-forward
 t/op/signame_canonical.t | 1 +
 1 file changed, 1 insertion(+)

blead:~/git_tree/perl$ git log -1 --oneline
ff788636f0 (HEAD -> blead, origin/blead, origin/HEAD) skip
op/signame_canonical test under miniperl

blead:~/git_tree/perl$ git checkout smoke-me/khw-wild
Branch 'smoke-me/khw-wild' set up to track remote branch
'smoke-me/khw-wild' from 'origin'.
Switched to a new branch 'smoke-me/khw-wild'

smoke-me/khw-wild:~/git_tree/perl$ git rebase origin/blead
First, rewinding head to replay your work on top of it...

smoke-me/khw-wild:~/git_tree/perl$ git log -1 --oneline
ff788636f0 (HEAD -> smoke-me/khw-wild, origin/blead, origin/HEAD, blead)
skip op/signame_canonical test under miniperl

As you can see, once you rebase that branch it becomes empty, and the
reason is that all of its published contents has already been merged.

The point being the machinery I used to determine which branches can be
deleted is the same machinary that would kick in if you tried to merge your
branch /as published/ to blead on github or locally. It would be a no-op,
because it is all already in blead.

I was going to attach the reports I have done, but they are rather large,
so I think I will just push the script tomorrow morning and people can run
it themselves.

cheers,
Yves

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About