Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH] git-ssh-pull: commit-id consistency

From: Sven Verdoolaege <hidden>
Date: 2016-06-15 22:42:00
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>

---
commit 00437f1bafcb710bb809cd2e87cdaeae340a67b8
tree 480e77cde9afbd0b0abd33e3f272288739b01a7e
parent 641e1cac73acd67d0b1830dfd7196bca58dffbf2
author Sven Verdoolaege [off-list ref] Sun, 26 Jun 2005 19:41:44 +0200
committer Sven Verdoolaege [off-list ref] 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)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help