{"thread":{"id":"28197","subject":"[PATCH] Mark http-fetch without -a as deprecated","startedAt":"2011-08-23T00:51:43Z","lastAt":"2011-08-24T00:29:51Z","messageCount":4,"participants":["Ben Walton","Matthieu Moy"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"174061","messageId":"1314060703-24265-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"28197","inReplyTo":null,"subject":"[PATCH] Mark http-fetch without -a as deprecated","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-08-23T00:51:43Z","receivedAt":"2011-08-23T00:51:43Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"As the use of http-fetch without -a can create an object store that is\ninvalid to the point where it cannot even be fsck'd, mark it as\ndeprecated.  A future release should change the default and then\nremove the option entirely.\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n http-fetch.c |    3 +++\n 1 files changed, 3 insertions(+), 0 deletions(-)\n\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 3af4c71..003ddb7 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -56,6 +56,9 @@ int main(int argc, const char **argv)\n \t\tcommits = 1;\n \t}\n \n+\tif (get_all == 0)\n+\t  warning(\"http-fetch: use without -a is deprecated; -a will become the default in a future release\");\n+\n \tif (argv[arg])\n \t\tstr_end_url_with_slash(argv[arg], &url);\n \n-- \n1.7.4.1\n"},{"id":"174077","messageId":"vpqvcto391x.fsf@bauges.imag.fr","threadId":"28197","inReplyTo":"1314060703-24265-1-git-send-email-bwalton@artsci.utoronto.ca","subject":"Re: [PATCH] Mark http-fetch without -a as deprecated","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2011-08-23T07:02:02Z","receivedAt":"2011-08-23T07:02:02Z","isPatch":true,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Ben Walton <bwalton@artsci.utoronto.ca> writes:\n\n> +\tif (get_all == 0)\n> +\t  warning(\"http-fetch: use without -a is deprecated; -a will become the default in a future release\");\n\nBad indentation. Git indents with tabs, not spaces. Also, you can break\nthe line to make both the error message and the source code fit on 80\ncharacters.\n\nNo opinion on whether the deprecation is sensible, though. If it is, add\nsomething in the documentation, not just in the code.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"174087","messageId":"1314104698-sup-1594@pinkfloyd.chass.utoronto.ca","threadId":"28197","inReplyTo":"vpqvcto391x.fsf@bauges.imag.fr","subject":"Re: [PATCH] Mark http-fetch without -a as deprecated","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-08-23T13:05:55Z","receivedAt":"2011-08-23T13:05:55Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"Excerpts from Matthieu Moy's message of Tue Aug 23 03:02:02 -0400 2011:\n\nHi Matthieu,\n\n> Bad indentation. Git indents with tabs, not spaces. Also, you can break\n> the line to make both the error message and the source code fit on 80\n> characters.\n\nYes, sorry.  Too much dependence on emacs 'doing the right thing' I\nguess.  I'll fix both of these issues and resubmit.\n\n> No opinion on whether the deprecation is sensible, though. If it is,\n> add something in the documentation, not just in the code.\n\nYes, good point.  I'll include this documentation change as well.\n\nThanks\n-Ben\n--\nBen Walton\nSystems Programmer - CHASS\nUniversity of Toronto\nC:416.407.5610 | W:416.978.4302\n"},{"id":"174133","messageId":"1314145791-23216-1-git-send-email-bwalton@artsci.utoronto.ca","threadId":"28197","inReplyTo":"vpqvcto391x.fsf@bauges.imag.fr","subject":"[PATCH] Mark http-fetch without -a as deprecated","fromName":"Ben Walton","fromEmail":"bwalton@artsci.utoronto.ca","sentAt":"2011-08-24T00:29:51Z","receivedAt":"2011-08-24T00:29:51Z","isPatch":true,"sender":{"key":"bdwalton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/396061?v=4"},"body":"As the use of http-fetch without -a can create an object store that is\ninvalid to the point where it cannot even be fsck'd, mark it as\ndeprecated.  A future release should change the default and then\nremove the option entirely.\n\nSigned-off-by: Ben Walton <bwalton@artsci.utoronto.ca>\n---\n Documentation/git-http-fetch.txt |    3 +++\n http-fetch.c                     |    4 ++++\n 2 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt\nindex 4d42073..070cd1e 100644\n--- a/Documentation/git-http-fetch.txt\n+++ b/Documentation/git-http-fetch.txt\n@@ -15,6 +15,9 @@ DESCRIPTION\n -----------\n Downloads a remote git repository via HTTP.\n \n+*NOTE*: use of this command without -a is deprecated.  The -a\n+behaviour will become the default in a future release.\n+\n OPTIONS\n -------\n commit-id::\ndiff --git a/http-fetch.c b/http-fetch.c\nindex 3af4c71..8c4c5d2 100644\n--- a/http-fetch.c\n+++ b/http-fetch.c\n@@ -56,6 +56,10 @@ int main(int argc, const char **argv)\n \t\tcommits = 1;\n \t}\n \n+\tif (get_all == 0)\n+\t\twarning(\"http-fetch: use without -a is deprecated.\\n\"\n+\t\t\t\"In a future release, -a will become the default.\");\n+\n \tif (argv[arg])\n \t\tstr_end_url_with_slash(argv[arg], &url);\n \n-- \n1.7.4.1\n"}]}