Re: [PATCH] opening files in remote.c should ensure it is opening a file

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Barkalow <barkalow@...>
Cc: Mike Ralphson <mike.ralphson@...>, H.Merijn Brand <h.m.brand@...>, <git@...>
Date: Saturday, February 9, 2008 - 1:27 am

Daniel Barkalow <barkalow@iabervon.org> writes:


Perhaps "static int valid_remote_nick(const char*)" is needed?
I'd say we can limit it to something like:

static int valid_remote_nick(const char *name)
{
	if (!name[0] || /* not empty */
            (name[0] == '.' && /* not "." */
             (!name[1] || /* not ".." */
              (name[1] == '.' && !name[2]))))
		return 0;
	return !!strchr(name, '/'); /* no slash */
}

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:40 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 5:47 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:38 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Junio C Hamano, (Sat Feb 9, 1:27 am)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:44 pm)