aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%/.bash_utils/git.sh
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2022-04-02 08:51:52 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2022-04-02 13:39:59 +0300
commitbb25466e394456cca34733c7e8e91af5567fedef (patch)
treee832736341366386ac43a8804e80c3b296414df6 /%HOME%/.bash_utils/git.sh
parentbash: best practices & linting (diff)
downloadlinux-home-bb25466e394456cca34733c7e8e91af5567fedef.tar.gz
linux-home-bb25466e394456cca34733c7e8e91af5567fedef.zip
bash: remove unused or low-value stuff
Diffstat (limited to '%HOME%/.bash_utils/git.sh')
-rw-r--r--%HOME%/.bash_utils/git.sh38
1 files changed, 1 insertions, 37 deletions
diff --git a/%HOME%/.bash_utils/git.sh b/%HOME%/.bash_utils/git.sh
index 021e0e8..5095610 100644
--- a/%HOME%/.bash_utils/git.sh
+++ b/%HOME%/.bash_utils/git.sh
@@ -8,8 +8,6 @@
alias branch_files='git ls-tree -r --name-only HEAD'
alias branch_dirs='git ls-tree -r --name-only HEAD -d'
-alias repo_branches='git for-each-ref '"'"'--format=%(refname:short)'"'"' refs/heads/'
-
workdir_is_clean() (
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit
@@ -23,9 +21,6 @@ workdir_is_clean() (
fi
)
-alias workdir_clean_all='git clean -fdx'
-alias workdir_clean_ignored='git clean -fdX'
-
branch_eol_normalized() (
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit lastpipe
@@ -62,28 +57,6 @@ branch_eol_normalized() (
return "$normalized"
)
-repo_eol_normalized() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit lastpipe
-
- workdir_is_clean
-
- local branch
- repo_branches | while IFS= read -r branch; do
- git checkout --quiet "$branch"
- branch_eol_normalized "$branch"
- done
-)
-
-workdir_tighten_permissions() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
-
- branch_files -z | xargs -0 -- chmod 0600 --
- branch_dirs -z | xargs -0 -- chmod 0700 --
- chmod 0700 .git
-)
-
branch_doslint() (
set -o errexit -o nounset -o pipefail
shopt -s inherit_errexit lastpipe
@@ -117,7 +90,7 @@ branch_backup() (
shopt -s inherit_errexit
local repo_dir
- repo_dir="$( pwd )"
+ repo_dir="$( git rev-parse --show-toplevel )"
local repo_name
repo_name="$( basename -- "$repo_dir" )"
local backup_dir="$repo_dir"
@@ -138,12 +111,3 @@ branch_backup() (
--remote="$repo_dir" \
HEAD
)
-
-branch_backup_dropbox() (
- set -o errexit -o nounset -o pipefail
- shopt -s inherit_errexit
-
- branch_backup "$USERPROFILE/Dropbox/backups"
-)
-
-alias branch_fixup_committer_dates='git filter-branch --force --env-filter '"'"'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'"'"