diff --git a/.config/git/config b/.config/git/config index 2d50da6..e5de836 100644 --- a/.config/git/config +++ b/.config/git/config @@ -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" diff --git a/.config/git/config-data b/.config/git/config-data deleted file mode 100644 index 012c76b..0000000 --- a/.config/git/config-data +++ /dev/null @@ -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 diff --git a/.config/shell/git b/.config/shell/git index 570bbcd..814e7b7 100644 --- a/.config/shell/git +++ b/.config/shell/git @@ -21,15 +21,17 @@ gcn() { fulldir="$(realpath ${1:-$PWD})" dir="${fulldir#$root/*/}" else - dir="notes/$1" + dir="box/$1" fulldir="$root/2-standards/$dir" fi else fulldir="$(realpath ${1:-$PWD})" dir="${fulldir#$root/}" fi - echo "$dir:" >/tmp/gcn-msg - git commit -v --template /tmp/gcn-msg ${@:2} -- $fulldir + echo "$dir: " >/tmp/gcn-msg + 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 diff --git a/.config/yadm/gitconfig b/.config/yadm/gitconfig index b182aa8..121f8e8 100644 --- a/.config/yadm/gitconfig +++ b/.config/yadm/gitconfig @@ -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 diff --git a/.local/bin/scripts/git-moves b/.local/bin/scripts/git-moves index 60fcb2f..95dd6a7 100755 --- a/.local/bin/scripts/git-moves +++ b/.local/bin/scripts/git-moves @@ -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