* [StGIT PATCH not for master] Use gitk --argscmd in contrib/stg-gitk.
@ 2007-06-03 22:52 Yann Dirson
0 siblings, 0 replies; only message in thread
From: Yann Dirson @ 2007-06-03 22:52 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
This allows to ask gitk to recompute the list of patches to show at
every refresh. Before this, we had problems with 'stg-gitk --all':
- deleting a patch that was existing at startup time would trigger an
"unknown ref" error from gitk and force to quit/restart manually;
- patches created since startup were only visible when applied, or
when below one of the startup patches.
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
Note that this flag is added by the gitk patch I just posted, so it
should not be applied to StGIT master right now - we want that git
gets released with the necessary support before we do that.
contrib/stg-gitk | 26 ++++++++++++++++++++------
1 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/contrib/stg-gitk b/contrib/stg-gitk
index dd01ef0..f2fca84 100755
--- a/contrib/stg-gitk
+++ b/contrib/stg-gitk
@@ -20,11 +20,16 @@ usage()
}
allbranches=0
-case "$1" in
---all) allbranches=1; shift ;;
---*) usage ;;
-*) break ;;
-esac
+refsonly=0
+while [ "$#" -gt 0 ]; do
+ case "$1" in
+ --refs) refsonly=1 ;;
+ --all) allbranches=1 ;;
+ --*) usage ;;
+ *) break ;;
+ esac
+ shift
+done
if [ $allbranches = 1 ] && [ "$#" -gt 0 ]; then
usage
@@ -58,4 +63,13 @@ else
done
fi
-gitk $(find $refdirs -type f -not -name '*.log' | cut -c${GIT_DIR_SPKIPLEN}- )
+printrefs()
+{
+ find $refdirs -type f -not -name '*.log' | cut -c${GIT_DIR_SPKIPLEN}-
+}
+
+if [ $refsonly = 1 ]; then
+ printrefs
+else
+ gitk --argscmd="$0 --refs $@"
+fi
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-03 22:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-03 22:52 [StGIT PATCH not for master] Use gitk --argscmd in contrib/stg-gitk Yann Dirson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).