[PATCH 5/9] strbuf: add strbuf_isspace()

2013-12-23 Thread Christian Couder
This helper function checks if a strbuf contains only space chars or not. Signed-off-by: Christian Couder --- strbuf.c | 7 +++ strbuf.h | 1 + 2 files changed, 8 insertions(+) diff --git a/strbuf.c b/strbuf.c index 83caf4a..2124bb8 100644 --- a/strbuf.c +++ b/strbuf.c @@ -124,6 +124,13 @@

[PATCH 2/9] trailer: process trailers from file and arguments

2013-12-23 Thread Christian Couder
This patch implements the logic that process trailers from file and arguments. At the beginning trailers from file are in their own infile_tok doubly linked list, and trailers from arguments are in their own arg_tok doubly linked list. The lists are traversed and when an arg_tok should be "applie

[PATCH 7/9] trailer: put all the processing together and print

2013-12-23 Thread Christian Couder
This patch adds the process_trailers() function that calls all the previously added processing functions and then prints the results on the standard output. Signed-off-by: Christian Couder --- trailer.c | 40 1 file changed, 40 insertions(+) diff --git a

[PATCH 4/9] trailer: process command line trailer arguments

2013-12-23 Thread Christian Couder
This patch parses the trailer command line arguments and put the result into an arg_tok doubly linked list. Signed-off-by: Christian Couder --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/trailer.c b/trailer.c ind

[PATCH 6/9] trailer: parse trailers from input file

2013-12-23 Thread Christian Couder
This patch reads trailers from an input file, parses them and puts the result into a doubly linked list. Signed-off-by: Christian Couder --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git a/trailer.c b/trailer.c index b

[PATCH 3/9] trailer: read and process config information

2013-12-23 Thread Christian Couder
This patch implements reading the configuration to get trailer information, and then processing it and storing it in a doubly linked list. The config information is stored in the list whose first item is pointed to by: static struct trailer_item *first_conf_item; Signed-off-by: Christian Couder

[PATCH 1/9] Add data structures and basic functions for commit trailers

2013-12-23 Thread Christian Couder
We will use a doubly linked list to store all information about trailers and their configuration. This way we can easily remove or add trailers to or from trailer lists while traversing the lists in either direction. Signed-off-by: Christian Couder --- Makefile | 1 + trailer.c | 47 +

[PATCH 8/9] trailer: add interpret-trailers command

2013-12-23 Thread Christian Couder
This patch adds the "git interpret-trailers" command. This command uses the previously added process_trailers() function in trailer.c. Signed-off-by: Christian Couder --- .gitignore | 1 + Makefile | 1 + builtin.h| 1 + builtin/interp

[PATCH 0/9] Add interpret-trailers builtin

2013-12-23 Thread Christian Couder
This patch series implements a new command: git interpret-trailers and an infrastructure to process trailers that can be reused, for example in "commit.c". 1) Rationale: This command should help with RFC 822 style headers, called "trailers", that are found at the end of commit messages.

[PATCH 9/9] trailer: add tests for "git interpret-trailers"

2013-12-23 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t7513-interpret-trailers.sh | 206 ++ 1 file changed, 206 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh new file mode 100755

Re: [PATCH] add: don't complain when adding empty project root

2013-12-23 Thread Duy Nguyen
On Tue, Dec 24, 2013 at 12:48 AM, Torsten Bögershausen wrote: >> +test_expect_success 'git add -A on empty repo does not error out' ' >> + git init empty && ( cd empty && git add -A . ) >> +' >> + >> test_done >> > I am (a little bit) confused. > > This is what git does: > rm -rf test && mkd

[PATCH] remote-hg: test 'shared_path' in a moved clone

2013-12-23 Thread Antoine Pelisse
Since e71d1378 (remote-hg: fix 'shared path' path, 2013-12-07), Mercurial 'shared_path' file is correctly updated whenever a clone is moved. Make sure it keeps working, especially as this is depending on a private Mercurial file. Signed-off-by: Antoine Pelisse --- contrib/remote-helpers/test-hg.

Re: [PATCH] add: don't complain when adding empty project root

2013-12-23 Thread Torsten Bögershausen
On 2013-12-23 10.02, Nguyễn Thái Ngọc Duy wrote: > This behavior was added in 07d7bed (add: don't complain when adding > empty project root - 2009-04-28) then broken by 84b8b5d (remove > match_pathspec() in favor of match_pathspec_depth() - > 2013-07-14). Reinstate it. > > Noticed-by: Thomas Ferri

Re: Rationale behind 'extern' on protypes in .h files

2013-12-23 Thread Jed Brown
Ravi Shekhar Jethani writes: > To check this I installed the libgit2-dev package which installed: > /usr/include/git2/*.h , /usr/lib/libgit2.so > Now, I exported all symbols using: > $ readelf -s /usr/lib/libgit2.so > and tried to match these with 'externed' prototypes in the Git source > director

Re: Rationale behind 'extern' on protypes in .h files

2013-12-23 Thread Ravi Shekhar Jethani
2013/12/22 Jed Brown : > There is a difference for shared libraries if you would like to control > which symbols are exported. With gcc, for example, you might compile > using -fvisibility=hidden. Any functions explicitly declared with > extern, bearing __attribute__((visibility("default")), or u

[PATCH] add: don't complain when adding empty project root

2013-12-23 Thread Nguyễn Thái Ngọc Duy
This behavior was added in 07d7bed (add: don't complain when adding empty project root - 2009-04-28) then broken by 84b8b5d (remove match_pathspec() in favor of match_pathspec_depth() - 2013-07-14). Reinstate it. Noticed-by: Thomas Ferris Nicolaisen Signed-off-by: Nguyễn Thái Ngọc Duy --- built