aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/%HOME%
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-01-24 17:29:28 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-01-24 17:29:28 +0300
commit69ab55ff3f34b40a83dca2b4f8394b5fd0f42611 (patch)
treead1e12a0f03661ebe5b506b6da1a318b82e8b6db /%HOME%
parent.gitconfig: no more external scripts (diff)
downloadlinux-home-69ab55ff3f34b40a83dca2b4f8394b5fd0f42611.tar.gz
linux-home-69ab55ff3f34b40a83dca2b4f8394b5fd0f42611.zip
no more git-* in .local/bin
Good riddance.
Diffstat (limited to '%HOME%')
-rw-r--r--%HOME%/.local/bin/git-fixup-old58
-rw-r--r--%HOME%/.local/bin/git-pulll-old8
2 files changed, 0 insertions, 66 deletions
diff --git a/%HOME%/.local/bin/git-fixup-old b/%HOME%/.local/bin/git-fixup-old
deleted file mode 100644
index 3883f10..0000000
--- a/%HOME%/.local/bin/git-fixup-old
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright (c) 2018 Egor Tensin <Egor.Tensin@gmail.com>
-# This file is part of the "Linux/Cygwin environment" project.
-# For details, see https://github.com/egor-tensin/linux-home.
-# Distributed under the MIT License.
-
-set -o errexit -o nounset -o pipefail
-
-if ! git rev-parse --is-inside-work-tree > /dev/null 2>&1 ; then
- echo 'Not inside a Git repository.' >&2
- exit 1
-fi
-
-if ! git rev-parse HEAD > /dev/null 2>&1 ; then
- echo "Where's your HEAD?" >&2
- exit 1
-fi
-
-has_staged_changes=
-git diff --cached --ignore-submodules --quiet || has_staged_changes=1
-
-has_unstaged_changes=
-git diff --ignore-submodules --quiet || has_unstaged_changes=1
-
-if [ -z "$has_staged_changes" ] && [ -z "$has_unstaged_changes" ]; then
- echo 'No staged or unstaged changes, seemingly?' >&2
- exit 1
-fi
-
-add=-a
-[ -n "$has_staged_changes" ] && add=
-
-numof_parents="$( git rev-list --parents -n 1 HEAD | wc --words )"
-if [ "$numof_parents" -eq 1 ]; then
- dest_ref=--root
-elif [ "$numof_parents" -eq 2 ]; then
- dest_ref='HEAD^^'
-else
- echo 'Sure you want to fixup a merge commit?' >&2
- exit 1
-fi
-
-git commit $add --fixup=HEAD
-
-stash=
-[ -n "$has_staged_changes" ] && [ -n "$has_unstaged_changes" ] && stash=1
-
-unstash() {
- git stash pop --quiet
-}
-
-if [ -n "$stash" ]; then
- git stash push --quiet
- trap unstash EXIT
-fi
-
-GIT_EDITOR=true git rebase -i --autosquash "$dest_ref"
diff --git a/%HOME%/.local/bin/git-pulll-old b/%HOME%/.local/bin/git-pulll-old
deleted file mode 100644
index 79299e5..0000000
--- a/%HOME%/.local/bin/git-pulll-old
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-
-# This is cool:
-# https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407
-
-git pull "$@" \
- && git submodule sync --recursive \
- && git submodule update --init --recursive