Commit Graph

7 Commits

Author SHA1 Message Date
Eric Nielsen 21696a4f70 [git-info] Document that flag (e) is needed
so proper expansion of ref names occurs, due to changes done in 53a3cd7.
2018-12-21 22:48:54 -05:00
Eric Nielsen 5b90c96cd1 Update modules' README.md
Stick with the following style:

* Header 1 with the module name is in `lowercase`.
* Other headers are in `Sentence case`. Common header names that should
  be consistently used are `Aliases`, `Contributing`, `Functions`,
  `Settings`, and `Zsh options`.
* The names `Zim` and `Zsh` always appear capitalized, even in the
  middle of sentences.
* Prefer

      print 'code indented with 4 spaces'

  instead of
  ```zsh
  print 'code fenced by lines with three back-ticks'
  print 'unless you want syntax highlighting'
  ```
2018-12-17 14:11:16 -05:00
Eric Nielsen b7cb8d81c0 Update module README.md 2018-05-14 19:09:11 -05:00
Eric Nielsen 0df896c3f1 Change git-info verbose mode implementation
so it behaves alike the non-verbose mode. For example, in the "merge"
special action context, files are being reported as both indexed and
unindexed by `git diff-index` and `git diff-files` commands in
non-verbose mode. That was not the case with the regular expressions
used in the verbose mode.
2017-03-29 19:40:03 -07:00
Eric Nielsen 53aef5a05c Add diverged context to git-info
that, when defined, will be set if branch is both ahead and behind of
remote. If not defined, the `ahead` and `behind` contexts will still be
set, as how they worked previously.
2017-03-27 13:56:47 -07:00
Eric Nielsen 9f4c21cee8 Update git-info README.md
to fix the "Special Action Contexts" title mistakenly being "Untracked
Contexts", and other minor changes.
2017-01-16 10:26:17 -08:00
Eric Nielsen cabf368847 Add git-info module
based on the Prezto git module
[function](https://github.com/sorin-ionescu/prezto/blob/master/modules/git/functions/git-info)
and further refactored and simplified.

What changed:
- Commit format only in 'detached HEAD' state, so
  `$(coalesce "%b" "%c")` is not needed, because you only get one of
  those.
- Removed the `added`, `deleted`, `modified`, `renamed` and `unmerged`
  verbose contexts.
- `git status` is only used in verbose mode.
- In non-verbose mode, the `untracked` context is not available, and
  also untracked files are not considered for computing the `dirty`
  context. Using `git status` or checking for untracked files is
  [expensive](https://gist.github.com/sindresorhus/3898739).
2017-01-16 10:26:17 -08:00