Git development
 help / color / mirror / Atom feed
* [PATCH] Do not ignore hidden refs
@ 2006-11-18  4:11 Petr Baudis
  2006-11-18  4:39 ` Junio C Hamano
  2006-11-18 17:35 ` Linus Torvalds
  0 siblings, 2 replies; 14+ messages in thread
From: Petr Baudis @ 2006-11-18  4:11 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

Some of the ref manipulation tools (git-for-each-ref and git-show-ref in
particular) would not handle hidden (~ /^\./) refs. This may be an
acceptable or possibly even desirable behaviour for the ref walkers and
repackers, but git-show-ref hiddenrefname must work.

This makes Git not ignore hidden refs at all. I'm not opposed to making
some particular parts of the ref interface to continue to ignore hidden
refs, but the restriction cannot be so deep.

Signed-off-by: Petr Baudis <pasky@suse.cz>
---

 refs.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/refs.c b/refs.c
index f003a0b..06fa5c2 100644
--- a/refs.c
+++ b/refs.c
@@ -141,7 +141,8 @@ static struct ref_list *get_ref_dir(cons
 			int flag;
 			int namelen;
 
-			if (de->d_name[0] == '.')
+			if (de->d_name[0] == '.' && (de->d_name[1] == '\0'
+			    || (de->d_name[1] == '.' && de->d_name[2] == '\0')))
 				continue;
 			namelen = strlen(de->d_name);

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-11-19  0:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-18  4:11 [PATCH] Do not ignore hidden refs Petr Baudis
2006-11-18  4:39 ` Junio C Hamano
2006-11-18  4:53   ` Petr Baudis
2006-11-18  7:27     ` Junio C Hamano
2006-11-18  7:41       ` Shawn Pearce
2006-11-18 19:28       ` Petr Baudis
2006-11-18 19:50         ` Junio C Hamano
2006-11-18 19:55           ` Petr Baudis
2006-11-18 20:05           ` Junio C Hamano
2006-11-18 23:18             ` Petr Baudis
2006-11-19  0:29               ` Junio C Hamano
2006-11-19  0:48                 ` Petr Baudis
2006-11-18 17:35 ` Linus Torvalds
2006-11-18 18:35   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox