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

Re: [egit-jgit] excluded patterns are decorated as being untracked

From
Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date
Jun 18, 2008, 22:03 UTC
Message-ID
<200806190003.36791.robin.rosenberg.lists@dewire.com>
In-Reply-To
<48592C88.3080302@redhat.com>
onsdagen den 18 juni 2008 17.40.56 skrev Galder Zamarreno:
> Hmmmm, is marking a resource as "derived" recursive? i.e. if I mark 
> "output" folder as derived, would anything under it be considered 
> derived? It'd be a pain to go a mark as derived each and every class.
It seems it is not recursive and worse, not saved with the project.
> I suppose you still need the patch to use Team.isIgnoredHint to get 
> derived resources to be ignored, correct?

You'll need another patch for the decorator to pick up derived resources properly. Probably not the final solution to decorations. For one thing the decorators are horribly inefficient.

> Hmmmm, so the proper way is either marking resources as derived and use 
> your patch or implementing .git/info/exclude, correct?

I'd say implementing .git/info/exlude is the proper solution. The others are mere workarounds.

-- robin
>From 7acc0e63886ed8eda6b38a5edbfe9a6aa4d509dc Mon Sep 17 00:00:00 2001
From: Robin Rosenberg <robin.rosenberg@dewire.com>
Date: Wed, 18 Jun 2008 23:50:42 +0200
Subject: [PATCH] Decorate derived resources as ignored.
This is done by using the appropriate API.
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../internal/decorators/GitResourceDecorator.java  |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
index 4b6394c..0308f6a 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/decorators/GitResourceDecorator.java
@@ -273,8 +273,7 @@ public class GitResourceDecorator extends LabelProvider implements
 							}
 
 						} else {
-							if (rsrc.getType() == IResource.FILE
-									&& Team.isIgnored((IFile) rsrc)) {
+							if (Team.isIgnoredHint(rsrc)) {
 								decoration.addSuffix("(ignored)");
 							} else {
 								decoration.addPrefix(">");
-- 
1.5.5.1.178.g1f811
Previous: Galder Zamarreno
Message 5 of 5 in “[egit-jgit] excluded patterns are decorated as being untracked”
  1. Galder ZamarrenoJun 17, 2008
  2. Robin RosenbergJun 17, 2008
  3. Shawn O. PearceJun 18, 2008
  4. Galder ZamarrenoJun 18, 2008
  5. Robin RosenbergJun 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.