From: Sven Verdoolaege Date: Sun, 26 Jun 2005 19:45:47 GMT Subject: [PATCH] git-ssh-pull: commit-id consistency Message-ID: <20050626214547.A29432@tin.liacs.nl> I thought about keeping the check for a leading dot or slash, but then I figured that you'd get an error from the other side pretty quickly. skimo -- In contrast to other plumbing tools, git-ssh-pu{sh,ll} only allow a very restrictive form of commit-id filenames. This patch removes this restriction. Signed-off-by: Sven Verdoolaege --- commit 00437f1bafcb710bb809cd2e87cdaeae340a67b8 tree 480e77cde9afbd0b0abd33e3f272288739b01a7e parent 641e1cac73acd67d0b1830dfd7196bca58dffbf2 author Sven Verdoolaege Sun, 26 Jun 2005 19:41:44 +0200 committer Sven Verdoolaege Sun, 26 Jun 2005 19:41:44 +0200 pull.c | 7 ++----- ssh-push.c | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/pull.c b/pull.c --- a/pull.c +++ b/pull.c @@ -152,11 +152,8 @@ static int interpret_target(char *target { if (!get_sha1_hex(target, sha1)) return 0; - if (!check_ref_format(target)) { - if (!fetch_ref(target, sha1)) { - return 0; - } - } + if (!fetch_ref(target, sha1)) + return 0; return -1; } diff --git a/ssh-push.c b/ssh-push.c --- a/ssh-push.c +++ b/ssh-push.c @@ -74,7 +74,7 @@ int serve_ref(int fd_in, int fd_out) return -1; posn++; } while (ref[posn - 1]); - if (get_ref_sha1(ref, sha1)) + if (get_sha1(ref, sha1)) remote = -1; write(fd_out, &remote, 1); if (remote)