[Vm-dev] vmmaker git migration - strange network graph

Ben Coman btc at openinworld.com
Thu Nov 15 02:14:59 UTC 2018


TLDR; Please consider deleting tho crazy
all-history-committed-on-a-single-day-bunched-commits...
    https://github.com/feenkcom/opensmalltalk-vm/network
 and adopting my "vmmaker_fix_commit_dates_msgs_merge" branch that fixes
this.
    https://github.com/bencoman/opensmalltalk-vm/network

i.e....
$ git remote add ben git at github.com:bencoman/opensmalltalk-vm.git
$ git fetch ben
$ git checkout -b my_vmmaker_merged_starting_point
ben/vmmaker_fix_commit_dates_msgs_merge

-----------------------------
I find it useful to review a repo's history using github's Insights >
Network....
Looking at opensmalltalk's right now is a bit strange...
https://github.com/OpenSmalltalk/opensmalltalk-vm/network

I often use the left arrow key to scroll into the past and it
was strange that no date numbers appeared at the top for a really long time
.
Looking at the feenkcom account, it was further strange that all the
commits consistently spaced and to be bunched together in a single day even
though they appeared to have successfully migrated their real commit date,

I'm guessing its due to the "Initial commit" of that branch being done "6
days ago" and the next child commit is several years earlier.  Probably if
that initial commit was forced to a much earlier date, the vmmaker commits
would become nicely spaced out in the network chart and you'd
be able to visually see which other commits each aligned with.

It also seemed strange that commit 55d8605 had no parent but DID have a
purple line preceding it, but here it was clear that 55d8605 was an orphan
starting the branch...
https://github.com/feenkcom/opensmalltalk-vm/network

[image: strange-git-network.png]
I found trying to review the same with `git log` was confusing since the
vmmaker-only branch had been merged with the Cog branch into
"pullrequest/vmmaker".
>From browsing the commits on github I found the last separate-vmmaker
commit was ab7cbba.
So then...
$ git clone feenk https://github.com/feenkcom/opensmalltalk-vm.git
$ git pull feenk
$ git checkout ab7cbba -b last_separate_vmmaker
$ git log -1
Author: Eliot Miranda <eliot.miranda at gmail.com>
Date:   Mon Nov 5 10:32:17 2018 +0000
    ThreadedFFIPlugin....

which looks right, and reviewing the first commits, the "Date:" is wrong
for Ganea commit...
$ git log | tail -50 | grep -v Co-authored
commit e69ea5c78ebcf2d6fca6cc8b3c09158790085e33
Author: Tim Rowledge <tim at rowledge.org>
Date:   Mon Feb 16 16:14:30 2004 +0000
    Loaded VMMaker 3.7beta 1 for the first time. Appears to be all
installed ok.
commit 55d860554e53d9828b836bebd7ea29cc852c85ef
Author: George Ganea <georgeganea at gmail.com>
Date:   Thu Nov 8 09:52:01 2018 +0200   <<<<<<<<<<<<<<<<
    initial commit


After hunting around git forums a while I discovered I could do...
$ git filter-branch --env-filter \
    'if [ $GIT_COMMIT = 55d860554e53d9828b836bebd7ea29cc852c85ef ]
then
         export GIT_AUTHOR_DATE="Mon Feb 15 00:00:00 2004 +0000"
         export GIT_COMMITTER_DATE="Mon Feb 15 00:00:00 2004 +0000"

fi'
Rewrite ab7cbba2d7a8d2f28253c6aa68fa02791bebfca2 (3296/3300) (729 seconds
passed, remaining 0 predicted)
Ref 'refs/heads/last_separate_vmmaker' was rewritten

and the following shows that worked as expected, with a better commit date
for Ganea commit (note the different commit hash)...
$ git log | tail -50 | grep -v Co-authored
commit 8c61452847c067e71ace5294256270015d3abf91
Author: Tim Rowledge <tim at rowledge.org>
Date:   Mon Feb 16 16:14:30 2004 +0000
    Loaded VMMaker 3.7beta 1 for the first time. Appears to be all
installed ok.

