#
# set up git aliases and functions
#
# Copyright © 2018 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
# Source repository: http://git.madduck.net/v/etc/zsh.git
#

alias g=git
alias g\?='alias -rm g g[a-z]'
alias gi='g init'
alias gl='g clone'
alias ga='g add'
alias gc='g commit'
alias gs='g status'
alias gd='g diff'
alias gg='g pull'
alias gr='g rebase'
alias gp='g push'

function gtestfile() {
  local fname="${1:-$(tempfile -d ${PWD})}"
  local fname="${fname##*/}"
  echo "${(%):-"%D{%c}"}" >| "$fname"
  ga "$fname"
  gc -m"add test file $fname"
}

# vim:ft=zsh