mirror of
https://github.com/Stunkymonkey/dotfiles.git
synced 2025-09-13 22:12:04 +02:00
Compare commits
No commits in common. "808243babc2fdb6a51202a1b152eadf2c1907beb" and "21c425b441340726965d19d57c0717e4fd358bf1" have entirely different histories.
808243babc
...
21c425b441
4 changed files with 2 additions and 60 deletions
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Git automatic range diff
|
||||
|
||||
# Enforce being in a git repository
|
||||
git rev-parse --is-inside-work-tree >/dev/null || exit $?
|
||||
|
||||
# We actually should check out the head branch via `git remote show ${REMOTE}`,
|
||||
# but this requires active connection and active 2FA verification. Tedious to
|
||||
# have multiple calls for this
|
||||
if git rev-parse --verify main &>/dev/null; then
|
||||
MAIN_BRANCH=main
|
||||
else
|
||||
MAIN_BRANCH=master
|
||||
fi
|
||||
|
||||
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
GIT_REMOTE=origin
|
||||
|
||||
# Show the next command
|
||||
set -x
|
||||
|
||||
git range-diff "${GIT_REMOTE}/${MAIN_BRANCH}..${GIT_REMOTE}/${CURRENT_BRANCH}" "${MAIN_BRANCH}..${CURRENT_BRANCH}"
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Enforce being in a git repository
|
||||
git rev-parse --is-inside-work-tree >/dev/null || exit $?
|
||||
|
||||
# save as i.e.: git-authors and set the executable flag
|
||||
git ls-tree -r -z --name-only HEAD -- "${1}" \
|
||||
| xargs -0 -n1 git blame --line-porcelain HEAD \
|
||||
|
@ -10,3 +7,4 @@ git ls-tree -r -z --name-only HEAD -- "${1}" \
|
|||
| sort \
|
||||
| uniq -c \
|
||||
| sort -nr
|
||||
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Automatically start a rebase for all commits between HEAD and the main
|
||||
# branch without integrating new commits from the main branch
|
||||
#
|
||||
# Technically it's a git rebase without rebasing any commits.
|
||||
|
||||
# Enforce being in a git repository
|
||||
git rev-parse --is-inside-work-tree >/dev/null || exit $?
|
||||
|
||||
# We actually should check out the head branch via `git remote show ${REMOTE}`,
|
||||
# but this requires active connection and active 2FA verification. Tedious to
|
||||
# have multiple calls for this
|
||||
if git rev-parse --verify main &>/dev/null; then
|
||||
MAIN_BRANCH=main
|
||||
else
|
||||
MAIN_BRANCH=master
|
||||
fi
|
||||
|
||||
CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
|
||||
|
||||
if [ "${CURRENT_BRANCH}" = "${MAIN_BRANCH}" ]; then
|
||||
echo "Cannot rebase commits from '${CURRENT_BRANCH}' (HEAD) onto '${MAIN_BRANCH}'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MERGE_BASE="$(git merge-base "${MAIN_BRANCH}" HEAD)"
|
||||
|
||||
# Show the next command
|
||||
set -x
|
||||
|
||||
git rebase --interactive "${MERGE_BASE}"
|
|
@ -76,8 +76,6 @@
|
|||
- link:
|
||||
~/.local/bin/host-is-on: bin/host-is-on.sh
|
||||
~/.local/bin/git-authors: bin/git-authors.sh
|
||||
~/.local/bin/git-ard: bin/git-ard.sh
|
||||
~/.local/bin/git-rewrite-commits: bin/git-rewrite-commits.sh
|
||||
~/.local/bin/clean: bin/clean.sh
|
||||
|
||||
# systemd
|
||||
|
@ -90,3 +88,4 @@
|
|||
|
||||
- link:
|
||||
~/.local/bin/diff-so-fancy: git/diff-so-fancy/diff-so-fancy
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue