Skip to content

Commit a6c786f

Browse files
Ben Waltongitster
authored andcommitted
Mark http-fetch without -a as deprecated
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>
1 parent 3d3d282 commit a6c786f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Documentation/git-http-fetch.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ DESCRIPTION
1515
-----------
1616
Downloads a remote git repository via HTTP.
1717

18+
*NOTE*: use of this command without -a is deprecated. The -a
19+
behaviour will become the default in a future release.
20+
1821
OPTIONS
1922
-------
2023
commit-id::

http-fetch.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ int main(int argc, const char **argv)
5656
commits = 1;
5757
}
5858

59+
if (get_all == 0)
60+
warning("http-fetch: use without -a is deprecated.\n"
61+
"In a future release, -a will become the default.");
62+
5963
if (argv[arg])
6064
str_end_url_with_slash(argv[arg], &url);
6165

0 commit comments

Comments
 (0)