Tuesday , April 20 2021

shit: An implementation of Git using (almost) entirely POSIX shell, Hacker News

    

      

            shit         

shit==Shell Git

This is an implementation of Git using (almost) entirely POSIX shell.

Caveats:

  • There are a couple of GNU coreutilsisms, which are marked with XXX: GNUism throughout. They have been tested on BusyBox as well.
  • A native zlib implementation is required: zlib
  • Why the fuck would you use this

            Status         

Enough plumbing commands are written to make this write the initial commit with itself, which is how the initial commit was written. Huzzah.

            How to use          Don’t

    1. Okay, fine. Because only plumbing commands are implemented, you have to live with a garbage manual process. Do something like this:

        git clone https: / /git.sr.ht/~sircmpwn/shit mkdir my-project cd my-project ../shit/init # Write some code

         

        So we'll assume shit is at

      ../ shit .

      To create a new index from all of your files (note, subdirectories aren’t working yet):

          ../ shit / update-index

            

          Then to create a tree object from these:

              ../ shit / write-tree | ./hash-object -t tree -w
                

              This will print the tree ID to stdout. Use that to make a commit:

                export GIT_AUTHOR_NAME="Your Name " export GIT_AUTHOR_EMAIL="you@example.org" ../shit/commit-tree  | ./hash-object -t commit -w 
                

              This will print out the new commit's SHA. To update master to point to this new commit:

               
               echo 

              > .git / refs / heads / master

              Tada.

                     

  • Read More)

    About admin

    Check Also

    How To Create A LED Rave Mask Using Arduino, NeoPixels, and C ++ | Armaiz, Hacker News

    OverviewIn this guide, we will cover how you can create the hardware and software for an Arduino LED rave mask. Feel free to refer to the GitHub repository for this Arduino project.The mask looks much better in person but here is the end result:Parts NeededARDUINO NANO: ~$3-$5 - Used to control the LEDs2 x 1…

    Leave a Reply

    Your email address will not be published. Required fields are marked *