Skip to content

Commit e2f6c91

Browse files
authored
Rename binary to git-lazy-commit (#16)
Instead of providing a binary called git-lzc, which, while convenient, is not descriptive and shows a bias for what the shortcut should be, the binary is now called git-lazy-commit. For convenience, `git lzc` is now documented as a suggested alias. Resolves #15
1 parent 4082b1e commit e2f6c91

File tree

7 files changed

+30
-20
lines changed

7 files changed

+30
-20
lines changed

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Built assets
2-
git-lzc
3-
git-lzc-*
4-
!/cmd/git-lzc
2+
git-lazy-commit
3+
git-lazy-commit-*
4+
!/cmd/git-lazy-commit
5+
/dist/

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
FILES = $(shell find -type f -name '*.go')
22
DISTRIBUTIONS = darwin-amd64 linux-amd64 windows-amd64 openbsd-amd64 freebsd-amd64 netbsd-amd64 linux-386 windows-386 openbsd-386 freebsd-386 netbsd-386
3-
targets = $(foreach distribution,$(DISTRIBUTIONS),dist/git-lzc-$(distribution)$(if $(findstring windows,$(distribution)),.exe))
3+
targets = $(foreach distribution,$(DISTRIBUTIONS),dist/git-lazy-commit-$(distribution)$(if $(findstring windows,$(distribution)),.exe))
44

5-
git-lzc: $(FILES) go.mod go.sum
6-
go build ./cmd/git-lzc/
5+
git-lazy-commit: $(FILES) go.mod go.sum
6+
go build ./cmd/git-lazy-commit/
77

8-
$(targets): dist/git-lzc-%: $(FILES) go.mod go.sum
9-
GOOS=$(word 1, $(subst -, ,$*)) GOARCH=$(word 1, $(subst ., ,$(word 2, $(subst -, ,$*)))) go build -o $@ ./cmd/git-lzc/
8+
$(targets): dist/git-lazy-commit-%: $(FILES) go.mod go.sum
9+
GOOS=$(word 1, $(subst -, ,$*)) GOARCH=$(word 1, $(subst ., ,$(word 2, $(subst -, ,$*)))) go build -o $@ ./cmd/git-lazy-commit/
1010

1111
.PHONY: all
1212
all: $(targets)
1313

1414
.PHONY: install
15-
install: git-lzc
16-
cp git-lzc /usr/local/bin/
15+
install: git-lazy-commit
16+
cp git-lazy-commit /usr/local/bin/

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ Be lazy and just commit
99

1010
## Description
1111

12-
This provides the `git lzc` command. This command can be used
12+
This provides the `git lazy-commit` command. This command can be used
1313
in situations where you don't really care about choosing which
1414
changes to track or writing your commit message -- you just want to
1515
commit your work.
1616

17-
By its nature, `git lzc` can very easily add accidental changes
17+
By its nature, `git lazy-commit` can very easily add accidental changes
1818
to the git history if the user isn't careful. So, while this
1919
tool may be appealing to git beginners, its target audience is
2020
actually experienced git users who know when they want to break
@@ -23,13 +23,13 @@ the rules for creating good commits.
2323
### Staged Changes
2424

2525
If you have staged changes (`git add path/to/file`), then
26-
`git lzc` will commit those staged changes. If you *do not*
27-
have any staged changes, then `git lzc` will commit *all* changes,
26+
`git lazy-commit` will commit those staged changes. If you *do not*
27+
have any staged changes, then `git lazy-commit` will commit *all* changes,
2828
**including untracked files** (so be careful!).
2929

3030
### Commit Messages
3131

32-
`git lzc` will write your commit message for you. If you've changed
32+
`git lazy-commit` will write your commit message for you. If you've changed
3333
a single file, the commit message will look like this:
3434

3535
```
@@ -77,6 +77,15 @@ Invoke-WebRequest "https://raw.githubusercontent.com/spenserblack/git-lazy-commi
7777
### From GitHub Releases
7878

7979
Download the appropriate executable from the [release assets][latest-release],
80-
rename it to `git-lzc`, and add it to a location in `PATH`.
80+
rename it to `git-lazy-commit`, and add it to a location in `PATH`.
81+
82+
## Suggested Alias
83+
84+
`git lazy-commit` can be annoying to type frequently, so you can create an alias
85+
so that you only need to call `git lzc`.
86+
87+
```shell
88+
git config --global alias.lzc lazy-commit
89+
```
8190

8291
[latest-release]: https://github.com/spenserblack/git-lazy-commit/releases/latest

cmd/git-lzc/lzc.go renamed to cmd/git-lazy-commit/lazycommit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
)
1010

1111
var rootCmd = &cobra.Command{
12-
Use: "git-lzc",
12+
Use: "git-lazy-commit",
1313
Short: "Lazy Commit generates commit messages for you",
1414
Long: `Lazy Commit checks your git status, stages files if they're all unstaged,
1515
and generates a commit message for you.`,
File renamed without changes.

install.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ if ($Env:PROCESSOR_ARCHITECTURE -eq "x86") {
77
$arch = "amd64"
88
}
99

10-
Invoke-WebRequest -OutFile "$Env:ProgramFiles\Git\usr\bin\git-lzc.exe" -Uri "https://github.com/spenserblack/git-lazy-commit/releases/latest/download/git-lzc-windows-$arch.exe"
10+
Invoke-WebRequest -OutFile "$Env:ProgramFiles\Git\usr\bin\git-lazy-commit.exe" -Uri "https://github.com/spenserblack/git-lazy-commit/releases/latest/download/git-lazy-commit-windows-$arch.exe"

install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@ else
3131
exit 1
3232
fi
3333

34-
sudo wget -O "$INSTALL_DIR/git-lzc" "https://github.com/spenserblack/git-lazy-commit/releases/latest/download/git-lzc-$OS-$ARCH"
35-
sudo chmod +x "$INSTALL_DIR/git-lzc"
34+
sudo wget -O "$INSTALL_DIR/git-lazy-commit" "https://github.com/spenserblack/git-lazy-commit/releases/latest/download/git-lazy-commit-$OS-$ARCH"
35+
sudo chmod +x "$INSTALL_DIR/git-lazy-commit"

0 commit comments

Comments
 (0)