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: Mike Ralphson <mike.ralphson@...>
Cc: H.Merijn Brand <h.m.brand@...>, Junio C Hamano <gitster@...>, <git@...>
Date: Friday, February 8, 2008 - 4:36 pm

On Fri, 8 Feb 2008, Mike Ralphson wrote:


Does the following help? We really ought to know that ".." must be a path 
literal (and there obviously should be more limitations on nicknames for 
remotes, but I haven't figured out what they should be yet).

	-Daniel
*This .sig left intentionally blank*

diff --git a/remote.c b/remote.c
index 0e00680..83a3d9d 100644
--- a/remote.c
+++ b/remote.c
@@ -348,7 +348,7 @@ struct remote *remote_get(const char *name)
        if (!name)
                name = default_remote_name;
        ret = make_remote(name, 0);
-       if (name[0] != '/') {
+       if (name[0] != '/' && strcmp(name, "..")) {
                if (!ret->url)
                        read_remotes_file(ret);
                if (!ret->url)

-
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..., Daniel Barkalow, (Fri Feb 8, 4:36 pm)
Re: [PATCH] opening files in remote.c should ensure it is op..., Johannes Schindelin, (Fri Feb 8, 4:44 pm)