Re: [PATCH v4 01/23] sha1write: make buffer const-correct

2013-12-22 Thread Christian Couder
On Sat, Dec 21, 2013 at 2:59 PM, Jeff King p...@peff.net wrote: We are passed a void * and write it out without ever s/are passed/pass/ Cheers, Christian. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

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

2013-12-23 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- 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

[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 chrisc...@tuxfamily.org --- .gitignore | 1 + Makefile | 1 + builtin.h

[PATCH 0/9] Add interpret-trailers builtin

2013-12-23 Thread Christian Couder
option 3) Notes: * I chose trailer.token.key over trailer.token.value and trailer.token.trailer, as I think it is clearer. * I focused on a cleaner and more complete implementation than the PATCH/RFC I sent previously. Happy end of year! Christian Couder (9): Add data structures and basic

[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 chrisc...@tuxfamily.org --- trailer.c | 40 1 file changed, 40

[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 chrisc...@tuxfamily.org --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git

[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 chrisc...@tuxfamily.org --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git

[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 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 chrisc...@tuxfamily.org --- 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

[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 chrisc...@tuxfamily.org --- Makefile | 1

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

2013-12-23 Thread Christian Couder
be applied, it is removed from its list and inserted into the infile_tok list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 189 ++ 1 file changed, 189 insertions(+) diff --git a/trailer.c b/trailer.c index ccbcfb0

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

2013-12-24 Thread Christian Couder
On Tue, Dec 24, 2013 at 7:37 AM, Christian Couder chrisc...@tuxfamily.org wrote: +static int git_trailer_config(const char *conf_key, const char *value, void *cb) +{ + if (starts_with(conf_key, trailer.)) { + const char *orig_conf_key = conf_key; + struct

Re: how to recovery corrupted git blob

2013-12-26 Thread Christian Couder
Hi, On Thu, Dec 26, 2013 at 9:35 AM, Yvonne Leroy articulati...@gmail.com wrote: 1- at the beginning, with git fsck --full, it showed: [...] missing blob e187557d07857b974ea51e3ea962ac120cfc9488 [...] commit e415bb6d51ee05d60055d89f2bf63ccb32f4c12c Author: Yvonne Leroy

Re: [PATCH v3 07/10] builtin/replace: teach listing using short, medium or full formats

2013-12-28 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder christian.cou...@gmail.com writes: Ok, so would you prefer the following: - NAME_ONLY_REPLACE_FMT and --format=name_only instead of SHORT_REPLACE_FMT and --format=short - NAME_AND_VALUE_REPLACE_FMT and --format=name_and_value

[PATCH v4 05/10] t6050: show that git cat-file --batch fails with replace objects

2013-12-28 Thread Christian Couder
a3fb2e1845a1aaf129b7975048973414dc172173 | git cat-file --batch a3fb2e1845a1aaf129b7975048973414dc172173 commit 231 fatal: object a3fb2e1845a1aaf129b7975048973414dc172173 change size!? The goal of this patch is to show this breakage. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t

[PATCH v4 01/10] Rename READ_SHA1_FILE_REPLACE flag to LOOKUP_REPLACE_OBJECT

2013-12-28 Thread Christian Couder
. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 4 ++-- sha1_file.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index ce377e1..873a6b5 100644 --- a/cache.h +++ b/cache.h @@ -760,11 +760,11 @@ int daemon_avoid_alias(const char *path

[PATCH v4 07/10] builtin/replace: teach listing using short, medium or long formats

2013-12-28 Thread Christian Couder
': this also lists the sha1 of the replacement objects 'long': this shows the sha1 and the type of both the replaced and the replacement objects Some documentation and some tests will follow. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin

[PATCH v4 03/10] Introduce lookup_replace_object_extended() to pass flags

2013-12-28 Thread Christian Couder
Currently, there is only one caller to lookup_replace_object() that can benefit from passing it some flags, but we expect that there could be more. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- cache.h | 6 ++ sha1_file.c | 3 +-- 2 files changed, 7 insertions(+), 2

[PATCH v4 02/10] replace_object: don't check read_replace_refs twice

2013-12-28 Thread Christian Couder
the check in do_lookup_replace_object(). Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- replace_object.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/replace_object.c b/replace_object.c index d0b1548..cdcaf8c 100644 --- a/replace_object.c +++ b/replace_object.c @@ -97,9 +97,6

[PATCH v4 00/10] teach replace objects to sha1_object_info_extended()

2013-12-28 Thread Christian Couder
'. This avoids a compilation conflict on Windows where SHORT is predefined. Thanks to Karsten for reporting this problem. These changes only affect patches 7/10, 8/10, 9/10 and 10/10 that add a new --format option to list replace refs. Christian Couder (10): Rename READ_SHA1_FILE_REPLACE

[PATCH v4 10/10] Documentation/git-replace: describe --format option

2013-12-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index f373ab4..0a02f70 100644 --- a/Documentation/git

[PATCH v4 06/10] sha1_file: perform object replacement in sha1_object_info_extended()

2013-12-28 Thread Christian Couder
sha1_object_info_extended() should perform object replacement if it is needed. The simplest way to do that is to make it call lookup_replace_object_extended(). And now its unsigned flags parameter is used as it is passed to lookup_replace_object_extended(). Signed-off-by: Christian Couder

[PATCH v4 04/10] Add an unsigned flags parameter to sha1_object_info_extended()

2013-12-28 Thread Christian Couder
This parameter is not used yet, but it will be used to tell sha1_object_info_extended() if it should perform object replacement or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/cat-file.c | 2 +- cache.h| 2 +- sha1_file.c| 6 +++--- streaming.c

[PATCH v4 09/10] builtin/replace: unset read_replace_refs

2013-12-28 Thread Christian Couder
object which might be different. To fix this bug, and because git replace should work at a level before replacement takes place, let's unset the read_replace_refs global variable at the beginning of cmd_replace(). Suggested-by: Jeff King p...@peff.net Signed-off-by: Christian Couder chrisc

[PATCH v4 08/10] t6050: add tests for listing with --format

2013-12-28 Thread Christian Couder
This patch adds tests for git replace -l --format=fmt. 'short', 'medium' and 'long' are the only allowed values for fmt. 'short' is the same as with no --format option. Tests for 'medium' and 'long' are the most needed. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050

Re: [PATCH v4 00/10] teach replace objects to sha1_object_info_extended()

2013-12-30 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: The only changes compared to version 3 are the following: I'll queue this instead on top, as the series is already in 'next'. Great! Thanks, Christian. -- To unsubscribe from this list: send the line

Re: [PATCH 2/2] Speed up is_git_command() by checking early for internal commands

2014-01-02 Thread Christian Couder
On Mon, Dec 30, 2013 at 10:07 PM, Sebastian Schuberth sschube...@gmail.com wrote: Since 2dce956 is_git_command() was a bit slow as it does file I/O in the call to list_commands_in_dir(). Avoid the file I/O by adding an early check for internal commands. Signed-off-by: Sebastian Schuberth

[PATCH v2 01/16] Add data structures and basic functions for commit trailers

2014-01-19 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 chrisc...@tuxfamily.org --- Makefile | 1

[PATCH v2 00/16] Add interpret-trailers builtin

2014-01-19 Thread Christian Couder
$/ /' -\EOF in the tests as suggested by Junio. * I added many commits on top of the previous series, but of course they can be squashed. Christian Couder (16): Add data structures and basic functions for commit trailers trailer: process trailers from file and arguments trailer: read and process

[PATCH v2 16/16] trailer: add tests for commands using env variables

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index 2d50b7a..00894a8 100755 --- a/t/t7513-interpret-trailers.sh +++ b

[PATCH v2 07/16] trailer: put all the processing together and print

2014-01-19 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 chrisc...@tuxfamily.org --- trailer.c | 40 1 file changed, 40

[PATCH v2 06/16] trailer: parse trailers from input file

2014-01-19 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 chrisc...@tuxfamily.org --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git

[PATCH v2 10/16] trailer: if no input file is passed, read from stdin

2014-01-19 Thread Christian Couder
It is simpler and more natural if the git interpret-trailers is made a filter as its output already goes to sdtout. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/interpret-trailers.c | 2 +- t/t7513-interpret-trailers.sh | 7 +++ trailer.c | 15

[PATCH v2 14/16] trailer: add tests for trailer command

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index f5ef81f..2d50b7a 100755 --- a/t/t7513-interpret

[PATCH v2 13/16] trailer: execute command from 'trailer.name.command'

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 57 + 1 file changed, 57 insertions(+) diff --git a/trailer.c b/trailer.c index 43a3735..549d381 100644 --- a/trailer.c +++ b/trailer.c @@ -1,4 +1,5 @@ #include

[PATCH v2 09/16] trailer: add tests for git interpret-trailers

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 208 ++ 1 file changed, 208 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret

[PATCH v2 11/16] trailer: add new_trailer_item() function

2014-01-19 Thread Christian Couder
This is a small refactoring to prepare for the next steps. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/trailer.c b/trailer.c index 9026337..43a3735 100644

[PATCH v2 05/16] strbuf: add strbuf_isspace()

2014-01-19 Thread Christian Couder
This helper function checks if a strbuf contains only space chars or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- 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

[PATCH v2 08/16] trailer: add interpret-trailers command

2014-01-19 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 chrisc...@tuxfamily.org --- .gitignore | 1 + Makefile | 1 + builtin.h

[PATCH v2 12/16] strbuf: add strbuf_replace()

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- strbuf.c | 7 +++ strbuf.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/strbuf.c b/strbuf.c index 2124bb8..e45e513 100644 --- a/strbuf.c +++ b/strbuf.c @@ -197,6 +197,13 @@ void strbuf_splice(struct strbuf *sb, size_t pos

[PATCH v2 02/16] trailer: process trailers from file and arguments

2014-01-19 Thread Christian Couder
be applied, it is removed from its list and inserted into the infile_tok list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 189 ++ 1 file changed, 189 insertions(+) diff --git a/trailer.c b/trailer.c index d80d047

[PATCH v2 15/16] trailer: set author and committer env variables

2014-01-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/trailer.c b/trailer.c index 549d381..3b21f57 100644 --- a/trailer.c +++ b/trailer.c @@ -1,5 +1,6 @@ #include cache.h #include

[PATCH v2 04/16] trailer: process command line trailer arguments

2014-01-19 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 chrisc...@tuxfamily.org --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git

[PATCH v2 03/16] trailer: read and process config information

2014-01-19 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

Re: [Question] Usercase about git clone

2014-01-19 Thread Christian Couder
Hi, On Fri, Jan 17, 2014 at 4:53 PM, Wang Shilong wangshilong1...@gmail.com wrote: Hello everyone, I have a question about command 'git clone' If i clone a repo from remote, and if i run command: # git remote show origin It will output origin's url, however, this is what i want, Is it

Re: Bug archive

2014-01-20 Thread Christian Couder
Hi, On Mon, Jan 20, 2014 at 5:11 PM, Abhishek Patil abhis...@thezeroth.net wrote: Hey Guys, I am Abhishek, I am new here. For now I just have one question is there any centralize DB place where I can see Bugs reported on / about Git ? something like bugzilla of trac for Git-Scm ? Please

[PATCH v3 14/17] trailer: add tests for trailer command

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index f5ef81f..2d50b7a 100755 --- a/t/t7513-interpret

[PATCH v3 16/17] trailer: add tests for commands using env variables

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index 2d50b7a..00894a8 100755 --- a/t/t7513-interpret-trailers.sh +++ b

[PATCH v3 06/17] trailer: parse trailers from input file

2014-01-26 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 chrisc...@tuxfamily.org --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git

[PATCH v3 12/17] strbuf: add strbuf_replace()

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- strbuf.c | 7 +++ strbuf.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/strbuf.c b/strbuf.c index 2124bb8..e45e513 100644 --- a/strbuf.c +++ b/strbuf.c @@ -197,6 +197,13 @@ void strbuf_splice(struct strbuf *sb, size_t pos

[PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-interpret-trailers.txt | 137 +++ 1 file changed, 137 insertions(+) create mode 100644 Documentation/git-interpret-trailers.txt diff --git a/Documentation/git-interpret-trailers.txt b

[PATCH v3 02/17] trailer: process trailers from file and arguments

2014-01-26 Thread Christian Couder
be applied, it is removed from its list and inserted into the infile_tok list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 189 ++ 1 file changed, 189 insertions(+) diff --git a/trailer.c b/trailer.c index d80d047

[PATCH v3 13/17] trailer: execute command from 'trailer.name.command'

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 56 1 file changed, 56 insertions(+) diff --git a/trailer.c b/trailer.c index 6eec3ce..dc81a01 100644 --- a/trailer.c +++ b/trailer.c @@ -1,4 +1,5 @@ #include cache.h

[PATCH v3 07/17] trailer: put all the processing together and print

2014-01-26 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 chrisc...@tuxfamily.org --- trailer.c | 40 1 file changed, 40

[PATCH v3 11/17] trailer: add new_trailer_item() function

2014-01-26 Thread Christian Couder
This is a small refactoring to prepare for the next steps. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/trailer.c b/trailer.c index d581371..6eec3ce 100644

[PATCH v3 03/17] trailer: read and process config information

2014-01-26 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 v3 09/17] trailer: add tests for git interpret-trailers

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 208 ++ 1 file changed, 208 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret

[PATCH v3 15/17] trailer: set author and committer env variables

2014-01-26 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/trailer.c b/trailer.c index dc81a01..6c2a2b9 100644 --- a/trailer.c +++ b/trailer.c @@ -1,5 +1,6 @@ #include cache.h #include

[PATCH v3 08/17] trailer: add interpret-trailers command

2014-01-26 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 chrisc...@tuxfamily.org --- .gitignore | 1 + Makefile | 1 + builtin.h

[PATCH v3 10/17] trailer: if no input file is passed, read from stdin

2014-01-26 Thread Christian Couder
It is simpler and more natural if the git interpret-trailers is made a filter as its output already goes to sdtout. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/interpret-trailers.c | 2 +- t/t7513-interpret-trailers.sh | 7 +++ trailer.c | 15

[PATCH v3 04/17] trailer: process command line trailer arguments

2014-01-26 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 chrisc...@tuxfamily.org --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git

[PATCH v3 05/17] strbuf: add strbuf_isspace()

2014-01-26 Thread Christian Couder
This helper function checks if a strbuf contains only space chars or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- 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

[PATCH v3 00/17] Add interpret-trailers builtin

2014-01-26 Thread Christian Couder
: - support GIT_COMMIT_PROTO env variable in commands 3) Changes since version 2: * the declared after statement are fixed * the style issues in for loops are fixed * there is some documentation Christian Couder (17): Add data structures and basic functions for commit trailers trailer: process

[PATCH v3 01/17] Add data structures and basic functions for commit trailers

2014-01-26 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 chrisc...@tuxfamily.org --- Makefile | 1

Re: [PATCH v2 04/16] trailer: process command line trailer arguments

2014-01-26 Thread Christian Couder
Junio C Hamano gits...@pobox.com writes: +static struct trailer_item *create_trailer_item(const char *string) +{ + struct strbuf tok = STRBUF_INIT; + struct strbuf val = STRBUF_INIT; + struct trailer_item *new; + + parse_trailer(tok, val, string); + + int tok_alnum_len =

Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-27 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Sun, Jan 26, 2014 at 12:00 PM, Christian Couder chrisc...@tuxfamily.org wrote: Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt new

Re: [PATCH v3 00/17] Add interpret-trailers builtin

2014-01-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Is this from the same Christian? Yes, ... The series seems to have unusually high rate of style violations compared to the usual submission, like these: ERROR: open brace '{' following function declarations go on the next line #78: FILE:

Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Subject: Re: [PATCH v3 17/17] Documentation: add documentation for 'git interpret-trailers' Date: Mon, 27 Jan 2014 13:20:18 -0800 Christian Couder chrisc...@tuxfamily.org writes: +'git interpret-trailers' [--trim-empty] [--infile=file] [token[=value

[PATCH v4 00/17] Add interpret-trailers builtin

2014-01-29 Thread Christian Couder
: - support GIT_COMMIT_PROTO env variable in commands 3) Changes since version 3, thanks to Eric and Junio: * the usage string/synopsis of the command was improved * some spelling/wording mistakes in the doc were fixed * some style issues were fixed Christian Couder (17): Add data structures

[PATCH v4 01/17] Add data structures and basic functions for commit trailers

2014-01-29 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 chrisc...@tuxfamily.org --- Makefile | 1

[PATCH v4 03/17] trailer: read and process config information

2014-01-29 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 v4 06/17] trailer: parse trailers from input file

2014-01-29 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 chrisc...@tuxfamily.org --- trailer.c | 62 ++ 1 file changed, 62 insertions(+) diff --git

[PATCH v4 13/17] trailer: execute command from 'trailer.name.command'

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 56 1 file changed, 56 insertions(+) diff --git a/trailer.c b/trailer.c index 430ff39..dc8908a 100644 --- a/trailer.c +++ b/trailer.c @@ -1,4 +1,5 @@ #include cache.h

[PATCH v4 08/17] trailer: add interpret-trailers command

2014-01-29 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 chrisc...@tuxfamily.org --- .gitignore | 1 + Makefile | 1 + builtin.h

[PATCH v4 05/17] strbuf: add strbuf_isspace()

2014-01-29 Thread Christian Couder
This helper function checks if a strbuf contains only space chars or not. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- 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

[PATCH v4 17/17] Documentation: add documentation for 'git interpret-trailers'

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-interpret-trailers.txt | 132 +++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/git-interpret-trailers.txt diff --git a/Documentation/git-interpret-trailers.txt b

[PATCH v4 10/17] trailer: if no input file is passed, read from stdin

2014-01-29 Thread Christian Couder
It is simpler and more natural if the git interpret-trailers is made a filter as its output already goes to sdtout. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/interpret-trailers.c | 2 +- t/t7513-interpret-trailers.sh | 7 +++ trailer.c | 15

[PATCH v4 11/17] trailer: add new_trailer_item() function

2014-01-29 Thread Christian Couder
This is a small refactoring to prepare for the next steps. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/trailer.c b/trailer.c index 73a65e0..430ff39 100644

[PATCH v4 16/17] trailer: add tests for commands using env variables

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index 2d50b7a..00894a8 100755 --- a/t/t7513-interpret-trailers.sh +++ b

[PATCH v4 09/17] trailer: add tests for git interpret-trailers

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 208 ++ 1 file changed, 208 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret

[PATCH v4 12/17] strbuf: add strbuf_replace()

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- strbuf.c | 7 +++ strbuf.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/strbuf.c b/strbuf.c index 2124bb8..e45e513 100644 --- a/strbuf.c +++ b/strbuf.c @@ -197,6 +197,13 @@ void strbuf_splice(struct strbuf *sb, size_t pos

[PATCH v4 07/17] trailer: put all the processing together and print

2014-01-29 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 chrisc...@tuxfamily.org --- trailer.c | 40 1 file changed, 40

[PATCH v4 04/17] trailer: process command line trailer arguments

2014-01-29 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 chrisc...@tuxfamily.org --- trailer.c | 77 +++ 1 file changed, 77 insertions(+) diff --git

[PATCH v4 02/17] trailer: process trailers from file and arguments

2014-01-29 Thread Christian Couder
be applied, it is removed from its list and inserted into the infile_tok list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 189 ++ 1 file changed, 189 insertions(+) diff --git a/trailer.c b/trailer.c index aed25e1

[PATCH v4 14/17] trailer: add tests for trailer command

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index f5ef81f..2d50b7a 100755 --- a/t/t7513-interpret

[PATCH v4 15/17] trailer: set author and committer env variables

2014-01-29 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/trailer.c b/trailer.c index dc8908a..e29b7f2 100644 --- a/trailer.c +++ b/trailer.c @@ -1,5 +1,6 @@ #include cache.h #include

Re: Having Git follow symlinks

2014-01-30 Thread Christian Couder
On Thu, Jan 30, 2014 at 10:01 AM, Peter Krefting pe...@softwolves.pp.se wrote: Johan Herland: I believe a preferable way to manage dotfiles in Git, is to have a script that does the necessary setup/installation from the repo (that lives in some subdirectory of ~) and into ~. There are tools

Re: [RFH] hackday and GSoC topic suggestions

2014-02-06 Thread Christian Couder
On Wed, Feb 5, 2014 at 11:57 PM, Jeff King p...@peff.net wrote: On a similar note, the GSoC application deadline is Feb 14th. I am happy to be admin again and put together the application, but we will need an idea page. I'll set up a page to collect them, but in the meantime, please dump any

Re: [PATCH v4 08/17] trailer: add interpret-trailers command

2014-02-06 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Thu, Jan 30, 2014 at 1:49 AM, Christian Couder chrisc...@tuxfamily.org wrote: diff --git a/trailer.h b/trailer.h new file mode 100644 index 000..9db4459 --- /dev/null +++ b/trailer.h @@ -0,0 +1,6 @@ +#ifndef TRAILER_H +#define TRAILER_H

Re: [PATCH v4 10/17] trailer: if no input file is passed, read from stdin

2014-02-06 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Thu, Jan 30, 2014 at 1:49 AM, Christian Couder chrisc...@tuxfamily.org wrote: It is simpler and more natural if the git interpret-trailers is made a filter as its output already goes to sdtout. Signed-off-by: Christian Couder chrisc

[PATCH v5 06/14] trailer: put all the processing together and print

2014-02-06 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 chrisc...@tuxfamily.org --- trailer.c | 40 1 file changed, 40

[PATCH v5 08/14] trailer: add tests for git interpret-trailers

2014-02-06 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 208 ++ 1 file changed, 208 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret

[PATCH v5 00/14] Add interpret-trailers builtin

2014-02-06 Thread Christian Couder
: - check for memory leaks - add test for empty token Christian Couder (14): Add data structures and basic functions for commit trailers trailer: process trailers from file and arguments trailer: read and process config information trailer: process command line trailer arguments trailer

[PATCH v5 03/14] trailer: read and process config information

2014-02-06 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 v5 11/14] trailer: add tests for trailer command

2014-02-06 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 27 +++ 1 file changed, 27 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index f5ef81f..2d50b7a 100755 --- a/t/t7513-interpret

[PATCH v5 14/14] Documentation: add documentation for 'git interpret-trailers'

2014-02-06 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-interpret-trailers.txt | 132 +++ 1 file changed, 132 insertions(+) create mode 100644 Documentation/git-interpret-trailers.txt diff --git a/Documentation/git-interpret-trailers.txt b

[PATCH v5 07/14] trailer: add interpret-trailers command

2014-02-06 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 chrisc...@tuxfamily.org --- .gitignore | 1 + Makefile | 1 + builtin.h

[PATCH v5 13/14] trailer: add tests for commands using env variables

2014-02-06 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t7513-interpret-trailers.sh | 20 1 file changed, 20 insertions(+) diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh index 2d50b7a..00894a8 100755 --- a/t/t7513-interpret-trailers.sh +++ b

[PATCH v5 12/14] trailer: set author and committer env variables

2014-02-06 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- trailer.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/trailer.c b/trailer.c index 98187fc..b5de616 100644 --- a/trailer.c +++ b/trailer.c @@ -1,5 +1,6 @@ #include cache.h #include

[PATCH v5 01/14] Add data structures and basic functions for commit trailers

2014-02-06 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 chrisc...@tuxfamily.org --- Makefile | 1

  1   2   3   4   5   6   7   8   9   10   >