From: Petr Baudis <pasky@suse.cz>
To: Junio C Hamano <junkio@cox.net>
Cc: <git@vger.kernel.org>
Subject: [PATCH] Do not ignore hidden refs
Date: Sat, 18 Nov 2006 05:11:37 +0100 [thread overview]
Message-ID: <20061118041137.6064.75827.stgit@machine.or.cz> (raw)
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);
next reply other threads:[~2006-11-18 4:11 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-18 4:11 Petr Baudis [this message]
2006-11-18 4:39 ` [PATCH] Do not ignore hidden refs 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061118041137.6064.75827.stgit@machine.or.cz \
--to=pasky@suse.cz \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox