Git 2.21 introduces new date format for human timekeeping


Popular version management software Git is now available in v2.21 and includes some performance improvements, a new, more human-friendly date format, and some fixes to make working with case-insensitive filesystems easier.

The new date format can be accessed via –date=human, and will automatically clip the amount of information to what might be actually useful for a human user. This means for example leaving out details like year and day if something happened just a couple of minutes ago or cutting the seconds if something has happened way back.

It is a bit similar to the –date=relative option, but if you prefer an actual date to the 3 days ago output, it might be just the thing for you. To put together a script that takes human as well as machine readable information into account, –date=auto:human will use the new format for pagers and terminals and keep the default for any other output form.

To get the whole system to perform better, the Git team has – amongst other things – cleaned up the codepath checking for loose objects, updated the cache used to optimise existence look-up for the latter, and reimplemented git rebase –merge using git rebase -i internals. Git now also includes an additional algorithm to compute the set of objects to send, which is meant to save traversal costs.

Although there are still issues with files relying on case-sensitivity in case-insensitive systems (think multi-platform projects for example), which is why you should try to stay away from those, Git now no longer fails to compare the part of the path that is above the worktree directory in an absolute pathway in case-insensitivy filesystems.

While there shouldn’t be any great issues with backward compatibility for this release, v2.21 doesn’t warn or display errors when working with a single-parent commit when the argument of -m is 1. Therefore scripts relying on that behaviour won’t work as usual once the software has been updated.

A complete list of changes and bug fixes can be found in the release notes, which were also part of the release mailer.