Git shallow cloning stuff

so after you use shallow cloning in git using –depth 1, if you call git pull you will find that git will pull all changes not just –depth 1.

to honour the –depth 1 from cloning we call call git pull with the same depth:

git pull –depth 1 origin master

life saving stuff

Quick cloning of kernel mainline

git clone –depth 1 linux_mainline

using github as it’s a mirror of mainline and depending where you’re accessing the internet from, much faster.

the –depth 1 will limit the history to 1 commit back I believe. If you’d need to view more than that then you can probably use

git log — [filename]

Quake 2 tools

Over the past few weeks (perhaps few months) I’ve been trying to create a few Quake 2 tools that can run on the browser from scratch. I’ve started working with a Pak extractor tool that should allow you to load a pak archive, page/search through all items, add/remove items from the archive and also allow you to preview each of the content types in the pak. After some trial and error I’ve managed to extract the Wav audio lumps and play it through the HTML 5 audio api. Now to get a bit more adventurous I’ve started looking into the Wal and Pcx lumps used for textures in Quake 2. Wal is a proprietary format created by Id software for the game and Pcx was a widely used format back when VGA graphics was popular. My attempt to extract Pcx image data and display it on the HTML canvas has been challenging. There is a lot of info online relating to Pcx file format, and in some cases how to attempt to read the data. In future posts I’ll try to document the methods I’ve used to load each of the lump formats.