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

[PATCHv3 4/5] Teach transport about the gitfile mechanism

From
Phil Hord <hordp@cisco.com>
Date
Oct 5, 2011, 13:35 UTC
Message-ID
<4E8C5D0E.6080207@cisco.com>

The transport_get() function assumes that a regular file is a bundle rather than a local git directory. Check if the file is actually a gitfile. If so, do not try to process it as a bundle, but treat it as a local repository instead.

Signed-off-by: Phil Hord <hordp@cisco.com>
diff --git a/transport.c b/transport.c
index cd49a25..2ff2d68 100644
--- a/transport.c
+++ b/transport.c
@@ -915,7 +915,7 @@ struct transport *transport_get(struct remote *remote, const char *url)
 		ret->fetch = fetch_objs_via_rsync;
 		ret->push = rsync_transport_push;
 		ret->smart_options = NULL;
-	} else if (is_local(url) && is_file(url)) {
+	} else if (is_local(url) && is_file(url) && !is_gitfile(url)) {
 		struct bundle_transport_data *data = xcalloc(1, sizeof(*data));
 		ret->data = data;
 		ret->get_refs_list = get_refs_from_bundle;
-- 
1.7.7.505.ga09f6
Message 1 of 1 in “[PATCHv3 4/5] Teach transport about the gitfile mechanism”
  1. Phil HordOct 5, 2011

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.