MattiSG MattiSG - 1 year ago 97
Git Question

What is git hawser?

I recently discovered my

had been appended these few additional lines:

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

Since it is version-controlled, I am sure I did not add them. It seems I am not the only one to have these lines.

git: 'hawser' is not a git command
git help
doesn't give any additional information.

So, what is this “hawser” filter?

Answer Source

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

running the executable with --help=false yields:

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

  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 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

Turns out that 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:

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
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download