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

Re: [PATCH v6 00/11] Add interpret-trailers builtin

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Mar 6, 2014, 01:18 UTC
Message-ID
<5317CCDA.40402@ramsay1.demon.co.uk>
In-Reply-To
<20140304193250.14249.56949.chriscool@tuxfamily.org>
On 04/03/14 19:47, Christian Couder wrote:
> This patch series implements a new command:
> 
>         git interpret-trailers
> 
[snip]
Minor problem: this series causes sparse to complain, thus:
    trailer.c:642:6: warning: symbol 'process_trailers' was not \
        declared. Should it be static?
The following patch, on top of the 'pu' branch, fixes it:
--- >8 ---
Subject: [PATCH] trailer.c: suppress sparse warning

Check that the public interface, as declared in the trailer.h header file, is consistent with the actual implementation. Add an #include of the header file into the implementation file.

Noticed by sparse ("'process_trailers' was not declared. Should it be static?").

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
 trailer.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/trailer.c b/trailer.c
index b5de616..95d5874 100644
--- a/trailer.c
+++ b/trailer.c
@@ -1,6 +1,7 @@
 #include "cache.h"
 #include "run-command.h"
 #include "argv-array.h"
+#include "trailer.h"
 /*
  * Copyright (c) 2013 Christian Couder <chriscool@tuxfamily.org>
  */
-- 
1.9.0
--- 8< ---

However, for this to work, in addition to squashing the above patch into
your patch #6, you would need to move the creation of the trailer.h header
file from patch 07/11 ("trailer: add interpret-trailers command") to patch
06/11 ("trailer: put all the processing together and print"), where it should
have been anyway! :-D 

HTH

ATB,
Ramsay Jones

> Christian Couder (11):
>   Add data structures and basic functions for commit trailers
>   trailer: process trailers from stdin and arguments
>   trailer: read and process config information
>   trailer: process command line trailer arguments
>   trailer: parse trailers from stdin
>   trailer: put all the processing together and print
>   trailer: add interpret-trailers command
>   trailer: add tests for "git interpret-trailers"
>   trailer: execute command from 'trailer.<name>.command'
>   trailer: add tests for commands in config file
>   Documentation: add documentation for 'git interpret-trailers'
> 
>  .gitignore                               |   1 +
>  Documentation/git-interpret-trailers.txt | 123 ++++++
>  Makefile                                 |   2 +
>  builtin.h                                |   1 +
>  builtin/interpret-trailers.c             |  33 ++
>  git.c                                    |   1 +
>  t/t7513-interpret-trailers.sh            | 261 ++++++++++++
>  trailer.c                                | 661 +++++++++++++++++++++++++++++++
>  trailer.h                                |   6 +
>  9 files changed, 1089 insertions(+)
>  create mode 100644 Documentation/git-interpret-trailers.txt
>  create mode 100644 builtin/interpret-trailers.c
>  create mode 100755 t/t7513-interpret-trailers.sh
>  create mode 100644 trailer.c
>  create mode 100644 trailer.h
> 
Previous: Christian Couder
Message 21 of 21 in “Add interpret-trailers builtin”
  1. 00/11 Add interpret-trailers builtinChristian Couder, Mar 4, 2014
  2. 01/11 Add data structures and basic functions for commit trailersChristian Couder, Mar 4, 2014
  3. 02/11 trailer: process trailers from stdin and argumentsChristian Couder, Mar 4, 2014
  4. Junio C HamanoMar 5, 2014
  5. Christian CouderMar 7, 2014
  6. Dan CarpenterMar 7, 2014
  7. Christian CouderMar 7, 2014
  8. 03/11 trailer: read and process config informationChristian Couder, Mar 4, 2014
  9. 04/11 trailer: process command line trailer argumentsChristian Couder, Mar 4, 2014
  10. Junio C HamanoMar 5, 2014
  11. 05/11 trailer: parse trailers from stdinChristian Couder, Mar 4, 2014
  12. Junio C HamanoMar 5, 2014
  13. 06/11 trailer: put all the processing together and printChristian Couder, Mar 4, 2014
  14. 07/11 trailer: add interpret-trailers commandChristian Couder, Mar 4, 2014
  15. 08/11 trailer: add tests for "git interpret-trailers"Christian Couder, Mar 4, 2014
  16. Junio C HamanoMar 5, 2014
  17. 09/11 trailer: execute command from 'trailer.<name>.command'Christian Couder, Mar 4, 2014
  18. Junio C HamanoMar 5, 2014
  19. 10/11 trailer: add tests for commands in config fileChristian Couder, Mar 4, 2014
  20. 11/11 Documentation: add documentation for 'git interpret-trailers'Christian Couder, Mar 4, 2014
  21. Ramsay JonesMar 6, 2014

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.