What is git hawser?

I found the change in my .gitconfig coincided with an update to github for mac exactly, which is why I labeled it as such in my repo.

As to what Hawser actually is, Github for mac has it bundled at the /Applications/GitHub.app/Contents/Resources/hawser/bin/git-hawser path.

running the executable with --help=false yields:

git-hawser/0.4.0 (GitHub; darwin amd64; git 2.3.0; go 1.3)

Usage: 
  git-hawser [flags]
  git-hawser [command]

Available Commands: 
  add                       Add an entry to .gitattributes
  clean                     Implements the Git clean filter
  env                       Show the current environment
  init                      Initialize the default Git Media configuration
  logs                      View error logs
  ls-files                  Show information about hawser files
  path                      Manipulate .gitattributes
  push                      Push files to the hawser endpoint
  rm                        Remove an entry from .gitattributes
  remove                    Remove an entry from .gitattributes
  smudge                    Implements the Git smudge filter
  status                    Show information about hawser files that would be pushed
  update                    Update local hawser configuration
  version                   Show the version number
  help [command]            Help about any command

 Available Flags:
      --help=false: help for git-hawser

Use "git-hawser help [command]" for more information about that command.

Running strings on a few executables in GitHub.app turns up the string git-media|hawser which in addition to the usage message firmly indicates that git-hawser is a fork or reimplementation of git-media used to store large files outside of the git repo, as github has a hard 100MB file size limit. I’m testing now to see what happens if you try and upload a huge file through GitHub.app.

Turns out that GitHub.app doesn’t use git-hawser automatically when dealing with large files, but strings reveals that it does have the ability to interact with a git-hawser process.

Installing the command line tools installs the github tool and git-hawser to /usr/local/bin. Running git-hawser version -c gives:

git-hawser/0.4.0 (GitHub; darwin amd64; git 2.3.3; go 1.3)
Nothing may see Gah Lak Tus and survive!

This seems related: https://github.com/blog/1986-announcing-git-large-file-storage-lfs

And lo, hawser filters were duplicated as lfs (large-file-support):

[filter "lfs"]
  clean = git lfs clean %f
  smudge = git lfs smudge %f
  required = true

Leave a Comment

tech