Re: prehistory branch (was: patching suffixes(7) (was: groff 1.23.0.rc2 status report))

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[self-correction]

On 12/19/22 20:54, Alejandro Colomar wrote:


On 12/19/22 20:10, Alejandro Colomar wrote:
BTW, I agree with you that the reversed history is a bit weird and confusing. I thought of a new method that would connect both histories while keeping a forward history:

A separate orphan branch in normal order, starting at 1.0, which ends at 1.70. And then git allows merging orphan branches, so I can create a merge commit between both 1.70 commits, which of course is a no-op, but one that tells git where and how these branches join.

It was easy to reverse the history.  After renaming the old prehistory branch to prehistory-backwards, and creating an orphan branch, and manually picking the first two commits to see how it works (thus the tail(1) invokation), it's automated as:

$ git log prehistory-backwards \
   | grep ^commit \
   | cut -f2 -d' ' \
   | tail -n+3 \
   | while read hash; do
           git checkout $hash -- . \
        && git commit --reuse-message=$hash;
   done;

And after the merge, we have something with which I'm quite happy: connected forward histories.


That script was a bit buggy.  The good one is:

$ git log prehistory-backwards \
  | grep ^commit \
  | cut -f2 -d' ' \
  | while read hash; do
          rm -rf *;
          git checkout $hash -- . \
       && git add . \
       && git commit --reuse-message=$hash;
  done;

--
<http://www.alejandro-colomar.es/>

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux