--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/inplace Wed Dec 19 10:14:19 2018 -0500
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+FILE="$1"
+shift
+
+PROG="$1"
+shift
+
+cp "$FILE" "$FILE".orig
+cat "$FILE" | "$PROG" "$@" | sponge "$FILE"
+
--- a/fish/config.fish Sun Dec 16 15:23:34 2018 -0500
+++ b/fish/config.fish Wed Dec 19 10:14:19 2018 -0500
@@ -142,7 +142,7 @@
set_color normal
printf ' on '
set_color magenta
- printf '%s' (git currentbranch ^/dev/null)
+ printf '%s' (git current-branch ^/dev/null)
set_color green
git_prompt_status
set_color normal
--- a/gitconfig Sun Dec 16 15:23:34 2018 -0500
+++ b/gitconfig Wed Dec 19 10:14:19 2018 -0500
@@ -61,7 +61,7 @@
delete-branch = "!sh -c 'git delete-local-branch $1; git remotes | cut -f1 | sort | uniq | xargs -n1 -I % git delete-local-reference-to-remote-branch % $1' -"
delete-current-branch = "!bash -c 'git checkout master && git delete-branch $1' - $(git currentbranch)"
- currentbranch = rev-parse --abbrev-ref HEAD
+ current-branch = rev-parse --abbrev-ref HEAD
fo = fetch origin
fu = fetch upstream
@@ -86,49 +86,12 @@
find-merge = "!sh -c 'git log $1..master --merges -n1' -"
- fuck-up-history-from = pull --rebase
-
import-patch = am
untracked = "!sh -c 'git status -s | grep -E '''^[?][?] '''' | cuts -f2"
purge = "!sh -c 'git untracked && confirm && git actually-purge'"
actually-purge = "!sh -c 'git untracked | xargs rm'"
- g = !git fuum
-
- ; BEGIN KALEIDOSCOPE SECTION
- ; GAZE INTO THE ABYSS
-
- ; Find all commits in the given ref that aren't also in master
- ; TODO: Make this take a second optional argument
- find-unmerged-commits = "!sh -c 'git log $1 --format='''%H''' --not master --' -"
- find-unmerged-commits-for = "!sh -c 'git log $1 --format='''%H''' --not $2 --' -"
-
- ; ksdiff is the bare kaleidoscope difftool alias
- ; ksdiffid is the one that expects $KSID to be set
- ksdiff = difftool -y -t Kaleidoscope
- ksdiffid = difftool -y -t KaleidoscopeWithId
-
- ; ksdiffwith opens a diff of (current revision)->(given revision)
- ksdiffwith = "!sh -c 'git ksdiff HEAD..$1' -"
-
- ; ksshow will open a single specific commit in kaleidoscope
- ; it includes the commit log info as a separate file
- ksshow = "!sh -c 'export KSID=`uuidgen`; git log -n1 $1 > .git/LOG_MESSAGE_$KSID; ksdiff --partial-changeset --UUID $KSID -- /dev/null .git/LOG_MESSAGE_$KSID; git ksdiffid $1^..$1; ksdiff --mark-changeset-as-closed $KSID' -"
-
- ; ksreview takes a branch, finds all commits in that branch that aren't
- ; merged into master, and opens them one-by-one with ksshow. It's good for
- ; reviewing pull requests.
- ksreview = "!sh -c 'git find-unmerged-commits $1 | xargs -n1 git ksshow' -"
- ksreviewfor = "!sh -c 'git find-unmerged-commits-for $1 $2 | xargs -n1 git ksshow' -"
-
- ; review takes a pull request URL and reviews it
- ; only works if you have the PR-fetching turned on and shit
- review = "!sh -c 'git fetch upstream && git ksreviewfor `echo $1 | sed -Ee \"s_.*pull/([0-9]+)_refs/pull/upstream/\\1_\"` upstream/master' -"
- reviewcombined = "!sh -c 'git fetch upstream && git ksdiff upstream/master `echo $1 | sed -Ee \"s_.*pull/([0-9]+)_refs/pull/upstream/\\1_\"`' -"
-
- ; END KALEIDOSCOPE SECTION
-
[push]
default = current
@@ -138,18 +101,6 @@
interactive = auto
status = auto
-[difftool "KaleidoscopeWithId"]
- cmd = ksdiff --partial-changeset --UUID \"$KSID\" --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
-
-[difftool "Kaleidoscope"]
- cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
-
-[difftool]
- prompt = false
-
-[diff]
- tool = Kaleidoscope
-
[merge]
tool = splice
@@ -157,10 +108,6 @@
cmd = "nvim -f $BASE $LOCAL $REMOTE $MERGED -c 'SpliceInit'"
trustExitCode = true
-[mergetool "Kaleidoscope"]
- cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
- trustExitCode = true
-
[mergetool "unity"]
trustExitCode = false
cmd = '/Applications/Unity/Unity.app/Contents/Tools/UnityYAMLMerge' merge -p "$BASE" "$REMOTE" "$LOCAL" "$MERGED"