git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-http-fetch: remove unused cmd_http_fetch
@ 2012-06-14 20:23 Luka Perkov
  2012-06-15 16:21 ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Luka Perkov @ 2012-06-14 20:23 UTC (permalink / raw)
  To: git

It was left out from commit 1088261f6fc90324014b5306cca4171987da85ce

Signed-off-by: Luka Perkov <lists@lukaperkov.net>
---

 builtin.h |    1 -
 1 file changed, 1 deletion(-)

diff --git a/builtin.h b/builtin.h
index 338f540..f5b8ed1 100644
--- a/builtin.h
+++ b/builtin.h
@@ -83,7 +83,6 @@ extern int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix
 extern int cmd_grep(int argc, const char **argv, const char *prefix);
 extern int cmd_hash_object(int argc, const char **argv, const char *prefix);
 extern int cmd_help(int argc, const char **argv, const char *prefix);
-extern int cmd_http_fetch(int argc, const char **argv, const char *prefix);
 extern int cmd_index_pack(int argc, const char **argv, const char *prefix);
 extern int cmd_init_db(int argc, const char **argv, const char *prefix);
 extern int cmd_log(int argc, const char **argv, const char *prefix);

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

* Re: [PATCH] git-http-fetch: remove unused cmd_http_fetch
  2012-06-14 20:23 [PATCH] git-http-fetch: remove unused cmd_http_fetch Luka Perkov
@ 2012-06-15 16:21 ` Jeff King
  2012-06-15 18:09   ` Junio C Hamano
  2012-06-15 18:40   ` Luka Perkov
  0 siblings, 2 replies; 5+ messages in thread
From: Jeff King @ 2012-06-15 16:21 UTC (permalink / raw)
  To: Luka Perkov; +Cc: git

On Thu, Jun 14, 2012 at 10:23:37PM +0200, Luka Perkov wrote:

> It was left out from commit 1088261f6fc90324014b5306cca4171987da85ce

This commit message left me scratching my head. Did we get rid of
http-fetch? If not, then don't we still need cmd_http_fetch? Or did we
just make it not a builtin, in which case we wouldn't be getting rid of
cmd_http_fetch, but rather converting it to main?

Reading the 1088261, I find the answer: we did make it not a builtin,
and it was indeed converted into "main". But its _declaration_ hung
around.

So maybe a better commit message would be:

  Subject: builtin.h: drop cmd_http_fetch declaration

  This was converted from a builtin into a stand-alone program by
  1088261f6fc90324014b5306cca4171987da85ce, but that commit forgot to
  drop the declaration.

Other than that, the patch looks obviously correct.

-Peff

PS There seem to be some other similar declarations: at least
   cmd_upload_tar and cmd_pickaxe.

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

* Re: [PATCH] git-http-fetch: remove unused cmd_http_fetch
  2012-06-15 16:21 ` Jeff King
@ 2012-06-15 18:09   ` Junio C Hamano
  2012-06-15 18:16     ` Jeff King
  2012-06-15 18:40   ` Luka Perkov
  1 sibling, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2012-06-15 18:09 UTC (permalink / raw)
  To: Jeff King; +Cc: Luka Perkov, git

Jeff King <peff@peff.net> writes:

> PS There seem to be some other similar declarations: at least
>    cmd_upload_tar and cmd_pickaxe.

Thanks.

$ sed -ne 's/^extern int \(cmd_[^(]*\)(.*/\1/p' builtin.h | sort >/var/tmp/1
$ nm -g git| sed -ne 's/^[0-9a-f]* T cmd_/cmd_/p' | sort > /var/tmp/2
$ comm -3 /var/tmp/[12]

finds only the two you mentioned, so how about doing it this way?

-- >8 --
From: Luka Perkov <lists@lukaperkov.net>
Date: Thu, 14 Jun 2012 22:23:37 +0200
Subject: [PATCH] builtin.h: remove unused cmd_<foo> declarations

These were left in builtin.h after they were converted into
stand-alone programs or removed after experiments finished.

Signed-off-by: Luka Perkov <lists@lukaperkov.net>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/builtin.h b/builtin.h
index 20427d2..3e44816 100644
--- a/builtin.h
+++ b/builtin.h
@@ -58,7 +58,6 @@ extern int cmd_gc(int argc, const char **argv, const char *prefix);
 extern int cmd_get_tar_commit_id(int argc, const char **argv, const char *prefix);
 extern int cmd_grep(int argc, const char **argv, const char *prefix);
 extern int cmd_help(int argc, const char **argv, const char *prefix);
-extern int cmd_http_fetch(int argc, const char **argv, const char *prefix);
 extern int cmd_init_db(int argc, const char **argv, const char *prefix);
 extern int cmd_log(int argc, const char **argv, const char *prefix);
 extern int cmd_log_reflog(int argc, const char **argv, const char *prefix);
@@ -76,7 +75,6 @@ extern int cmd_mktree(int argc, const char **argv, const char *prefix);
 extern int cmd_mv(int argc, const char **argv, const char *prefix);
 extern int cmd_name_rev(int argc, const char **argv, const char *prefix);
 extern int cmd_pack_objects(int argc, const char **argv, const char *prefix);
-extern int cmd_pickaxe(int argc, const char **argv, const char *prefix);
 extern int cmd_prune(int argc, const char **argv, const char *prefix);
 extern int cmd_prune_packed(int argc, const char **argv, const char *prefix);
 extern int cmd_push(int argc, const char **argv, const char *prefix);
@@ -104,7 +102,6 @@ extern int cmd_unpack_objects(int argc, const char **argv, const char *prefix);
 extern int cmd_update_index(int argc, const char **argv, const char *prefix);
 extern int cmd_update_ref(int argc, const char **argv, const char *prefix);
 extern int cmd_upload_archive(int argc, const char **argv, const char *prefix);
-extern int cmd_upload_tar(int argc, const char **argv, const char *prefix);
 extern int cmd_verify_tag(int argc, const char **argv, const char *prefix);
 extern int cmd_version(int argc, const char **argv, const char *prefix);
 extern int cmd_whatchanged(int argc, const char **argv, const char *prefix);
-- 
1.7.11.rc3.30.g3bdace2

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

* Re: [PATCH] git-http-fetch: remove unused cmd_http_fetch
  2012-06-15 18:09   ` Junio C Hamano
