]> Kevux Git Server - rit/commitdiff
Mark http-fetch without -a as deprecated
authorBen Walton <bwalton@artsci.utoronto.ca>
Wed, 24 Aug 2011 00:29:51 +0000 (20:29 -0400)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Aug 2011 04:36:20 +0000 (21:36 -0700)
As the use of http-fetch without -a can create an object store that is
invalid to the point where it cannot even be fsck'd, mark it as
deprecated.  A future release should change the default and then
remove the option entirely.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-http-fetch.txt
http-fetch.c

index 4d42073..070cd1e 100644 (file)
@@ -15,6 +15,9 @@ DESCRIPTION
 -----------
 Downloads a remote git repository via HTTP.
 
+*NOTE*: use of this command without -a is deprecated.  The -a
+behaviour will become the default in a future release.
+
 OPTIONS
 -------
 commit-id::
index 3af4c71..8c4c5d2 100644 (file)
@@ -56,6 +56,10 @@ int main(int argc, const char **argv)
                commits = 1;
        }
 
+       if (get_all == 0)
+               warning("http-fetch: use without -a is deprecated.\n"
+                       "In a future release, -a will become the default.");
+
        if (argv[arg])
                str_end_url_with_slash(argv[arg], &url);