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

[GITK PATCH] gitk: support "gitk <tracheophyte> -- ."

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 23, 2010, 16:51 UTC
Message-ID
<alpine.DEB.1.00.1002231748320.3980@intel-tinevez-2-302>
In-Reply-To
<alpine.DEB.1.00.1002201920350.20986@pacific.mpi-cbg.de>

It might be unintuitive to a user when "gitk HEAD -- ." does not show any files in the lower right pane. This patch fixes that.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
	My initial analysis was all wrong.
	Pat: does this look correct to you?
	Kirill: does this fix the issue on your side, too?
	Paul: since we need this for Git Cheetah, and you are probably too 
	busy to apply/review in the next few weeks, I took the liberty of 
	keeping it as a git.git patch. Let me know if I you want it 
	in a different form that does not require git-am's -p2 option.
 gitk-git/gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gitk-git/gitk b/gitk-git/gitk
index cdedaa7..553922f 100644
--- a/gitk-git/gitk
+++ b/gitk-git/gitk
@@ -7341,6 +7341,9 @@ proc startdiff {ids} {
 
 proc path_filter {filter name} {
     foreach p $filter {
+	if {$p == "."} {
+		return 1
+	}
 	set l [string length $p]
 	if {[string index $p end] eq "/"} {
 	    if {[string compare -length $l $p $name] == 0} {
-- 
1.6.4.297.gcb4cc
Next: Johannes Schindelin
Message 1 of 10 in “gitk: support "gitk <tracheophyte> -- ."”
  1. gitk: support "gitk <tracheophyte> -- ."Johannes Schindelin, Feb 23, 2010
  2. 2/3 gitk: support path filters even in subdirectoriesJohannes Schindelin, Feb 23, 2010
  3. 3/3 gitk: strip prefix from filenames in subdirectoriesJohannes Schindelin, Feb 23, 2010
  4. KirillFeb 23, 2010
  5. Johannes SchindelinFeb 23, 2010
  6. KirillFeb 23, 2010
  7. KirillFeb 23, 2010
  8. Johannes SchindelinFeb 23, 2010
  9. Pat ThoytsFeb 25, 2010
  10. Johannes SchindelinFeb 25, 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.