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

[PATCH] gitk: Show notes

From
Kirill Smelkov <kirr@mns.spb.ru>
Date
May 11, 2010, 08:26 UTC
Message-ID
<1273566416-3512-1-git-send-email-kirr@mns.spb.ru>
If in git.git I do
    $ git notes add -m 'This makes status significantly slower with Dokko' \
        ee6fc514
then `git log` shows the note...
    $ git log -1 ee6fc514
    commit ee6fc514f2df821c2719cc49499a56ef2fb136b0
    Author: Jens Lehmann <Jens.Lehmann@web.de>
    Date:   Sat Jan 16 18:42:24 2010 +0100
        Show submodules as modified when they contain a dirty work tree
        Until now a submodule only then showed up as modified in the supermodule
        when the last commit in the submodule differed from the one in the index
        or the diffed against commit of the superproject. A dirty work tree
        containing new untracked or modified files in a submodule was
        undetectable when looking at it from the superproject.
        Now git status and git diff (against the work tree) in the superproject
        will also display submodules as modified when they contain untracked or
        modified files, even if the compared ref matches the HEAD of the
        submodule.
        Signed-off-by: Jens Lehmann <Jens.Lehmann@web.de>
        Signed-off-by: Nanako Shiraishi <nanako3@lavabit.com>
        Signed-off-by: Junio C Hamano <gitster@pobox.com>
    Notes:
        This makes status significantly slower with Dokko
... but unfortunately gitk does not.
Let's fix this and teach gitk to show notes.
Signed-off-by: Kirill Smelkov <kirr@mns.spb.ru>
---
 gitk |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/gitk b/gitk
index 1b0e09a..d537011 100755
--- a/gitk
+++ b/gitk
@@ -361,8 +361,8 @@ proc start_rev_list {view} {
     }
 
     if {[catch {
-	set fd [open [concat | git log --no-color -z --pretty=raw --parents \
-			 --boundary $args "--" $files] r]
+	set fd [open [concat | git log --no-color -z --pretty=raw --show-notes \
+			--parents --boundary $args "--" $files] r]
     } err]} {
 	error_popup "[mc "Error executing git log:"] $err"
 	return 0
@@ -508,8 +508,8 @@ proc updatecommits {} {
 	set args $vorigargs($view)
     }
     if {[catch {
-	set fd [open [concat | git log --no-color -z --pretty=raw --parents \
-			  --boundary $args "--" $vfilelimit($view)] r]
+	set fd [open [concat | git log --no-color -z --pretty=raw --show-notes \
+			--parents --boundary $args "--" $vfilelimit($view)] r]
     } err]} {
 	error_popup "[mc "Error executing git log:"] $err"
 	return
@@ -1586,7 +1586,8 @@ proc do_readcommit {id} {
     global tclencoding
 
     # Invoke git-log to handle automatic encoding conversion
-    set fd [open [concat | git log --no-color --pretty=raw -1 $id] r]
+    set fd [open [concat | git log --no-color --pretty=raw --show-notes \
+		     -1 $id] r]
     # Read the results using i18n.logoutputencoding
     fconfigure $fd -translation lf -eofchar {}
     if {$tclencoding != {}} {
-- 
1.7.1.89.g6b35c
Next: Michael J Gruber
Message 1 of 3 in “gitk: Show notes”
  1. gitk: Show notesKirill Smelkov, May 11, 2010
  2. Michael J GruberMay 11, 2010
  3. Kirill SmelkovMay 12, 2010

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.