{"thread":{"id":"3625","subject":"[PATCH 1/6] http-push: fix revision walk","startedAt":"2006-03-11T04:17:55Z","lastAt":"2006-03-11T04:17:55Z","messageCount":1,"participants":["Nick Hengeveld"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"17446","messageId":"20060311041755.GC3997@reactrix.com","threadId":"3625","inReplyTo":null,"subject":"[PATCH 1/6] http-push: fix revision walk","fromName":"Nick Hengeveld","fromEmail":"nickh@reactrix.com","sentAt":"2006-03-11T04:17:55Z","receivedAt":"2006-03-11T04:17:55Z","isPatch":true,"sender":{"key":"nickh@reactrix.com","avatar":null},"body":"The revision walk was not including tags because setup_revisions zeroes out\nthe revs flags.  Pass --objects so it picks up all the necessary bits.\n\n---\n\n http-push.c |   13 +++++--------\n 1 files changed, 5 insertions(+), 8 deletions(-)\n\n4bff87736bfc51313e7e23ebd9b99bc476c00616\ndiff --git a/http-push.c b/http-push.c\nindex 226d719..4c1b0c3 100644\n--- a/http-push.c\n+++ b/http-push.c\n@@ -1752,23 +1752,20 @@ int main(int argc, char **argv)\n \t\t}\n \n \t\t/* Set up revision info for this refspec */\n-\t\tconst char *commit_argv[3];\n-\t\tint commit_argc = 2;\n+\t\tconst char *commit_argv[4];\n+\t\tint commit_argc = 3;\n \t\tchar *new_sha1_hex = strdup(sha1_to_hex(ref->new_sha1));\n \t\tchar *old_sha1_hex = NULL;\n-\t\tcommit_argv[1] = new_sha1_hex;\n+\t\tcommit_argv[1] = \"--objects\";\n+\t\tcommit_argv[2] = new_sha1_hex;\n \t\tif (!push_all && !is_zero_sha1(ref->old_sha1)) {\n \t\t\told_sha1_hex = xmalloc(42);\n \t\t\tsprintf(old_sha1_hex, \"^%s\",\n \t\t\t\tsha1_to_hex(ref->old_sha1));\n-\t\t\tcommit_argv[2] = old_sha1_hex;\n+\t\t\tcommit_argv[3] = old_sha1_hex;\n \t\t\tcommit_argc++;\n \t\t}\n-\t\trevs.commits = NULL;\n \t\tsetup_revisions(commit_argc, commit_argv, &revs, NULL);\n-\t\trevs.tag_objects = 1;\n-\t\trevs.tree_objects = 1;\n-\t\trevs.blob_objects = 1;\n \t\tfree(new_sha1_hex);\n \t\tif (old_sha1_hex) {\n \t\t\tfree(old_sha1_hex);\n-- \n1.2.4.g8e81-dirty\n"}]}