Skip to content

Commit

Permalink
rename hawser => git-lfs
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Mar 19, 2015
1 parent 550e2a9 commit e37b695
Show file tree
Hide file tree
Showing 114 changed files with 425 additions and 443 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ bin/
benchmark/
.vendor/pkg
servertest
.vendor/src/github.com/hawser/git-hawser
.vendor/src/github.com/github/git-lfs

# only allow man/*.\d.ronn files
man/*
Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Contributing to Git Hawser
## Contributing to Git Large File Storage

Hi there! We're thrilled that you'd like to contribute to this project. Your
help is essential for keeping it great.
Expand Down Expand Up @@ -27,7 +27,7 @@ them as separate pull requests.

0. Update `Godeps`.
0. Run `script/vendor` to update the code in the `.vendor/src` directory.
0. Commit the change. Hawser vendors the full source code in the repository.
0. Commit the change. Git LFS vendors the full source code in the repository.
0. Submit a pull request.

## Resources
Expand All @@ -36,6 +36,6 @@ them as separate pull requests.
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
- [GitHub Help](https://help.github.com)

[fork]: https://github.com/hawser/git-hawser/fork
[pr]: https://github.com/hawser/git-hawser/compare
[fork]: https://github.com/github/git-lfs/fork
[pr]: https://github.com/github/git-lfs/compare
[style]: https://github.com/golang/go/wiki/CodeReviewComments
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
Git Hawser
Git Large File Storage
======

Git command line extension for managing large files. Hawser replaces large
files with text pointers inside Git, while storing the actual files in a remote
Hawser server.
Git LFS is a command line extension for managing large files. It replaces
large files with text pointers inside Git, while storing the actual files in a
remote Git LFS server.

The Git Hawser client is written in Go, with pre-compiled binaries available for
The Git LFS client is written in Go, with pre-compiled binaries available for
Mac, Windows, Linux, and FreeBSD.

See [CONTRIBUTING.md](CONTRIBUTING.md) for info on working on Hawser and sending
patches.
See [CONTRIBUTING.md](CONTRIBUTING.md) for info on working on Git LFS and
sending patches.

## Getting Started

Download the [latest client][rel] and run the included install script. The
installer should run `git hawser init` for you, which sets up Git's global
configuration settings for Hawser.
installer should run `git lfs init` for you, which sets up Git's global
configuration settings for Git LFS.

[rel]: https://github.com/hawser/git-hawser/releases
[rel]: https://github.com/github/git-lfs/releases

### Configuration

Hawser uses `.gitattributes` files to configure which are managed by Hawser.
Git LFS uses `.gitattributes` files to configure which are managed by Git LFS.
Here is a sample one that saves zips and mp3s:

$ cat .gitattributes
*.mp3 filter=hawser -crlf
*.zip filter=hawser -crlf
*.mp3 filter=lfs -crlf
*.zip filter=lfs -crlf

Hawser can help manage the paths:
Git LFS can help manage the paths:

$ git hawser add "*.mp3"
$ git lfs add "*.mp3"
Adding path *.mp3

$ git hawser add "*.zip"
$ git lfs add "*.zip"
Adding path *.zip

$ git hawser path
$ git lfs path
Listing paths
*.mp3 (.gitattributes)
*.zip (.gitattributes)

$ git hawser remove "*.zip"
$ git lfs remove "*.zip"
Removing path *.zip

$ git hawser path
$ git lfs path
Listing paths
*.mp3 (.gitattributes)

Expand All @@ -55,9 +55,9 @@ Once setup, you're ready to push some commits.
$ git add my.zip
$ git commit -m "add zip"

You can confirm that Hawser is managing your zip file:
You can confirm that Git LFS is managing your zip file:

$ git hawser ls-files
$ git lfs ls-files
my.zip

Once you've made your commits, push your files to the Git remote.
Expand All @@ -70,7 +70,7 @@ Once you've made your commits, push your files to the Git remote.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 548 bytes | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
To https://github.com/hawser/hawser-test
To https://github.com/github/git-lfs-test
67fcf6a..47b2002 master -> master

See the [Hawser overview](https://github.com/hawser/git-hawser/tree/master/docs) and [man pages](https://github.com/hawser/git-hawser/tree/master/docs/man).
See the [Git LFS overview](https://github.com/github/git-lfs/tree/master/docs) and [man pages](https://github.com/github/git-lfs/tree/master/docs/man).
2 changes: 1 addition & 1 deletion cmd/git-hawser.go → cmd/git-lfs.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
"github.com/hawser/git-hawser/commands"
"github.com/github/git-lfs/commands"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions commands/clean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestClean(t *testing.T) {

cmd := repo.Command("clean", "somefile")
cmd.Input = bytes.NewBufferString(content)
cmd.Output = `version https://hawser.github.com/spec/v1
cmd.Output = `version https://git-lfs.github.com/spec/v1
oid sha256:` + oid + `
size 3`

Expand All @@ -32,7 +32,7 @@ size 3`

cmd = repo.Command("clean")
cmd.Input = bytes.NewBufferString(content)
cmd.Output = `version https://hawser.github.com/spec/v1
cmd.Output = `version https://git-lfs.github.com/spec/v1
oid sha256:` + oid + `
size 3`
customHook := []byte("echo 'yo'")
Expand Down
8 changes: 4 additions & 4 deletions commands/command_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package commands

import (
"fmt"
"github.com/hawser/git-hawser/hawser"
"github.com/github/git-lfs/lfs"
"github.com/spf13/cobra"
"io"
"os"
Expand All @@ -18,10 +18,10 @@ var (
)

func addCommand(cmd *cobra.Command, args []string) {
hawser.InstallHooks(false)
lfs.InstallHooks(false)

if len(args) < 1 {
Print("git hawser path add <path> [path]*")
Print("git lfs path add <path> [path]*")
return
}

Expand Down Expand Up @@ -52,7 +52,7 @@ func addCommand(cmd *cobra.Command, args []string) {
continue
}

_, err := attributesFile.WriteString(fmt.Sprintf("%s filter=hawser -crlf\n", t))
_, err := attributesFile.WriteString(fmt.Sprintf("%s filter=lfs -crlf\n", t))
if err != nil {
Print("Error adding path %s", t)
continue
Expand Down
12 changes: 6 additions & 6 deletions commands/command_clean.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package commands

import (
"github.com/hawser/git-hawser/hawser"
"github.com/hawser/git-hawser/pointer"
"github.com/github/git-lfs/lfs"
"github.com/github/git-lfs/pointer"
"github.com/spf13/cobra"
"os"
)
Expand All @@ -16,10 +16,10 @@ var (
)

func cleanCommand(cmd *cobra.Command, args []string) {
hawser.InstallHooks(false)
lfs.InstallHooks(false)

var filename string
var cb hawser.CopyCallback
var cb lfs.CopyCallback
var file *os.File
var fileSize int64
if len(args) > 0 {
Expand All @@ -29,7 +29,7 @@ func cleanCommand(cmd *cobra.Command, args []string) {
if err == nil && stat != nil {
fileSize = stat.Size()

localCb, localFile, err := hawser.CopyCallbackFile("clean", filename, 1, 1)
localCb, localFile, err := lfs.CopyCallbackFile("clean", filename, 1, 1)
if err != nil {
Error(err.Error())
} else {
Expand All @@ -51,7 +51,7 @@ func cleanCommand(cmd *cobra.Command, args []string) {
}

tmpfile := cleaned.File.Name()
mediafile, err := hawser.LocalMediaPath(cleaned.Oid)
mediafile, err := lfs.LocalMediaPath(cleaned.Oid)
if err != nil {
Panic(err, "Unable to get local media path.")
}
Expand Down
6 changes: 3 additions & 3 deletions commands/command_env.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commands

import (
"github.com/hawser/git-hawser/hawser"
"github.com/github/git-lfs/lfs"
"github.com/spf13/cobra"
)

Expand All @@ -14,7 +14,7 @@ var (
)

func envCommand(cmd *cobra.Command, args []string) {
config := hawser.Config
config := lfs.Config

if endpoint := config.Endpoint(); len(endpoint) > 0 {
Print("Endpoint=%s", endpoint)
Expand All @@ -24,7 +24,7 @@ func envCommand(cmd *cobra.Command, args []string) {
Print("Endpoint (%s)=%s", remote, config.RemoteEndpoint(remote))
}

for _, env := range hawser.Environ() {
for _, env := range lfs.Environ() {
Print(env)
}
}
Expand Down
10 changes: 5 additions & 5 deletions commands/command_init.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commands

import (
"github.com/hawser/git-hawser/hawser"
"github.com/github/git-lfs/lfs"
"github.com/spf13/cobra"
)

Expand All @@ -20,19 +20,19 @@ var (
)

func initCommand(cmd *cobra.Command, args []string) {
if err := hawser.InstallFilters(); err != nil {
if err := lfs.InstallFilters(); err != nil {
Error(err.Error())
}

if hawser.InRepo() {
if lfs.InRepo() {
initHooksCommand(cmd, args)
}

Print("git hawser initialized")
Print("git lfs initialized")
}

func initHooksCommand(cmd *cobra.Command, args []string) {
if err := hawser.InstallHooks(false); err != nil {
if err := lfs.InstallHooks(false); err != nil {
Error(err.Error())
}
}
Expand Down
14 changes: 7 additions & 7 deletions commands/command_logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package commands

import (
"errors"
"github.com/hawser/git-hawser/hawser"
"github.com/github/git-lfs/lfs"
"github.com/spf13/cobra"
"io/ioutil"
"os"
Expand Down Expand Up @@ -64,7 +64,7 @@ func logsShowCommand(cmd *cobra.Command, args []string) {
}

name := args[0]
by, err := ioutil.ReadFile(filepath.Join(hawser.LocalLogDir, name))
by, err := ioutil.ReadFile(filepath.Join(lfs.LocalLogDir, name))
if err != nil {
Exit("Error reading log: %s", name)
}
Expand All @@ -74,23 +74,23 @@ func logsShowCommand(cmd *cobra.Command, args []string) {
}

func logsClearCommand(cmd *cobra.Command, args []string) {
err := os.RemoveAll(hawser.LocalLogDir)
err := os.RemoveAll(lfs.LocalLogDir)
if err != nil {
Panic(err, "Error clearing %s", hawser.LocalLogDir)
Panic(err, "Error clearing %s", lfs.LocalLogDir)
}

Print("Cleared %s", hawser.LocalLogDir)
Print("Cleared %s", lfs.LocalLogDir)
}

func logsBoomtownCommand(cmd *cobra.Command, args []string) {
Debug("Debug message")
err := hawser.Errorf(errors.New("Inner error message!"), "Error!")
err := lfs.Errorf(errors.New("Inner error message!"), "Error!")
Panic(err, "Welcome to Boomtown")
Debug("Never seen")
}

func sortedLogs() []string {
fileinfos, err := ioutil.ReadDir(hawser.LocalLogDir)
fileinfos, err := ioutil.ReadDir(lfs.LocalLogDir)
if err != nil {
return []string{}
}
Expand Down
8 changes: 4 additions & 4 deletions commands/command_ls_files.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package commands

import (
"github.com/hawser/git-hawser/git"
"github.com/hawser/git-hawser/scanner"
"github.com/github/git-lfs/git"
"github.com/github/git-lfs/scanner"
"github.com/spf13/cobra"
)

var (
lsFilesCmd = &cobra.Command{
Use: "ls-files",
Short: "Show information about hawser files",
Short: "Show information about Git LFS files",
Run: lsFilesCommand,
}
)
Expand All @@ -29,7 +29,7 @@ func lsFilesCommand(cmd *cobra.Command, args []string) {

pointers, err := scanner.Scan(ref, "")
if err != nil {
Panic(err, "Could not scan for hawser files")
Panic(err, "Could not scan for Git LFS files")
}

for _, p := range pointers {
Expand Down
Loading

0 comments on commit e37b695

Please sign in to comment.