gitnext: Checkout next revision. Opposite of 'checkout HEAD^'.

This commit is contained in:
Ole Tange 2016-08-13 20:35:07 +02:00
parent 774a5e5d67
commit 498e333232
4 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,4 @@
CMD = blink histogram upsidedown tracefile timestamp rand rrm goodpasswd CMD = blink histogram upsidedown tracefile timestamp rand rrm goodpasswd gitnext
all: blink/blink.1 goodpasswd/goodpasswd.1 histogram/histogram.1 rand/rand.1 rrm/rrm.1 timestamp/timestamp.1 tracefile/tracefile.1 upsidedown/upsidedown.1 wssh/wssh.1 all: blink/blink.1 goodpasswd/goodpasswd.1 histogram/histogram.1 rand/rand.1 rrm/rrm.1 timestamp/timestamp.1 tracefile/tracefile.1 upsidedown/upsidedown.1 wssh/wssh.1
@ -7,6 +7,6 @@ all: blink/blink.1 goodpasswd/goodpasswd.1 histogram/histogram.1 rand/rand.1 rrm
install: install:
mkdir -p /usr/local/bin mkdir -p /usr/local/bin
parallel eval ln -sf `pwd`/*/{} /usr/local/bin/{} ::: blink reniced em field forever neno rn stdout tracefile w4it-for-port-open upsidedown histogram goodpasswd mtrr not summer timestamp transpose wssh aptsearch rand rrm parallel eval ln -sf `pwd`/*/{} /usr/local/bin/{} ::: blink reniced em field forever neno rn stdout tracefile w4it-for-port-open upsidedown histogram goodpasswd mtrr not summer timestamp transpose wssh aptsearch rand rrm gitnext
mkdir -p /usr/local/share/man/man1 mkdir -p /usr/local/share/man/man1
parallel ln -sf `pwd`/{} /usr/local/share/man/man1/{/} ::: */*.1 parallel ln -sf `pwd`/{} /usr/local/share/man/man1/{/} ::: */*.1

4
README
View file

@ -4,10 +4,12 @@ Probably not useful for you, but then again you never now.
em - Force emacs to run in terminal. Use xemacs if installed. em - Force emacs to run in terminal. Use xemacs if installed.
field - Split on space. Give the given field number. Support syntax 1-3,6- field - Split on space. Give the given field number. Supports syntax 1-3,6-
forever - Run the same command or list of commands every second. forever - Run the same command or list of commands every second.
gitnext - Checkout next revision. Opposite of 'checkout HEAD^'.
neno - No error no output. Only print STDERR and STDOUT if the command fails. neno - No error no output. Only print STDERR and STDOUT if the command fails.
rand - Generate (pseudo-)random data rand - Generate (pseudo-)random data

6
gitnext/gitnext Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
# Checkout next revision
# Opposite of 'checkout HEAD^'
git checkout $(git log --reverse --ancestry-path HEAD..master|head -n 1|field 2)

View file

@ -25,8 +25,8 @@
# to the extent permitted by law. # to the extent permitted by law.
print() { print() {
cat $TMP/stderr >&4
cat $TMP/stdout >&3 cat $TMP/stdout >&3
cat $TMP/stderr >&4
} }
cleanup() { cleanup() {