Git

GitShortlogToPieChart (Python: Git ➔ matplotlib)

Written by  on August 17, 2020

Time to turn the spotlight on for a tiny project I’ve finished five weeks ago. The plan was to create a script, which would retrieve the of commits for the current repository for each committer (without those distorting merge-commits) and create a piechart-plot out of it and save as raster-graphics.
Implementation was more or less straight-forward, but again – I learned a lot. Talking is one thing, creating some usable proof-of-concept is the other. And words are cheap. No matter how triftling the task may seem, action speaks louder than “ah, shouldn’t be a problem”.
Actually I had done this before the Python-graphics-workshop, because even before I thought the matplotlib is quite a mighty tool which will come in handy.

Project can be found here: GitShortlogToPieChart

Call like this:

Covid-19, PanOffice and how my education-plan imploded

Written by  on May 14, 2020

A note before the actual post: a week ago, while proofreading I’ve noticed that some of the following statements, which are meant truly neutral, could and would leave a stale aftertaste. That’s definitely not the intention; it’s more a snapshot of the current state (like for a chronicle). On the other hand: if I would censor it more, I can trash as well the whole post. Because ten thousands of texts were already written about the curent state of human society and the impact of Covid-19.
So, read it with a pinch of salt: we are lucky to be healthy and that we don’t suffer from more harsh conditions.

 

More than two months ago Sars-CoV-2 -induced infections scaled up in Germany and hit us without much preparation. Us includes me, my family, my workplace, society at all.
Read more…

The great purge

Written by  on February 24, 2020

Git is my VCS-system of choice and github most of the time the place for my publicly shared repositories.
Over the years some clutter piled up there:

  • unfinished business; projects which were started (with best intentions) and never finished
  • forked repositories, which I don’t need anymore (not sure if I will remove also those were I contributed, because then the evidence is more or less gone, or?)
  • code I am a bit ashamed right now :’) (if you have no projects were you laugh heartily about how naively you implemented them at that time, then you made no progress)

Therefore I started to check them to see if it makes sense to keep or delete them. Right now I am down to 39 and the delete-button is still hot 😉

quick git stats

Written by  on October 11, 2019

(Another way without external tools.)

SmartGit can process warnings from commit-hooks!

Written by  on March 8, 2019

Another thing I was not aware of: SmartGit can present warnings reported from (pre-)commit-hooks in an alerting way.
Just add echo “warning:” as prefix to your message and it will result in a warning signpost and a modal dialog after commit.

I’ve filed a change-request to make this parsing of the messages case-insensitive.

Move some feature-implementation with Git-help from one branch to another without previous “merges”

Written by  on March 8, 2019

We ran at work into the quite tricky problem to move the “pure” implementation of a feature to some other branch (a quickfix-release) without adding those features/bugfixes from the current master-branch. The feature branch was created some while ago and meanwhile updated from time to time with origin/master.

Discussed options were:
* manually copy the changes (since it was one directory and some minor adjustments in other CMakeLists.txts and some calls) –> much work, very error prone in terms of “Oh, I missed something”
* move to HEAD@target-branch and cherry-pick one-by-one all feature-commits (without merge-commits) –> lots of work, because 15+ commits
* some Git-way –> preferred by me, but I neve did something similar before – so: totally unknown

I chose the third option and tinkered in parallel while someone else tried the other path.
0. created “fake-feature-branch” on HEAD of the feature-branch
1. merged current state master-branch to it
2. created a diff as patch-file between HEAD@master and HEAD@”fake-feature-branch” by:
git diff fromHash toHash --binary > ../binary.patch
(–binary is important; else added ressources will be missing)
4. switch to HEAD@targetBranch
5. apply the patch (and suppress whitespace-errors) by:
git apply --whitespace=fix ../binary.patch
6. eventually fix conflicts if necessary

Yay, two commands to save the day! Around 170 files were affected, so manually doing the application of the changes was out of scope for me. There had to be a feasible Git-solution.

Retrospective view at 2018

Written by  on February 1, 2019

The first month of 2019 already passed. And we passed it with flying colors!
But let’s have a look at 2018 – a year full of challenges and success: I’ve worked full-time, organized and participated in advanced courses for Python and in Requirements Engineering (officially: IREB Requirements Engineering Foundation Level-approved) and pursued a new employment as software engineer.

And I wrote some software in my spare-time, as you can see in the graph for the public github-repositories. The gaps in the commits can be explained with the birth of my daughter and the time where I acquired the new job and moved nearly 900 km across the country. Yay! Nice personal projects were and are Cullendula and the Daily Coding Challenges, which I solve mostly with fully Unit-tested Python (3).

More new, hands-on knowledge was gained in the area of CMake and Qt-charts.
Well – 2018 was great. Let me make 2019 greater! 💪

Fix whitespace

Written by  on January 24, 2019

Sometimes there is too much whitespace and tabs in my last commit.
In former times I used a VisualStudio-plugin, but this is not helpful there. So I wrote a small script (see on my github) which:
• replaces all tabs with four spaces
• removes all trailing whitespace
• converts line-endings to CRLF

I invoke it on the list of all changes files in my last commit in the git-repo with:

(first part gives you a list of changed files and then feeds it to the script for execution)

Overview of author-activities for the git-repo

Written by  on January 16, 2019

If some ‘sophisiticated’ tool like git-stats is too cumbersome to configure, just do some git-log and shell-magic:

Ok, just noticed that git has something built-in:

from: https://coderwall.com/p/pek-yg/git-statistics-for-repo-per-author – Thanks Marcin Olichwirowicz!

First pull-request on github, yay!

Written by  on August 5, 2018

Searched for a usable NTP-library, which assorts well with Qt and stumbled over qntp. While fiddling around I noticed in their source some opportunities to improve the code. So I cloned the repo, did them and created my very first pull-request for open-source 🙂
(Side-note: currently mostly Python-code is pushed due to the daily coding-challenge. But C++/Qt is still my carthorse.)