1
0
Fork 0
mirror of synced 2024-11-10 10:28:58 -05:00
Commit graph

14 commits

Author SHA1 Message Date
Oskar Grunning
dc6ef566af [git] Add aliases for merge sign and verify
Adds the following aliases:
  - gmS: GPG-sign the resulting merge commit.
  - gmV: Verify that the tip commit of the side branch being merged is
  signed with a valid key, i.e. a key that has a valid uid: in the
  default trust model, this means the signing key has been signed by a
  trusted key. If the tip commit of the side branch is not signed with a
  valid key, the merge is aborted.

Closes #333
2019-03-22 08:35:42 -05:00
Eric Nielsen
d2c1e613ae [git] Allow aliases prefix to be something else than g
There were a couple of reports before about aliases shadowing commands
in #59 and #139. And I was impressed to check how many actually shadow existing commands using Ubuntu's command-not-found:

    'gb'  : apt install gb
    'gc'  : apt install graphviz
    'gcp' : apt install gcp
    'gcs' : apt install opengcs
    'gcv' : apt install scotch
    'gdc' : apt install gdc
    'gfm' : apt install gfm
    'gid' : apt install id-utils
    'gld' : apt install postfix-gld
    'gm'  : apt install graphicsmagick
    'gmt' : apt install gmt
    'gp'  : apt install pari-gp
    'gpa' : apt install gpa
    'gpp' : apt install gpp
    'gpt' : apt install gpt
    'grc' : apt install grc
    'gri' : apt install gri
    'gs'  : apt install ghostscript
    'gsl' : apt install generator-scripting-language
    'gss' : apt install libgss-dev
    'gt'  : apt install genometools
    'gtv' : apt install smpeg-gtv
    'gwc' : apt install geneweb
    'gwd' : apt install geneweb

The ability to customize the prefix fixes this issue. Picking `G` for
example is a good one (Vim's Fugitive uses upper case `G` in the
beginning of is commands, to mention another place where it's used).

Closes zimfw/git#1

Copied from zimfw/git@b2a2ffbd31
2019-03-22 08:15:11 -05:00
Eric Nielsen
38b3b9517e [git] Add glr alias for git reflog
and change the commit format to bold yellow, since that's the default
git log format for the commit when colored.

Closes #334

Copied from zimfw/git@013c9d9bf3
2019-03-22 08:12:53 -05:00
Eric Nielsen
7ccdcf35ee [git] Add missing items in README.md
namely, the `gfu` alias, the `git-branch-delete-interactive` function,
and a couple of commands that are shadowed.

Command `gm` was reported in #59, and `grc` was reported in #139.
2018-12-13 14:47:25 -05:00
Ezinwa Okpoechi
7dfd617497 [git] Make gpf alias safer
Fixes #303. Closes #304.

As a reference,
https://github.com/k88hudson/git-flight-rules/blob/master/README.md#i-want-to-delete-or-remove-my-last-commit
also recommends using --force-with-lease.
2018-11-20 18:45:03 -05:00
Eric Nielsen
b7cb8d81c0 Update module README.md 2018-05-14 19:09:11 -05:00
Eric Nielsen
20f16e4df3 [git] Remove glb alias and add glO
as there's actually no "brief" format originally in git (by "originally"
I mean the ones listed for `--format=<format>` in `man git-log`).
Also, we already fit in `glG` all the information that `glb` had.
So add `glO`, that is a one-line variant of `glG`.
Now we get nice symmetrical formats in `glg`/`glG` and in `glo`/`glO`.
2018-02-23 09:30:50 +01:00
Eric Nielsen
926627652f [git] Breaking changes in aliases and functions
Rename `gpS` (mnemonic "pretty-signature") and `glS` ("log-signature")
to `gcv` ("commit-verify") and `glv` ("log-verify") respectivelly,
so `v` is used to verify signatures, and `s`/`S` is used to sign.

Remove `git-commit-lost` and `git-stash-dropped`, as this could be
probably joined into one function that shows all lost commits, including
lost stashes, and also because there seems to be many different ways to
do this, as discussed in https://stackoverflow.com/q/89332/2654518.
An answer worth noting is https://stackoverflow.com/a/6455586/2654518.
If someone is using this, let's discuss on a new solution...

Remove Oh-My-Zsh compatibility from `git-branch-current`, and delete
`git_current_branch`. This compatibility was already partially broken at
c1b02c0, when we also updated the gitster prompt theme. Now this
function fails when in 'detached HEAD' state (is was returning the
commit hash in this state), which is what we would expect from the use
we make of it.

Closes #244
2018-02-23 09:28:10 +01:00
Eric Nielsen
c501a1b64c [git] Review aliases and README.md
This complements the changes done in the last commit, and also fixes the
`glg` output, and removes the now unnecessary `--date=relative`
parameter from `glG`.

Although I insisted on the `--long-option` format on 8669a4f, I think
`rm -rf` is pretty common and recognizable, so revert to that.

Add missing aliases to README.md, and improve description of existing
ones. The main improvement is trying to be more concise, so instead of
repeating "records changes to the repository" multiple times, simply say
"commits", for example. Also try to use words that match the alias
letters, so for "gcs" say "shows" instead of "displays", for example.
2018-01-11 11:30:20 -05:00
Eric Nielsen
0a7451999e [git] Review all functions but ones using git fsck
as there are multiple solutions to list the lost commits and stashes,
but I could not find reliable ones. See
https://stackoverflow.com/q/89332/2654518.
Well, the current `git-commit-lost` and `git-stash-dropped`
implementations don't accurately work at least on the repositories I'm
working with.

The `git-hub` functions where removed at dcc3265, but aliases and docs
remained. Remove these.

Remove line break from `_git_log_oneline_format`, so it really occupies
one line. And change date format in `glG` output from committer date
(`%cd`) to relative author date (`%ar`) to conform with other formats.

Refactor remaining functions. Most of the changes refer to using the
already existing git error messages and return codes, instead of having
code that creates that. (Error messages for 'not in a git repository'
where not even consistent among functions, and there's were I started
this...)
The most drastic changes can be seen in `git-root`, then in `git-dir`
and `git-stash-clear-interactive`.
2018-01-10 10:25:25 -05:00
Eric Nielsen
c1b02c06d0 Remove git_prompt_info and parse_git_dirty
as they were only being used by gitster prompt theme and kept for
Oh-My-Zsh compatibility. The newly introduced git-info module (inspired
by the git-info Prezto function) provides a more powerful
implementation than the Oh-My-Zsh inspired git_prompt_info.

Updated gitster to use the git-info module.

Closes #124
2017-01-19 05:10:19 -08:00
Igor Zibarev
3c0e49a770 [git] add aliases: stash unapply and full graph
Added git aliases:
- "gsu": Stash unapply to revert applied changes
- "glG": Full graph (like glg but with author and date)

Closes #53
2016-05-14 15:26:03 -07:00
Matt Hamilton
3e6785c993 add oh-my-zsh theme compatibility git funcs 2015-12-18 09:45:36 -05:00
Matt Hamilton
014ca7cdcd add git documentation 2015-12-15 02:29:48 -05:00