commit a8679450ec9a9fb206ee1bf8586ff5919b0c1487
Author: George Ganea <georgeganea at gmail.com>
Date:   Sun Feb 15 00:00:00 2004 +0000  <<<<<<<<<<<<<<<<
    initial commit


However that didn't fix visual issue on github.
Doing...
$ git push ben
showed the network chart had the same problem for my
branch last_separate_vmmaker


Digging further I noticed a discrepancy in the CommitDate not matching
AuthorDate...
$ git log --format=fuller | tail -55 | grep -v Co-authored
commit 8c61452847c067e71ace5294256270015d3abf91
Author:     Tim Rowledge <tim at rowledge.org>
AuthorDate: Mon Feb 16 16:14:30 2004 +0000    <<<<<<<<<<<<<<<<
Commit:     Tim Rowledge <tim at rowledge.org>
CommitDate: Thu Nov 8 08:31:34 2018 +0000     <<<<<<<<<<<<<<<<
    Loaded VMMaker 3.7beta 1 for the first time. Appears to be all
installed ok.

commit a8679450ec9a9fb206ee1bf8586ff5919b0c1487
Author:     George Ganea <georgeganea at gmail.com>
AuthorDate: Sun Feb 15 00:00:00 2004 +0000
Commit:     George Ganea <georgeganea at gmail.com>
CommitDate: Sun Feb 15 00:00:00 2004 +0000
    initial commit

So just taking a wild stab...
$ git branch vmmaker_fix_commit_dates
$ git checkout vmmaker_fix_commit_dates
$ git filter-branch --env-filter 'export
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
$ git log --format=fuller | tail -55 | grep -v Co-authored
That looks better.  Lets see how it looks on github.
$ git push ben

But it seems that doesn't show up in the chart until its merged like this...
(maybe because the branch starts with an orphan commit.)
$ git branch vmmaker_fix_commit_dates_merge
$ git checkout vmmaker_fix_commit_dates_merge
$ git merge Cog --allow-unrelated-histories
$ git push ben

[image: fixed_commit_dates.png]

One final thing.  Considering how all these VMMaker commit message are
going to be intermixed with the existing history,
it may be useful to identify at a glance which ones are from VMMaker.
Starting one commit back so working on the unmerged history, I did...
$ git checkout vmmaker_fix_commit_dates
$ git branch vmmaker_fix_commit_dates_msgs
$ git checkout vmmaker_fix_commit_dates_msgs
$ git filter-branch -f --msg-filter 'sed "s/^/VMMAKER: /" '
$ git log
Looks okay
$ git push ben
$ git branch vmmaker_fix_commit_dates_msgs_merge
$ git checkout vmmaker_fix_commit_dates_msgs_merge
$ git merge Cog --allow-unrelated-histories
$ git push ben

Below you can see how the VMMaker commits are now spread correctly over
time.  And also how the VMMaker commit could be identified.
But even consider that perhaps it would be useful for the MCZ filename to
be prepended to the commit message (@peter?),
so its easier in the ancient history to exactly match up the Cog branch
commits with the VMMaker commits.

So please consider deleting those crazy single-day-bunched-commits and
adopting my "vmmaker_fix_commit_dates_msgs_merge" branch
$ git remote add ben git at github.com:bencoman/opensmalltalk-vm.git
$ git fetch ben
$ git checkout -b my_vmmaker_merged_starting_point
ben/vmmaker_fix_commit_dates_msgs_merge

After that, it might even be possible to squeeze the both Cog and VMMaker
branches together so there is
just one branch all the way back to ancient history, with the vmmaker
commits identified to "VMMAKER" marked commit messages.
Going forward there wont need to be that distinction.

HTH, cheers -ben


[image: fixed_commit_dates.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181115/70cee9b9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: strange-git-network.png
Type: image/png
Size: 59880 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181115/70cee9b9/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixed_commit_dates.png
Type: image/png
Size: 209974 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181115/70cee9b9/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixed_commit_dates.png
Type: image/png
Size: 209974 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181115/70cee9b9/attachment-0005.png>


More information about the Vm-dev mailing list