News

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

2 min read

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.
  • /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.

Read Next

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!

 

Bhagyashree R

Share
Published by
Bhagyashree R

Recent Posts

Top life hacks for prepping for your IT certification exam

I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…

3 years ago

Learn Transformers for Natural Language Processing with Denis Rothman

Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…

3 years ago

Learning Essential Linux Commands for Navigating the Shell Effectively

Once we learn how to deploy an Ubuntu server, how to manage users, and how…

3 years ago

Clean Coding in Python with Mariano Anaya

Key-takeaways:   Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…

3 years ago

Exploring Forms in Angular – types, benefits and differences   

While developing a web application, or setting dynamic pages and meta tags we need to deal with…

3 years ago

Gain Practical Expertise with the Latest Edition of Software Architecture with C# 9 and .NET 5

Software architecture is one of the most discussed topics in the software industry today, and…

3 years ago