git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] list-objects-filter-options: fix up some sparse warnings
@ 2017-11-20 23:39 Ramsay Jones
  2017-11-21  1:16 ` Jonathan Nieder
  2017-11-21 12:36 ` Jeff Hostetler
  0 siblings, 2 replies; 5+ messages in thread
From: Ramsay Jones @ 2017-11-20 23:39 UTC (permalink / raw)
  To: Jeff Hostetler; +Cc: Junio C Hamano, GIT Mailing-list


In particular, sparse complains that the armor_{en,de}code_arg()
functions are 'not declared - should they be static?'. Since the
armor_decode_arg() symbol does not require more than file visibility,
we can simply mark the declaration with static. The armor_encode_arg()
function has no callers, so we simply remove the (unused) definition.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Jeff,

If you need to re-roll your 'jh/object-filtering' branch, could you
please squash this (or something like it) into the relevant patch
(commit bf0aedcbe1, "list-objects: filter objects in traverse_commit_list",
16-11-2017).

Thanks!

ATB,
Ramsay Jones

 list-objects-filter-options.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c
index 0e4ad70ab..bdbadd5a3 100644
--- a/list-objects-filter-options.c
+++ b/list-objects-filter-options.c
@@ -34,19 +34,7 @@ static int arg_needs_armor(const char *arg)
 	return 0;
 }
 
-void armor_encode_arg(struct strbuf *buf, const char *arg)
-{
-	static const char hex[] = "0123456789abcdef";
-	const unsigned char *p;
-
-	for (p = (const unsigned char *)arg; *p; p++) {
-		unsigned int val = *p;
-		strbuf_addch(buf, hex[val >> 4]);
-		strbuf_addch(buf, hex[val & 0xf]);
-	}
-}
-
-int armor_decode_arg(struct strbuf *buf, const char *arg)
+static int armor_decode_arg(struct strbuf *buf, const char *arg)
 {
 	const char *p;
 
-- 
2.15.0

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

* Re: [PATCH] list-objects-filter-options: fix up some sparse warnings
  2017-11-20 23:39 [PATCH] list-objects-filter-options: fix up some sparse warnings Ramsay Jones
@ 2017-11-21  1:16 ` Jonathan Nieder
  2017-11-21 11:04   ` Ramsay Jones
  2017-11-21 12:36 ` Jeff Hostetler
  1 sibling, 1 reply; 5+ messages in thread
From: Jonathan Nieder @ 2017-11-21  1:16 UTC (permalink / raw)
  To: Ramsay Jones; +Cc: Jeff Hostetler, Junio C Hamano, GIT Mailing-list

Hi,

Ramsay Jones wrote:

> If you need to re-roll your 'jh/object-filtering' branch, could you
> please squash this (or something like it) into the relevant patch
> (commit bf0aedcbe1, "list-objects: filter objects in traverse_commit_list",
> 16-11-2017).

Micronit: can these messages use the ISO 8601 order 2017-11-16?

That way, the date can be read without confusion regardless of what
locale the reader is in.

Thanks,
Jonathan

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

* Re: [PATCH] list-objects-filter-options: fix up some sparse warnings
  2017-11-21  1:16 ` Jonathan Nieder
@ 2017-11-21 11:04   ` Ramsay Jones
  2017-11-22  0:23     ` Stefan Beller
  0 siblings, 1 reply; 5+ messages in thread
From: Ramsay Jones @ 2017-11-21 11:04 UTC (permalink / raw)
  To: Jonathan Nieder; +Cc: Jeff Hostetler, Junio C Hamano, GIT Mailing-list



On 21/11/17 01:16, Jonathan Nieder wrote:
> Hi,
> 
> Ramsay Jones wrote:
> 
>> If you need to re-roll your 'jh/object-filtering' branch, could you
>> please squash this (or something like it) into the relevant patch
>> (commit bf0aedcbe1, "list-objects: filter objects in traverse_commit_list",
>> 16-11-2017).
> 
> Micronit: can these messages use the ISO 8601 order 2017-11-16?

Hmm, I suppose I could try and train my fingers to use this unnatural
order ... ;-)

[It would probably be easier if I used git to output this for me, rather
than typing it into my email client!]

ATB,
Ramsay Jones


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

* Re: [PATCH] list-objects-filter-options: fix up some sparse warnings
  2017-11-20 23:39 [PATCH] list-objects-filter-options: fix up some sparse warnings Ramsay Jones
  2017-11-21  1:16 ` Jonathan Nieder
@ 2017-11-21 12:36 ` Jeff Hostetler
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Hostetler @ 2017-11-21 12:36 UTC (permalink / raw)
  To: Ramsay Jones, Jeff Hostetler; +Cc: Junio C Hamano, GIT Mailing-list



On 11/20/2017 6:39 PM, Ramsay Jones wrote:
> 
> In particular, sparse complains that the armor_{en,de}code_arg()
> functions are 'not declared - should they be static?'. Since the
> armor_decode_arg() symbol does not require more than file visibility,
> we can simply mark the declaration with static. The armor_encode_arg()
> function has no callers, so we simply remove the (unused) definition.
> 
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
> 
> Hi Jeff,
> 
> If you need to re-roll your 'jh/object-filtering' branch, could you
> please squash this (or something like it) into the relevant patch
> (commit bf0aedcbe1, "list-objects: filter objects in traverse_commit_list",
> 16-11-2017).
> 

thanks for the note.
i'm going to remove these functions completely in my next version.
it was decided that we don't need to do encoding/decoding at this level.

Thanks,
Jeff


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

* Re: [PATCH] list-objects-filter-options: fix up some sparse warnings
  2017-11-21 11:04   ` Ramsay Jones
@ 2017-11-22  0:23     ` Stefan Beller
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Beller @ 2017-11-22  0:23 UTC (permalink / raw)
  To: Ramsay Jones
  Cc: Jonathan Nieder, Jeff Hostetler, Junio C Hamano, GIT Mailing-list

> [It would probably be easier if I used git to output this for me, rather
> than typing it into my email client!]

git config alias.gcs "show --date=short -s --pretty='format:%h ("%s", %ad)'"

will make you the `git gcs` alias that I use to describe commits.

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

end of thread, other threads:[~2017-11-22  0:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-20 23:39 [PATCH] list-objects-filter-options: fix up some sparse warnings Ramsay Jones
2017-11-21  1:16 ` Jonathan Nieder
2017-11-21 11:04   ` Ramsay Jones
2017-11-22  0:23     ` Stefan Beller
2017-11-21 12:36 ` Jeff Hostetler

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).