The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 4,184 other subscribers

Archive for June 18th, 2020

tfs – How to retrieve the hash for the current commit in Git? – Stack Overflow

Posted by jpluimers on 2020/06/18

Based on [WayBack] tfs – How to retrieve the hash for the current commit in Git? – Stack Overflow

Get current hash:

git rev-parse HEAD

Show summary of current commit, including hash:

git show --summary

Show all hashes of all branches (both in heads and in remotes) and tags:

git show-ref

Get current hash with a * marking if it is dirty:

git describe --always --abbrev=0 --match "NOT A TAG" --dirty="*"

The last one was [WayBack] answered by [WayBack] Rado:

display the full sha1 of the commit, but append an asterisk to the end if the working directory is not clean. …

Here is the one liner that does:
git describe --always --abbrev=0 --match "NOT A TAG" --dirty="*"
Result: f5366ccb21588c0d7a5f7d9fa1d3f85e9f9d1ffe*

Explanation: describes (using annotated tags) the current commit, but only with tags containing “NOT A TAG”. Since tags cannot have spaces, this never matches a tag and since we want to show a result --always, the command falls back displaying the full (--abbrev=0) sha1 of the commit and it appends an asterisk if the working directory is --dirty.


Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management | Leave a Comment »

Delphi Exception handling code review reminders

Posted by jpluimers on 2020/06/18

I bumped into [WayBack]When an exception is nil in the exception handler – twm’s blog for some legacy code a while ago.

Some code review reminders:

  • raise Exception( is always wrong: no exception instance is created
  • Exception.Create( without a raise is wrong most of the times
  • except end is almost always wrong
  • except and finally in encompassing blocks often is a code smell

I need to check which ones are caught by [WayBack] Code Analysis Tool | FixInsight for Delphi (which is not at [WayBack] TMS Software | VCL, FMX, ASP.NET, .NET controls & components for Delphi, C++Builder & Visual Studio | TMS FixInsight Pro.)


Posted in Conference Topics, Conferences, Delphi, Development, Event, Software Development | Leave a Comment »

Lisette Sutherland: Work Together Anywhere | Lisette Sutherland | TEDxKaunas

Posted by jpluimers on 2020/06/18

[WayBack] TEDx Kaunas, 19 November 2017 – Lisette Sutherland:

“Remote workers aren’t trying to escape doing work. We’re trying to escape the Day Prison. We want to use technology to make better use of our time. We want to spend more time on things that matter to us and less time stuck in traffic.“

The site has the original transcript on the below video: Work Together Anywhere | Lisette Sutherland | TEDxKaunas.

Via: [WayBack] “People think that they want to be in the same place. But what they really want is fast communication” – Work Together Anywhere | Lisette Sutherland … – Marjan Venema – Google+


Read the rest of this entry »

Posted in Agile, Development, Software Development | Leave a Comment »

%d bloggers like this: