From 903c75a4c28e27879fc0715b2f36e2990eff6aa9 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 8 Jan 2022 11:28:17 +0100 Subject: fix names --- Makefile | 2 +- git-fzf | 23 ----------------------- git-fzf.in | 23 +++++++++++++++++++++++ git-merge-diff | 11 ----------- git-merge-diff.in | 11 +++++++++++ git-push-first | 11 ----------- git-push-first.in | 11 +++++++++++ 7 files changed, 46 insertions(+), 46 deletions(-) delete mode 100755 git-fzf create mode 100755 git-fzf.in delete mode 100755 git-merge-diff create mode 100755 git-merge-diff.in delete mode 100755 git-push-first create mode 100755 git-push-first.in diff --git a/Makefile b/Makefile index 91a484c..4f21665 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,7 @@ DESTDIR = BINDIR = /usr/bin VERSION = 0.1 -BINS=make-permanently pdiff screen-r +BINS=git-fzf git-merge-diff git-push-first make-permanently pdiff screen-r all: $(BINS) diff --git a/git-fzf b/git-fzf deleted file mode 100755 index 9ce46e7..0000000 --- a/git-fzf +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -if [ "$1" = '--local' ] || [ "$1" = '-l' ]; then - shift - git_options='' - sed_prefix='' -else - git_options='--remote' - sed_prefix='origin/' -fi - -git branch ${git_options} 2>/dev/null \ -| sed ' - s@^..'"${sed_prefix}"'@@ - t - d -' \ -| fzf \ -| if [ "$#" -gt 0 ]; then - xargs -r git "$@" -else - cat -fi diff --git a/git-fzf.in b/git-fzf.in new file mode 100755 index 0000000..9ce46e7 --- /dev/null +++ b/git-fzf.in @@ -0,0 +1,23 @@ +#!/bin/bash + +if [ "$1" = '--local' ] || [ "$1" = '-l' ]; then + shift + git_options='' + sed_prefix='' +else + git_options='--remote' + sed_prefix='origin/' +fi + +git branch ${git_options} 2>/dev/null \ +| sed ' + s@^..'"${sed_prefix}"'@@ + t + d +' \ +| fzf \ +| if [ "$#" -gt 0 ]; then + xargs -r git "$@" +else + cat +fi diff --git a/git-merge-diff b/git-merge-diff deleted file mode 100755 index ad885de..0000000 --- a/git-merge-diff +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -up="$1" -shift -[ $# -gt 0 ] \ -&& [ -n "${1%%--*}" ] \ -&& down="$1" \ -&& shift \ -|| down=HEAD - -git diff "$(git merge-base "$up" "$down")" "$down" "$@" diff --git a/git-merge-diff.in b/git-merge-diff.in new file mode 100755 index 0000000..ad885de --- /dev/null +++ b/git-merge-diff.in @@ -0,0 +1,11 @@ +#!/bin/bash + +up="$1" +shift +[ $# -gt 0 ] \ +&& [ -n "${1%%--*}" ] \ +&& down="$1" \ +&& shift \ +|| down=HEAD + +git diff "$(git merge-base "$up" "$down")" "$down" "$@" diff --git a/git-push-first b/git-push-first deleted file mode 100755 index 26e50f4..0000000 --- a/git-push-first +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -eval "$( - git push 2>&1 \ - | sed ' - $d - ' \ - | sed -n ' - $p - ' -)" diff --git a/git-push-first.in b/git-push-first.in new file mode 100755 index 0000000..26e50f4 --- /dev/null +++ b/git-push-first.in @@ -0,0 +1,11 @@ +#!/bin/bash + +eval "$( + git push 2>&1 \ + | sed ' + $d + ' \ + | sed -n ' + $p + ' +)" -- cgit v1.2.3-70-g09d2