Skip to content

Instantly share code, notes, and snippets.

View uprego's full-sized avatar
😡
Pissed off

uprego

😡
Pissed off
View GitHub Profile
@uprego
uprego / gitk multi stash patch - wheezy and jessie
Last active May 7, 2017 10:07
Surprisingly simple multi stash patch for gitk. Works for gitk as it comes in Debian 7 and 8. Known caveat: shows stashes even running `gitk` without the --all switch, in contrast to the standard behavior. See also an improved version at https://gist.github.com/uprego/600445d4f4633113c3ed0ff24994bbed which solves the caveat and also does not dep…
$ diff -u /usr/bin/gitk-deb8-vanilla /usr/bin/gitk-deb8-multistash
--- /usr/bin/gitk-deb8-vanilla 2016-08-29 10:07:06.507344629 +0200
+++ /usr/bin/gitk-deb8-multistash 2016-09-08 14:36:35.382476634 +0200
@@ -401,6 +401,11 @@
if {$vcanopt($view)} {
set revs [parseviewrevs $view $vrevs($view)]
+ set stashesfd [open [concat | gitk-stash-list-ids.sh] r]
+ while {[gets $stashesfd stashline] >= 0} {
+ set revs [lappend revs $stashline]
@uprego
uprego / gitk multi stash patch - a4685d2f58e2230d4e27fb2ee581d7ea35e5d046~master@git:__ozlabs.org_~paulus_gitk
Last active October 14, 2017 17:05
Surprisingly simple multi stash patch for gitk. Works for gitk as it comes in rev a4685d2f58e2230d4e27fb2ee581d7ea35e5d046 (found in branch 'master' of the remote 'git://ozlabs.org/~paulus/gitk') and definitely possibly others. See also https://gist.github.com/uprego/d8c3c059c56ebb911974bb905157a81e that is a deprecated version of this. Credits …
$ git diff
diff --git a/gitk b/gitk
index a14d7a1..afd7585 100755
--- a/gitk
+++ b/gitk
@@ -296,6 +296,12 @@ proc parseviewrevs {view revs} {
set revs HEAD
} elseif {[lsearch -exact $revs --all] >= 0} {
lappend revs HEAD
+ set stashesfd [open [concat | \
@uprego
uprego / gitk multi stash patch - debian stretch
Created September 25, 2017 11:47
gitk multi stash patch - debian stretch
# pwd && echo && diff -u gitk-deb9-vanilla gitk-deb9-multistash; echo; ls -l | grep gitk
/usr/bin
--- gitk-deb9-vanilla 2017-08-09 06:49:17.000000000 +0000
+++ gitk-deb9-multistash 2017-09-25 11:30:11.386472474 +0000
@@ -296,6 +296,12 @@
set revs HEAD
} elseif {[lsearch -exact $revs --all] >= 0} {
lappend revs HEAD
+ set stashesfd [open [concat | \
@uprego
uprego / compress_and_remove.sh
Created February 15, 2018 16:40
compress and remove
#!/bin/sh
if test $# -ne 1
then
echo 'must receive exactly one argument'
exit 1
fi
tar czvf "${1}.tar.gz" "${1}" && rm -fv "${1}"