All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Mark http-fetch without -a as deprecated
@ 2011-08-23  0:51 Ben Walton
  2011-08-23  7:02 ` Matthieu Moy
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Walton @ 2011-08-23  0:51 UTC (permalink / raw)
  To: git, gitster; +Cc: Ben Walton

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>
---
 http-fetch.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/http-fetch.c b/http-fetch.c
index 3af4c71..003ddb7 100644
--- a/http-fetch.c
+++ b/http-fetch.c
@@ -56,6 +56,9 @@ int main(int argc, const char **argv)
 		commits = 1;
 	}
 
+	if (get_all == 0)
+	  warning("http-fetch: use without -a is deprecated; -a will become the default in a future release");
+
 	if (argv[arg])
 		str_end_url_with_slash(argv[arg], &url);
 
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Mark http-fetch without -a as deprecated
  2011-08-23  0:51 [PATCH] Mark http-fetch without -a as deprecated Ben Walton
@ 2011-08-23  7:02 ` Matthieu Moy
  2011-08-23 13:05   ` Ben Walton
  2011-08-24  0:29   ` Ben Walton
  0 siblings, 2 replies; 4+ messages in thread
From: Matthieu Moy @ 2011-08-23  7:02 UTC (permalink / raw)
  To: Ben Walton; +Cc: git, gitster

Ben Walton <bwalton@artsci.utoronto.ca> writes:

> +	if (get_all == 0)
> +	  warning("http-fetch: use without -a is deprecated; -a will become the default in a future release");

Bad indentation. Git indents with tabs, not spaces. Also, you can break
the line to make both the error message and the source code fit on 80
characters.

No opinion on whether the deprecation is sensible, though. If it is, add
something in the documentation, not just in the code.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Mark http-fetch without -a as deprecated
  2011-08-23  7:02 ` Matthieu Moy
@ 2011-08-23 13:05   ` Ben Walton
  2011-08-24  0:29   ` Ben Walton
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Walton @ 2011-08-23 13:05 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: git, gitster

Excerpts from Matthieu Moy's message of Tue Aug 23 03:02:02 -0400 2011:

Hi Matthieu,

> Bad indentation. Git indents with tabs, not spaces. Also, you can break
> the line to make both the error message and the source code fit on 80
> characters.

Yes, sorry.  Too much dependence on emacs 'doing the right thing' I
guess.  I'll fix both of these issues and resubmit.

> No opinion on whether the deprecation is sensible, though. If it is,
> add something in the documentation, not just in the code.

Yes, good point.  I'll include this documentation change as well.

Thanks
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Mark http-fetch without -a as deprecated
  2011-08-23  7:02 ` Matthieu Moy
  2011-08-23 13:05   ` Ben Walton
@ 2011-08-24  0:29   ` Ben Walton
  1 sibling, 0 replies; 4+ messages in thread
From: Ben Walton @ 2011-08-24  0:29 UTC (permalink / raw)
  To: gitster; +Cc: git, Matthieu.Moy, Ben Walton

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-24  0:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-23  0:51 [PATCH] Mark http-fetch without -a as deprecated Ben Walton
2011-08-23  7:02 ` Matthieu Moy
2011-08-23 13:05   ` Ben Walton
2011-08-24  0:29   ` Ben Walton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.