{"thread":{"id":"28587","subject":"[PATCHv3 4/5] Teach transport about the gitfile mechanism","startedAt":"2011-10-05T13:35:10Z","lastAt":"2011-10-05T13:35:10Z","messageCount":1,"participants":["Phil Hord"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"176920","messageId":"4E8C5D0E.6080207@cisco.com","threadId":"28587","inReplyTo":null,"subject":"[PATCHv3 4/5] Teach transport about the gitfile mechanism","fromName":"Phil Hord","fromEmail":"hordp@cisco.com","sentAt":"2011-10-05T13:35:10Z","receivedAt":"2011-10-05T13:35:10Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"The transport_get() function assumes that a regular file is a\nbundle rather than a local git directory. Check if the file is\nactually a gitfile.  If so, do not try to process it as a\nbundle, but treat it as a local repository instead.\n\nSigned-off-by: Phil Hord <hordp@cisco.com>\n\ndiff --git a/transport.c b/transport.c\nindex cd49a25..2ff2d68 100644\n--- a/transport.c\n+++ b/transport.c\n@@ -915,7 +915,7 @@ struct transport *transport_get(struct remote *remote, const char *url)\n \t\tret->fetch = fetch_objs_via_rsync;\n \t\tret->push = rsync_transport_push;\n \t\tret->smart_options = NULL;\n-\t} else if (is_local(url) && is_file(url)) {\n+\t} else if (is_local(url) && is_file(url) && !is_gitfile(url)) {\n \t\tstruct bundle_transport_data *data = xcalloc(1, sizeof(*data));\n \t\tret->data = data;\n \t\tret->get_refs_list = get_refs_from_bundle;\n-- \n1.7.7.505.ga09f6\n"}]}