* cd: use gorelease --clean instead of --rm-dist
* cd: check brew tap has been installed after a release
* README.md: update ci/cd workflow badges
* README.md: add brew tap to install section
Closes#52
* .github: rename workflows to ci, cd and release
* .goreleaser: fix deprecation notices
* Goreleaser publishes tap to homebrew-arl
* .github: bump github-actions and go version to 1.20.x
* Update README.md
Updated the README with clearer information:
- an information about the refresh time -- I almost created a bug, because I'm a beginner on tmux and I didn't know this variable; so I think that an informative line about this can be useful
- a modification of an example that I didn't find necessarily clear because it didn't use the same context as the example given in the "Getting started" section
* Update README.md
Improve the line about status-interval
* Update README for installing with Go
On Go 1.17, `go get -u` as a method os installation locally was deprecated, and on 1.18 it completely fails to run. Switching to `go install github.com/arl/gitmux@latest` works as expected on 1.16+
Since now the clean flag is indepdendent from the number of
stashed entries, we need to show the stash count, even if the
working tree is clean.
Fix#66
* Bump gopkg.in/yaml v2 -> v3
* Add branch_trim_direction (default to right)
* tmux: remove Formater.remote()
Formater.remote() is just remoteBranch() followed by divergence()
* tmux: implement and test branch_trim_direction (left|right)
* tmux: s/BranchTrimDirection/BranchTrim
* README.md: update and add branch_trim
* tmux: remove dependency to testify
* tmux: use io.Discard in test
Fixes#55
* .travis: run tests with go1.17.x
* go.{mod,sum}: bump dependencies
* .gitignore: add dist/
* ci: run test on github-action
* ci: goreleaser runs on github action
* format/tmux: fix usage of tmux #fg=default string
Tmux format string `#fg=default` clears the foreground and is used
before applying styles to the elements of the gitmux format string.
Now, we only call `clear()` before an element that is actually being
printed.
Also we call `clear()` before printing non-keywords strings appearing in
`Config.Layout`.
Fix tests
* Update non-regression golden file
* format/tmux: add failing test for issue 32
As exposed in the added failing test, reproducing the issue 32, the
branch style only affect the branch symbol whereas it should affect both
affect the symbol and the branch name.
* format/tmux: branch style now affects both branch symbol+name
Fixes#32
* Fix tests and adapt for new behavior
`-timeout DUR` simply exist `gitmux` is it still running after DUR
amount of time.
DUR is parsed as a time.Duration with the special exception that 0
means no timeout.
Defaults to 0 = _no timeout_
Closes#35
* Cosmetics
* Add TestOutputNonRegression
This test ensures that new features do not change gitmux output
when used with a default configuration.
It loads a golden file ('testdata/default.output.golden') and
compares it with the actual output. -update updates the golden
file.
* format/tmux: breakdown `remote` into `remote-flags`+`divergence`
Currently the `remote` flags gets replaced by both the name of the
remote (e.g `origin`) and the divergence flags indicating whether the
local and the remote branch diverges and how much (e.g `↓·2↑·3`).
In order to allow user to skip the remote branch and to keep the
divergence flags, or the other way around, we add the `remote-branch` and
the `divergence` layout elements.
Also, to not break user configurations, we keep the 'remote' layout
element, and make it so that it's equivalent to setting `remote-flags`
and `divergence` consecutively.
Fixes#23
* format/tmux: replace `remote` with `branch+divergence` in default config
* Update README.md: improve the customizing section
Improve the Customizing section of the README
The 'staged' and 'untracked' symbols are both missing a trailing
space in the default configuration. With some fixed fonts (for
instance the stock Ubuntu font) this makes difficult to discern
between the symbol and the number following it.
Fixes#24
* changes from casonadams:
- added options in cfg file to show or hide remote information
- Consider possibility to choose/reorder/remove the info shown #14 fix
- updated test cases to accomidate changes to code base
- better docs, added second delm option, more flexible formatting
- fixed tests to run on travis CI
- fixed tests to run on travis CI
- adding README info for cfg options in dynamic layout output
- making display output not break if missing, plus making spacing strings more flexible
- adding usage in READ around display features
- fixed typo in README
* changes from salarkhan
- match string exactly, remove regexp
- don't call git, create a synthetic status to compare against
- use "Symbol-Thing" instead of the actual symbols, in case they change
- note that divergence is coupled to remote. maybe these should be split
- add empty test case
- no need to have a test for every single permutation, one example should suffice
* display -> layout
Co-authored-by: Cason Adams <casonadams@gmail.com>
When current directory was not a Git working tree, git command
were failing, as expected. But a recent commit made a change in
the error check function, and the program was not exit anymore in
the event of an error. Instead it was continuing with a bogus
gitstatus varriable, leading to panics. Unless running in -dbg
mode, those panic had no effect whatsoever and gitmux was usable
as before. It's just that the program was silently crashing
instead of silently terminating.
* Change default options to more sensible ones
Remove `-quiet` and `-fmt` option, replace them with `-dbg` since they
were only meant to be used if something went wrong.
* In debug mod, prints errors on stderr
* cosmetics
* Keep -q -fmt deprecated/unused options
* Improve README.md
* Update README.md
s/GiTmux/Gitmux
* Bump gitstatus
By bumping gitstatus to v0.4.2 we're now calling git with
GIT_OPTIONAL_LOCKS set to 0, ensuring gitstatus does not lock the
working tree for its operations, effectively giving higher
priority to user-initiated operations. This is useful when gitmux
is run in the background.
Fixes#9