@ 2012-06-15 18:16     ` Jeff King
  0 siblings, 0 replies; 5+ messages in thread
From: Jeff King @ 2012-06-15 18:16 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Luka Perkov, git

On Fri, Jun 15, 2012 at 11:09:53AM -0700, Junio C Hamano wrote:

> Jeff King <peff@peff.net> writes:
> 
> > PS There seem to be some other similar declarations: at least
> >    cmd_upload_tar and cmd_pickaxe.
> 
> Thanks.
> 
> $ sed -ne 's/^extern int \(cmd_[^(]*\)(.*/\1/p' builtin.h | sort >/var/tmp/1
> $ nm -g git| sed -ne 's/^[0-9a-f]* T cmd_/cmd_/p' | sort > /var/tmp/2
> $ comm -3 /var/tmp/[12]
> 
> finds only the two you mentioned, so how about doing it this way?

I used a slightly grosser grep that looked in "*.c", and come up with
only those 2. Patch looks good to me.

-Peff

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

* Re: [PATCH] git-http-fetch: remove unused cmd_http_fetch
  2012-06-15 16:21 ` Jeff King
  2012-06-15 18:09   ` Junio C Hamano
@ 2012-06-15 18:40   ` Luka Perkov
  1 sibling, 0 replies; 5+ messages in thread
From: Luka Perkov @ 2012-06-15 18:40 UTC (permalink / raw)
  To: Jeff King; +Cc: git

On Fri, Jun 15, 2012 at 12:21:36PM -0400, Jeff King wrote:
> On Thu, Jun 14, 2012 at 10:23:37PM +0200, Luka Perkov wrote:
> 
> > It was left out from commit 1088261f6fc90324014b5306cca4171987da85ce
> 
> This commit message left me scratching my head. Did we get rid of
> http-fetch? If not, then don't we still need cmd_http_fetch? Or did we
> just make it not a builtin, in which case we wouldn't be getting rid of
> cmd_http_fetch, but rather converting it to main?
> 
> Reading the 1088261, I find the answer: we did make it not a builtin,
> and it was indeed converted into "main". But its _declaration_ hung
> around.
> 
> So maybe a better commit message would be:
> 
>   Subject: builtin.h: drop cmd_http_fetch declaration
> 
>   This was converted from a builtin into a stand-alone program by
>   1088261f6fc90324014b5306cca4171987da85ce, but that commit forgot to
>   drop the declaration.

I agree. Sorry for the confusing message.

> Other than that, the patch looks obviously correct.
> 
> -Peff
> 
> PS There seem to be some other similar declarations: at least
>    cmd_upload_tar and cmd_pickaxe.

I noticed only cmd_http_fetch when I was hacking a patch for OpenWrt.

Luka

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

end of thread, other threads:[~2012-06-15 18:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-14 20:23 [PATCH] git-http-fetch: remove unused cmd_http_fetch Luka Perkov
2012-06-15 16:21 ` Jeff King
2012-06-15 18:09   ` Junio C Hamano
2012-06-15 18:16     ` Jeff King
2012-06-15 18:40   ` Luka Perkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).