Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds

Introducing git/fs: A native git client for Plan 9

Save for later
  • 120 min read
  • 2019-04-05 03:21:41

article-image

On Wednesday, Ori Bernstein, a software engineer at Google, shared details about the Git client he has implemented for Plan 9, a non-posix system. The client named git/fs is implemented in Plan 9 flavor C and comes with tools for writing repository contents.

Why git/fs is being introduced?


This is the first time someone has implemented a Git client for Plan 9. The upstream Git uses a large number of system calls that are not supported in Plan 9. Bernstein came up with this client to enable working with git repositories without having to clone the git interface directly.

Git/fs structure


Git/fs provides read-only access to scripts via a file system mounted on ‘/mnt/git’. You will find the following content in ‘/mnt/git’:

  • /mnt/git/object: This includes the objects in the repo.
  • /mnt/git/branch: This includes the branches in the repo.
  • Unlock access to the largest independent learning library in Tech for FREE!
    Get unlimited access to 7500+ expert-authored eBooks and video courses covering every tech area you can think of.
    Renews at $15.99/month. Cancel anytime
  • /mnt/git/ctl: This is a file showing the status of the repo.
  • /mnt/git/HEAD: This is an alias for the currently checked out commit directory.


You can directly access the repository from the shell using standard tools. The scripts and binaries will manipulate the repository contents directly and the changes done will be immediately mirrored in the filesystem. To improve user experience, the author has put more focus on building a consistent and minimalist interface that supports the necessary functionality.

Git/fs does not have any concept of the staging area. There are only three states that files can be in namely, ‘untracked', 'dirty', and 'committed'. To do the tracking it uses empty files under .git/index9/{removed,tracked}/path/to/file.

The client is currently hosted in Mercurial, a distributed revision-control tool, as it is the current native plan 9 version control system.

To know more detail about Git/fs, head over to its Bitbucket repository.

Chris Dickinson on how to implement Git in Rust

‘Developers’ lives matter’: Chinese developers protest over the “996 work schedule” on GitHub

Sublime Text 3.2 released with Git integration, improved themes, editor control and much more!