git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
SVSven Verdoolaege <skimo@liacs.nl>
Date
Jun 26, 2005, 19:45 UTC
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 <skimo@kotnet.org>

--- commit 00437f1bafcb710bb809cd2e87cdaeae340a67b8 tree 480e77cde9afbd0b0abd33e3f272288739b01a7e parent 641e1cac73acd67d0b1830dfd7196bca58dffbf2 author Sven Verdoolaege <skimo@kotnet.org> Sun, 26 Jun 2005 19:41:44 +0200 committer Sven Verdoolaege <skimo@kotnet.org> 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)
Next: Daniel Barkalow
Message 1 of 3 in “git-ssh-pull: commit-id consistency”
  1. git-ssh-pull: commit-id consistencySven Verdoolaege, Jun 26, 2005
  2. Daniel BarkalowJun 26, 2005
  3. git-ssh-pull: commit-id consistencySven Verdoolaege, Jun 27, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.