git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Mark http-fetch without -a as deprecated

From
Ben Walton <bwalton@artsci.utoronto.ca>
Date
Aug 24, 2011, 00:29 UTC
Message-ID
<1314145791-23216-1-git-send-email-bwalton@artsci.utoronto.ca>
In-Reply-To
<vpqvcto391x.fsf@bauges.imag.fr>

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>
---
 Documentation/git-http-fetch.txt |    3 +++
 http-fetch.c                     |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Documentation/git-http-fetch.txt b/Documentation/git-http-fetch.txt
index 4d42073..070cd1e 100644
--- a/Documentation/git-http-fetch.txt
+++ b/Documentation/git-http-fetch.txt
@@ -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::
diff --git a/http-fetch.c b/http-fetch.c
index 3af4c71..8c4c5d2 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -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);
 
-- 
1.7.4.1
Previous: Ben Walton
Message 4 of 4 in “Mark http-fetch without -a as deprecated”
  1. Mark http-fetch without -a as deprecatedBen Walton, Aug 23, 2011
  2. Matthieu MoyAug 23, 2011
  3. Ben WaltonAug 23, 2011
  4. Mark http-fetch without -a as deprecatedBen Walton, Aug 24, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.