config/git: clean up, incorporating moves with gcn
This commit is contained in:
parent
7ef49491db
commit
6a437be8af
|
@ -82,7 +82,7 @@
|
|||
# status
|
||||
s = !git stl && git stb
|
||||
st = stb .
|
||||
stb = status --short --branch
|
||||
stb = status --short --branch --find-renames=.2
|
||||
sv = --paginate status -v
|
||||
svv = --paginate status -vv
|
||||
|
||||
|
@ -190,6 +190,3 @@
|
|||
|
||||
[includeIf "gitdir:yadm/repo.git"]
|
||||
path = "~/.config/yadm/gitconfig"
|
||||
|
||||
[includeIf "gitdir:~/data/.git"]
|
||||
path = "config-data"
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
[alias]
|
||||
journal = !git add $(git root)/2-standards/notes/journal && git cme "notes/journal:" $(git root)/2-standards/notes/journal
|
||||
note = !git cme "notes:" $(git root)/2-standards/notes
|
||||
write = !git add $(git root)/2-standards/writing && git cme "write:" $(git root)/2-standards/writing
|
|
@ -21,7 +21,7 @@ gcn() {
|
|||
fulldir="$(realpath ${1:-$PWD})"
|
||||
dir="${fulldir#$root/*/}"
|
||||
else
|
||||
dir="notes/$1"
|
||||
dir="box/$1"
|
||||
fulldir="$root/2-standards/$dir"
|
||||
fi
|
||||
else
|
||||
|
@ -29,7 +29,9 @@ gcn() {
|
|||
dir="${fulldir#$root/}"
|
||||
fi
|
||||
echo "$dir: " >/tmp/gcn-msg
|
||||
git commit -v --template /tmp/gcn-msg ${@:2} -- $fulldir
|
||||
git add $fulldir
|
||||
git moves -q
|
||||
git commit -v --template /tmp/gcn-msg ${@:2} #-- $fulldir
|
||||
}
|
||||
|
||||
# if in home or under XDG_CONFIG_HOME and not within a git directory, replace git by yadm
|
||||
|
@ -67,15 +69,6 @@ gitretag() {
|
|||
git push origin refs/tags/${1}:refs/tags/${2} :refs/tags/$1 && git tag -d $1
|
||||
}
|
||||
|
||||
# Open or select a project
|
||||
project() {
|
||||
cd $projects_dir
|
||||
if [ -d $2 ]
|
||||
then cd "$2" && gitorigin "$@"
|
||||
else gitclone "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
# Rewriting history {{{
|
||||
|
||||
# gets the AuthorDate of a given committish
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[alias]
|
||||
cgit = !yadm cme "config/git:" $XDG_CONFIG_HOME/git $CONFIG_SHELLS/git $HOME/.local/bin/scripts/git-*
|
||||
cf = !yadm cme "bin:" $CONFIG_SHELLS/functions $HOME/.local/bin/scripts
|
||||
cshell = !yadm cme "config/shell:" $CONFIG_SHELLS $HOME/.zprofile
|
||||
cf = !yadm cme "bin:" $CONFIG_SHELLS/functions $HOME/.local/bin/scripts
|
||||
cbin = !yadm cme "bin:" $HOME/.local/bin/scripts
|
||||
|
|
|
@ -6,4 +6,4 @@ git add "$root"
|
|||
git status --porcelain --find-renames=.2 |
|
||||
grep -vf /tmp/staged | cut -c4- | sed 's/ -> /\n/' |
|
||||
xargs git -C "$root" restore --staged
|
||||
git status -s --find-renames=.2
|
||||
test "$1" = "-q" || git status --short --find-renames=.2
|
||||
|
|
Loading…
Reference in New Issue