| title | Git Rev News Edition 79 (September 30th, 2021) | |
|---|---|---|
| layout | default | |
| date | 2021-09-30 12:06:51 +0100 | |
| author | chriscool | |
| categories |
|
|
| navbar | false |
Welcome to the 79th edition of Git Rev News, a digest of all things Git. For our goals, the archives, the way we work, and how to contribute or to subscribe, see the Git Rev News page on git.github.io.
This edition covers what happened during the month of August 2021.
-
GSoC (Google Summer of Code) 2021 End
Congratulations to the two students who had been accepted to work on Git as part of the GSoC 2021 as they successfully passed all the evaluations!
-
Atharva Raykar worked on the Finish converting submodule to builtin project. He was co-mentored by Shourya Shukla and Christian Couder. He posted 2 final blog posts about it, some Reflections on Working With the Git Community and a Technical Report.
-
ZheNing Hu worked on the Use ref-filter formats in
git cat-fileproject. He was co-mentored by Hariom Verma and Christian Couder and posted a final blog post about it.
-
-
Last July, Ulrich Windl asked the mailing list whether
git fsckshould be able to cleanup orphaned branches. He pointed to a question he asked on StackOverflow as he wanted to get rid of obsolete branches after filtering a repo.git fsckwas complaining about a branch calledbitmap-genericsayingnotice: HEAD points to an unborn branch (bitmap-generic), because that branch was pointing to a commit that didn't exist anymore after filtering the repo, and he couldn't delete that branch asgit branch -derrored out withfatal: Couldn't look up commit object for HEAD.Junio Hamano replied to Ulrich that "HEAD pointing at an unborn branch is not even a corruption", as that's what happen to the default branch when a repo is initialized.
Ulrich replied that he might have been confused by
git fsckand suggested updating the documentation to explain what "unborn" means. Ævar Arnfjörð Bjarmason then agreed with Ulrich that "fsck's error messages/reporting is pretty bad". He said that he had been working on it though.Meanwhile René Scharfe replied to Junio saying that
git branch -D(-Dis a shortcut for--delete --force) should delete a branch pointing to an unexisting commit, instead of requiring users to first reset the branch to some known commit usinggit branch --forceand then to delete it withgit branch --delete. In this reply René even provided a patch called "branch: allow deleting dangling branches with--force" that implemented what he suggested.Ulrich and René then discussed how to actually force a branch in a way that it can then be deleted. The issue was that Ulrich tried to force the dangling branch, using
git branch --force bitmap-genericwhen the current branch wasn't a valid one, so the dangling branch wasn't restored to a valid commit.To René's patch, Junio replied that he felt the filtering process Ulrich used shouldn't have left dangling branches hanging around in the first place. He agreed though that it should be easy to recover from "such a deliberate repository corruption".
René's patch then fell through the cracks for several weeks, until the end of August when René resent it.
Junio replied that the test in René's patch went "against the spirit" of a recently merged patch series by Han-Wen Nienhuys that was preparing tests for the new
reftableref backend.The reftable backend was initially proposed and developed in 2017 by Shawn Pearce. An implementation of it has then been integrated in JGit, and Han-Wen has been working for some time on versions of this backend for Git and libgit2.
Junio suggested to change parts of the test that were creating or testing refs to use higher functions to manipulate refs, instead of directly manipulating loose ref files like
.git/refs/heads/dangling.Junio, Ævar, Han-Wen, Ulrich and René then discussed different ways to change the test, like using the
REFFILEStest prerequisite. They wondered if such a dangling ref could also happen with the reftable backend, and it seemed that this could indeed happen.Han-Wen suggested the ref-store test-helper's
update-refcommand to manipulate refs instead. Ulrich proposed implementing a new--disarm-safety-beltoption to disable checks for testing purposes. Ævar suggested a workaround using an alternate object directory.Meanwhile Ævar commented a bit on René's resent patch. And René replied to the comments, especially noting that
git tag -dwould delete a dangling tag even without--force.René then sent a version 2 of his resent patch with an updated test that was now independent from any ref backend.
Junio, Ævar and René discussed the patch a bit more, after which René sent a version 3 with a few more improvements to the test.
As this version of the patch has since been merged into the master branch, Git will soon allow to delete dangling branches more easily.
-
Who are you and what do you do?
I'm a Software Engineer at Google, and I work on a team dedicated to Git. Outside of work, I'm a husband and a new dad, which doesn't leave me much time for anything else :).
Git is actually my first experience as a professional developer. Up until I joined the Git team in 2018, my career had been in system administration and reliability engineering.
-
What would you name your most important contribution to Git?
Probably the addition of fuzz tests. Not so much due to impact so far (although it has found a few small bugs), but because of the opportunity for future work in this area. If I had more time, I'd love to look into having a proper fuzz tester for client/server communication, for example.
-
What are you doing on the Git project these days, and why?
Until recently, the majority of my work has been internal performance monitoring of Git usage by Google developers. Lately I've been winding down my work on monitoring and starting to look into improving performance and the user experience with submodules. Only the very beginnings of that have started to show up on-list so far.
-
If you could get a team of expert developers to work full time on something in Git for a full year, what would it be?
I think I'd echo my former coworker Brandon Williams (edition 28), and work on cleaning up the global state. For a new-ish developer who doesn't have full history on all the various subsystems, it can be difficult to follow the logic when there's lots of non-local state being modified.
-
If you could remove something from Git without worrying about backwards compatibility, what would it be?
Not so much to remove as change: I wish it was easier to move away from SHA-1 hashes. I'm very happy that brian m. carlson has been working on supporting SHA-256.
-
What is your favorite Git-related tool/library, outside of Git itself?
I'm a huge fan of git-annex and use it to keep my ever-growing pile of PDFs and ebooks synced and organized across various devices. I also use it to archive primary sources in a homebrew personal knowledge base.
- libgit2 1.2.0
- GitLab 13.12.12, 14.3, 14.2.4, 13.12.11, 14.0.10, 14.2.3, 14.2.2, 14.1.4, and 14.0.9
- Bitbucket Server 7.16
- GitHub Enterprise 3.1.8, 3.0.16, 2.22.22, 3.2.0, 3.1.7, 3.0.15, 2.22.21
- GitKraken 8.0.0
- GitHub Desktop 2.9.3
Various
- 3 Reasons to Upgrade Git For The First Time Ever by swyx on DEV.to.
- Emacs discusses web-based development workflows by Jake Edge on LWN.net.
Light reading
- Optimizing Git’s Merge Machinery, Part VI by Elijah Newren on Palantir Blog, the final in the series.
- Ship / Show / Ask: A modern branching strategy by Rouan Wilsenach on martinFowler.com, showing different ways of doing Continuous Integration with a Pull Request workflow, and explaining when to use which method.
- GitHub merges 'useless garbage' says Linus Torvalds (as new NTFS support added to Linux kernel 5.15) by Tim Anderson in The Register.
- How to Protect Your Private Email Addresses in Git & GitHub? on GeeksforGeeks (GitHub specific with respect to hiding your email while still counting your contributions).
- Advanced Git Workflow Tips by Khalid Abuhakmeh on JetBrains' The .NET Tools Blog, additionally explaining how to perform the actions from Rider’s .NET IDE UI.
- Increasing developer happiness with GitHub code scanning by Sam Partington on the GitHub Blog; the examples use the Go language. GitHub code scanning uses the CodeQL semantic code analysis engine.
- GitHub Workflow, Merge and Rebase, actually more about Git than about GitHub, by AaronDski on DEV.to.
- How to Use Git Hooks For Commit Automation by Anthony Heddings on CloudSavvy IT.
- Run RuboCop on
git commitwith Overcommit Gem by Prabin Poudel on his blog. Overcommit gem was mentioned in Git Rev News #63, along various other hook management tools. - Git Flow Is A Bad Idea video by Dave Farley of Continuous Delivery. An interesting perspective on the Git branching model. Worth reflecting on the underlying assumptions and management approaches that make Git branches such a bad idea, in that particular context.
- Full Git Tutorial. Basics for the new user.
Leap to Part 7 for the
Git Log Fully Explained.
Git tools and sites
- Glean: System for collecting, deriving and querying facts about source code.
- 5 JetBrains plugins to upgrade the built-in Git support to the next level! by Thomas Scott on DEV.to. A similar list for Visual Studio Code was presented in Git Rev News Edition #77.
- GitHub Web Editor: FREE VSCode in the browser by Davide 'CoderDave' Benvegnù on DEV.to, about the lightweight code editor, based on Visual Studio Code (VSCode), that is a part of GitHub Codespaces. The GitHub Codespaces project was mentioned in Git Rev News Edition #63.
This edition of Git Rev News was curated by Christian Couder <christian.couder@gmail.com>, Jakub Narębski <jnareb@gmail.com>, Markus Jansen <mja@jansen-preisler.de> and Kaartic Sivaraam <kaartic.sivaraam@gmail.com> with help from Josh Steadmon, Elijah Newren and Philip Oakley.