git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[TopGit PATCH] tg help: <something>: improve readability

From
Kirill Smelkov <kirr@landau.phys.spbu.ru>
Date
Sep 18, 2008, 16:29 UTC
Message-ID
<1221755370-6817-3-git-send-email-kirr@landau.phys.spbu.ru>
In-Reply-To
<1221755370-6817-1-git-send-email-kirr@landau.phys.spbu.ru>

Previously tg help was not showing Usage line, and with this change, now it looks like e.g.:

$ tg help import
Usage: tg [...] import [-p PREFIX] RANGE...
        Import commits within the given revision range into TopGit,
        creating one topic branch per commit, the dependencies forming
        a linear sequence starting on your current branch.
        The branch names are auto-guessed from the commit messages
        and prefixed by t/ by default; use '-p PREFIX' to specify
        an alternative prefix (even an empty one).
Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
---
 tg.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tg.sh b/tg.sh
index 545e1b8..08975ae 100644
--- a/tg.sh
+++ b/tg.sh
@@ -224,8 +224,12 @@ do_help()
 
 		echo "TopGit v0.3 - A different patch queue manager"
 		echo "Usage: tg [-r REMOTE] ($cmds|help) ..."
-	elif [ -r "@sharedir@/tg-$1.txt" ] ; then
-		cat "@sharedir@/tg-$1.txt"
+	elif [ -r "@cmddir@"/tg-$1 ] ; then
+		@cmddir@/tg-$1 -h || :
+		echo
+		if [ -r "@sharedir@/tg-$1.txt" ] ; then
+			cat "@sharedir@/tg-$1.txt"
+		fi
 	else
 		echo "`basename $0`: no help for $1" 1>&2
 	fi
-- 
1.6.0.2.250.g965aa
Previous: Avery PennarunNext: Kirill Smelkov
Message 21 of 22 in “A couple of TopGit tweaks”
  1. Kirill SmelkovSep 18, 2008
  2. .gitignore += vim swap filesKirill Smelkov, Sep 18, 2008
  3. martin f krafftSep 18, 2008
  4. Kirill SmelkovSep 18, 2008
  5. Bert WesargSep 18, 2008
  6. Kirill SmelkovSep 18, 2008
  7. Bert WesargSep 18, 2008
  8. Kirill SmelkovSep 18, 2008
  9. martin f krafftSep 18, 2008
  10. Daniel BarkalowSep 18, 2008
  11. Kirill SmelkovSep 19, 2008
  12. Bert WesargSep 19, 2008
  13. Kirill SmelkovSep 19, 2008
  14. Andreas EricssonSep 19, 2008
  15. Kirill SmelkovSep 19, 2008
  16. Bert WesargSep 19, 2008
  17. Default exclude rules for GitPetr Baudis, Sep 19, 2008
  18. Junio C HamanoSep 19, 2008
  19. Petr BaudisSep 19, 2008
  20. Avery PennarunSep 19, 2008
  21. tg help: <something>: improve readabilityKirill Smelkov, Sep 18, 2008
  22. tg import: fix + make more robustKirill Smelkov, Sep 18, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.