[PATCH v12 01/11] trailer: add data structures and basic functions

2014-05-24 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 Signed-off-by: Junio C

[PATCH v12 08/11] trailer: add tests for git interpret-trailers

2014-05-24 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t7513-interpret-trailers.sh | 444 ++ 1 file changed, 444 insertions(+) create mode 100755 t/t7513-interpret-trailers.sh diff --git a/t/t7513

[PATCH v12 02/11] trailer: process trailers from input message and arguments

2014-05-24 Thread Christian Couder
should be applied, it is removed from its list and inserted into the in_tok list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 198 ++ 1 file changed, 198 insertions

[PATCH v12 00/11] Add interpret-trailers builtin

2014-05-24 Thread Christian Couder
, especially about how the key config variable is used (11/11) Christian Couder (11): trailer: add data structures and basic functions trailer: process trailers from input message and arguments trailer: read and process config information trailer: process command line trailer arguments

[PATCH v12 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-05-24 Thread Christian Couder
While at it add git-interpret-trailers to command-list.txt. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-interpret-trailers.txt | 264 +++ command-list.txt | 1

[PATCH v12 03/11] trailer: read and process config information

2014-05-24 Thread Christian Couder
Read the configuration to get trailer information, and then process it and store 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 chrisc...@tuxfamily.org

[PATCH v12 07/11] trailer: add interpret-trailers command

2014-05-24 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 Signed-off-by: Junio C Hamano gits...@pobox.com --- .gitignore | 1 + Makefile

[PATCH v12 05/11] trailer: parse trailers from file or stdin

2014-05-24 Thread Christian Couder
Read trailers from a file or from stdin, parse the trailers and then put the result into a doubly linked list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 123

[PATCH v12 09/11] trailer: execute command from 'trailer.name.command'

2014-05-24 Thread Christian Couder
Let the user specify a command that will give on its standard output the value to use for the specified trailer. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 65

[PATCH v12 04/11] trailer: process command line trailer arguments

2014-05-24 Thread Christian Couder
Parse the trailer command line arguments and put the result into an arg_tok doubly linked list. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 118 ++ 1 file

[PATCH v12 06/11] trailer: put all the processing together and print

2014-05-24 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 Signed-off-by: Junio C Hamano gits...@pobox.com --- trailer.c | 56

Re: [PATCH v10 11/12] Documentation: add documentation for 'git interpret-trailers'

2014-05-25 Thread Christian Couder
From: Michael Haggerty mhag...@alum.mit.edu On 04/25/2014 11:07 PM, Christian Couder wrote: I don't think there is a lot of complexity. But maybe I need to explain how it works better. Feel free to suggest me sentences I could add. I am really excited about having better support

Re: [PATCH v1 0/3] Add --graft option to git replace

2014-05-27 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Subject: Re: [PATCH v1 0/3] Add --graft option to git replace Date: Fri, 23 May 2014 09:59:05 -0700 Christian Couder chrisc...@tuxfamily.org writes: Here is a small patch series to implement: git replace [-f] --graft commit [parent

[PATCH v2 2/4] replace: add test for --graft

2014-06-01 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16

[PATCH v2 0/4] Add --graft option to git replace

2014-06-01 Thread Christian Couder
that was previously sent separately - in patch 4/4 rename the existing grafts file into grafts.bak Christian Couder (4): replace: add --graft option replace: add test for --graft Documentation: replace: add --graft option contrib: add convert-grafts-to-replace-refs.sh Documentation/git

[PATCH v2 1/4] replace: add --graft option

2014-06-01 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 84 ++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/builtin/replace.c b/builtin/replace.c index

[PATCH v2 3/4] Documentation: replace: add --graft option

2014-06-01 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Documentation

[PATCH v2 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-01 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

Re: [PATCH v1 1/3] replace: add --graft option

2014-06-01 Thread Christian Couder
From: Jeff King p...@peff.net On Thu, May 22, 2014 at 11:33:04PM +0200, Christian Couder wrote: The usage string for this option is: git replace [-f] --graft commit [parent...] First we create a new commit that is the same as commit except that its parents are [parents...] Then we

Re: [PATCH v2 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-02 Thread Christian Couder
From: Eric Sunshine sunsh...@sunshineco.com On Sun, Jun 1, 2014 at 11:10 AM, Christian Couder chrisc...@tuxfamily.org wrote: +test -f $GRAFTS_FILE || die Could not find graft file: '$GRAFTS_FILE' + +grep '^[^# ]' $GRAFTS_FILE | while read definition +do + test -n $definition

[PATCH v3 2/4] replace: add test for --graft

2014-06-04 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16

[PATCH v3 3/4] Documentation: replace: add --graft option

2014-06-04 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Documentation

[PATCH v3 1/4] replace: add --graft option

2014-06-04 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 84 ++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/builtin/replace.c b/builtin/replace.c index

[PATCH v3 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-04 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

[PATCH v3 0/4] Add --graft option to git replace

2014-06-04 Thread Christian Couder
) Christian Couder (4): replace: add --graft option replace: add test for --graft Documentation: replace: add --graft option contrib: add convert-grafts-to-replace-refs.sh Documentation/git-replace.txt | 10 builtin/replace.c | 84

Re: Best practices/conventions for tags and references in commit message

2014-06-05 Thread Christian Couder
On Thu, Jun 5, 2014 at 4:10 PM, Thomas Koch tho...@koch.ro wrote: On Tuesday, May 27, 2014 03:49:24 PM Johan Herland wrote: Search the mailing list archives for git-interpret-trailers. It's coming. Nice! I started a table to collect how different projects or tools use trailers:

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:49 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +static int create_graft(int argc, const char **argv, int force) +{ + unsigned char old[20], new[20]; + const char *old_ref = argv[0]; + struct commit

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-06 Thread Christian Couder
On Fri, Jun 6, 2014 at 5:29 PM, Christian Couder christian.cou...@gmail.com wrote: Yeah, or I could just rely on the fact that lookup_commit_or_die() already parses the commit, with something like this: if (get_sha1(old_ref, old) 0) die(_(Not a valid object name: '%s

Re: [PATCH v3 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-06 Thread Christian Couder
On Thu, Jun 5, 2014 at 11:55 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: diff --git a/contrib/convert-grafts-to-replace-refs.sh b/contrib/convert-grafts-to-replace-refs.sh new file mode 100755 index 000..8472879 --- /dev/null +++ b

[PATCH v4 2/4] replace: add test for --graft

2014-06-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -351,4 +351,16

[PATCH v4 0/4] Add --graft option to git replace

2014-06-07 Thread Christian Couder
to parse_commit_buffer(), as lookup_commit_or_die() already reads the commit buffer and parses it (patch 1/4) - source git-sh-setup and other small cosmetic changes in convert-grafts-to-replace-refs.sh (patch 4/4) Christian Couder (4): replace: add --graft option replace: add test for --graft

[PATCH v4 4/4] contrib: add convert-grafts-to-replace-refs.sh

2014-06-07 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

[PATCH v4 3/4] Documentation: replace: add --graft option

2014-06-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Documentation

[PATCH v4 1/4] replace: add --graft option

2014-06-07 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 62 ++- 1 file changed, 61 insertions(+), 1 deletion(-) diff --git a/builtin/replace.c b/builtin/replace.c index

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-08 Thread Christian Couder
On Fri, Jun 6, 2014 at 5:44 PM, Christian Couder christian.cou...@gmail.com wrote: /* find existing parents */ strbuf_addstr(buf, commit-buffer); Unfortunately, it looks like the above will not work if the commit-buffer contains an embedded NUL. I wonder if it is a real problem

Re: [PATCH 15/15] commit: record buffer length in cache

2014-06-09 Thread Christian Couder
From: Jeff King p...@peff.net --- a/builtin/blame.c +++ b/builtin/blame.c @@ -2313,7 +2313,7 @@ static struct commit *fake_working_tree_commit(struct diff_options *opt, ident, ident, path, (!contents_from ? path :

Re: [PATCH 15/15] commit: record buffer length in cache

2014-06-10 Thread Christian Couder
From: Jeff King p...@peff.net Subject: Re: [PATCH 15/15] commit: record buffer length in cache Date: Tue, 10 Jun 2014 16:33:49 -0400 On Tue, Jun 10, 2014 at 01:27:13AM -0400, Jeff King wrote: I find the above strange. I would have done something like: - set_commit_buffer(commit,

Re: What's cooking in git.git (Jun 2014, #03; Tue, 10)

2014-06-12 Thread Christian Couder
On Wed, Jun 11, 2014 at 12:19 AM, Junio C Hamano gits...@pobox.com wrote: * cc/interpret-trailers (2014-05-28) 11 commits - Documentation: add documentation for 'git interpret-trailers' - trailer: add tests for commands in config file - trailer: execute command from 'trailer.name.command'

[PATCH v5 1/7] replace: add --graft option

2014-06-28 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/replace.c | 66 ++- 1 file changed, 65 insertions(+), 1 deletion(-) diff

[PATCH v5 2/7] replace: add test for --graft

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 12 1 file changed, 12 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..ca45a84 100755 --- a/t/t6050-replace.sh +++ b/t

[PATCH v5 0/7] Add --graft option to git replace

2014-06-28 Thread Christian Couder
. It is unfortunate that merge-tags don't use a format like the trailer format, because we could have factorised droping a merge-tag in the git interpret-trailers command. Christian Couder (7): replace: add --graft option replace: add test for --graft Documentation: replace: add --graft

[PATCH v5 6/7] replace: remove signature when using --graft

2014-06-28 Thread Christian Couder
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder chrisc

[PATCH v5 3/7] Documentation: replace: add --graft option

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644

[PATCH v5 7/7] replace: add test for --graft with signed commit

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index ca45a84..80b85e3 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -7,6 +7,7

[PATCH v5 4/7] contrib: add convert-grafts-to-replace-refs.sh

2014-06-28 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

[PATCH v5 5/7] replace: refactor replacing parents

2014-06-28 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 42 +- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index 3515979..ad47237 100644 --- a/builtin/replace.c +++ b/builtin

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-29 Thread Christian Couder
On Sun, Jun 8, 2014 at 10:18 AM, Junio C Hamano gits...@pobox.com wrote: On Sat, Jun 7, 2014 at 11:49 PM, Christian Couder christian.cou...@gmail.com wrote: On Fri, Jun 6, 2014 at 5:44 PM, Christian Couder christian.cou...@gmail.com wrote: /* find existing parents

Re: [PATCH v12 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-06-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: +The trailers are recognized in the input message using the following +rules: + +* only lines that contains a ':' (colon) are considered trailers, + +* the trailer lines must all be next to each other

Re: [PATCH v3 1/4] replace: add --graft option

2014-06-30 Thread Christian Couder
On Mon, Jun 30, 2014 at 8:37 AM, Junio C Hamano gits...@pobox.com wrote: Christian Couder christian.cou...@gmail.com writes: Now, after having read the recent thread about git verify-commit, I understand that you also want me to drop the signature of a tag that was merged, because

Re: [PATCH v12 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-07-01 Thread Christian Couder
On Mon, Jun 30, 2014 at 1:57 PM, Jakub Narębski jna...@gmail.com wrote: Christian Couder wrote: + + +* Configure a 'sign' trailer with a command to automatically add a + 'Signed-off-by: ' with the author information only if there is no + 'Signed-off-by: ' already, and show how

Re: [PATCH v5 2/7] replace: add test for --graft

2014-07-03 Thread Christian Couder
On Wed, Jul 2, 2014 at 10:49 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 12 1 file changed, 12

Re: [PATCH v5 5/7] replace: refactor replacing parents

2014-07-03 Thread Christian Couder
On Wed, Jul 2, 2014 at 11:05 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 42 +- 1 file changed, 25 insertions(+), 17

Re: [PATCH v5 6/7] replace: remove signature when using --graft

2014-07-03 Thread Christian Couder
On Wed, Jul 2, 2014 at 11:19 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created

Re: [PATCH v5 7/7] replace: add test for --graft with signed commit

2014-07-03 Thread Christian Couder
On Wed, Jul 2, 2014 at 11:22 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +test_expect_success GPG 'set up a signed commit' ' + echo line 17 hello + echo line 18 hello Style? Yeah, I will change it to: echo line 17 hello

[PATCH v6 00/10] Add --graft option to git replace

2014-07-07 Thread Christian Couder
and 10/10 to check mergetags - add functions to test parents in patch 3/10 and 7/10 - improve testing signed commits in patch 7/10 - improve warning when removing commit signature in patch 6/10 Christian Couder (10): replace: cleanup redirection style in tests replace: add --graft option

[PATCH v6 01/10] replace: cleanup redirection style in tests

2014-07-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..fb07ad2 100755 --- a/t/t6050-replace.sh

[PATCH v6 02/10] replace: add --graft option

2014-07-07 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/replace.c | 74 ++- 1 file changed, 73 insertions(+), 1 deletion(-) diff

[PATCH v6 06/10] replace: remove signature when using --graft

2014-07-07 Thread Christian Couder
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder chrisc

[PATCH v6 05/10] contrib: add convert-grafts-to-replace-refs.sh

2014-07-07 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

[PATCH v6 10/10] replace: add test for --graft with a mergetag

2014-07-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 15fd541..3bb8d06 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -416,4 +416,26

[PATCH v6 04/10] Documentation: replace: add --graft option

2014-07-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644

[PATCH v6 07/10] replace: add test for --graft with signed commit

2014-07-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 25 + 1 file changed, 25 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index d80a89e..15fd541 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -7,6 +7,7

[PATCH v6 03/10] replace: add test for --graft

2014-07-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 40 1 file changed, 40 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index fb07ad2..d80a89e 100755

[PATCH v6 09/10] replace: check mergetags when using --graft

2014-07-07 Thread Christian Couder
could remove the mergetag, but in this case there is a good chance that the title or other elements of the commit might also be misleading. So let's just error out and suggest to use --edit instead on the commit. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 47

[PATCH v6 08/10] commit: add for_each_mergetag()

2014-07-07 Thread Christian Couder
In the same way as there is for_each_ref() to iterate on refs, it might be useful to have for_each_mergetag() to iterate on the mergetags of a given commit. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- commit.c | 13 + commit.h | 5 + log-tree.c | 15

Re: [PATCH v6 09/10] replace: check mergetags when using --graft

2014-07-07 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: When using --graft, with a mergetag in the original commit, we should check that the commit pointed to by the mergetag is still a parent of then new commit we create, otherwise the mergetag could

Re: [PATCH v6 03/10] replace: add test for --graft

2014-07-07 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 40 1 file changed, 40

Re: [PATCH v6 08/10] commit: add for_each_mergetag()

2014-07-07 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: In the same way as there is for_each_ref() to iterate on refs, it might be useful to have for_each_mergetag() to iterate on the mergetags of a given commit. Signed-off-by: Christian Couder chrisc

Re: [PATCH v6 02/10] replace: add --graft option

2014-07-10 Thread Christian Couder
On Wed, Jul 9, 2014 at 4:59 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder chrisc...@tuxfamily.org writes: +static void replace_parents(struct strbuf *buf, int argc, const char **argv) +{ + struct strbuf new_parents = STRBUF_INIT; + const char *parent_start, *parent_end

Re: [PATCH v6 02/10] replace: add --graft option

2014-07-11 Thread Christian Couder
On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: As the user might expect that a new replace ref was created on success (0 exit code), and as we should at least warn if we would create a commit that is the same as an existing

Re: [PATCH v6 02/10] replace: add --graft option

2014-07-11 Thread Christian Couder
On Fri, Jul 11, 2014 at 4:22 PM, Junio C Hamano gits...@pobox.com wrote: Christian Couder christian.cou...@gmail.com writes: On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano gits...@pobox.com wrote: Making sure A's parent is B would be an idempotent operation, no? Why not just make sure A's

[PATCH v7 7/9] replace: add test for --graft with signed commit

2014-07-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 24 1 file changed, 24 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index f854dae..cebab63 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -7,6 +7,7

[PATCH v7 4/9] Documentation: replace: add --graft option

2014-07-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644

[PATCH v7 3/9] replace: add test for --graft

2014-07-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- t/t6050-replace.sh | 45 - 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index fb07ad2

[PATCH v7 5/9] contrib: add convert-grafts-to-replace-refs.sh

2014-07-19 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of git replace. While at it let's mention this new script in the git replace documentation for the --graft option. Signed-off-by: Christian Couder chrisc

[PATCH v7 9/9] replace: add test for --graft with a mergetag

2014-07-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index cebab63..4d5a25e 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -418,4 +418,26

[PATCH v7 8/9] replace: check mergetags when using --graft

2014-07-19 Thread Christian Couder
could remove the mergetag, but in this case there is a good chance that the title or other elements of the commit might also be misleading. So let's just error out and suggest to use --edit instead on the commit. Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- builtin/replace.c | 47

[PATCH v7 0/9] Add --graft option to git replace

2014-07-19 Thread Christian Couder
. Christian Couder (9): replace: cleanup redirection style in tests replace: add --graft option replace: add test for --graft Documentation: replace: add --graft option contrib: add convert-grafts-to-replace-refs.sh replace: remove signature when using --graft replace: add test

[PATCH v7 2/9] replace: add --graft option

2014-07-19 Thread Christian Couder
be straightforward to convert grafts to replace refs. Signed-off-by: Christian Couder chrisc...@tuxfamily.org Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/replace.c | 74 ++- 1 file changed, 73 insertions(+), 1 deletion(-) diff

[PATCH v7 1/9] replace: cleanup redirection style in tests

2014-07-19 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6050-replace.sh | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..fb07ad2 100755 --- a/t/t6050-replace.sh

[PATCH v7 6/9] replace: remove signature when using --graft

2014-07-19 Thread Christian Couder
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder chrisc

Re: [PATCH] replace: fix replacing object with itself

2014-11-15 Thread Christian Couder
[Sorry to resend this. I am really bad at making gmail on my Android smartphone send plain text emails.] On Fri, Nov 14, 2014 at 11:45 PM, Junio C Hamano gits...@pobox.com wrote: Manzur Mukhitdinov manzu...@gmail.com writes: When object is replaced with itself git shows unhelpful messages

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-17 Thread Christian Couder
On Mon, Nov 17, 2014 at 8:20 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: (I am not saying that there should be an easy way to drop cruft left by third-party systems such as Change-id: line) ... Heh, that was should not be, but I guess it was probably

Re: [PATCH] Introduce a hook to run after formatting patches

2014-11-20 Thread Christian Couder
On Fri, Nov 21, 2014 at 12:33 AM, Junio C Hamano gits...@pobox.com wrote: Stefan Beller sbel...@google.com writes: So I have read the man page on the trailers and it seems like the solution to my problem in removing parts from the commit message. However I did not find out, if it can be run

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-25 Thread Christian Couder
On Tue, Nov 25, 2014 at 3:00 PM, Paolo Bonzini bonz...@gnu.org wrote: From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets an am.messageid configuration key to set the default, and a --no-message-id option to override the

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-25 Thread Christian Couder
On Tue, Nov 25, 2014 at 6:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 25/11/2014 17:27, Christian Couder wrote: From: Paolo Bonzini pbonz...@redhat.com This series adds a --message-id option to git-mailinfo and git-am. git-am also gets an am.messageid configuration key to set

Re: [PATCH 0/2] git-am: add --message-id/--no-message-id options

2014-11-26 Thread Christian Couder
On Wed, Nov 26, 2014 at 10:07 AM, Paolo Bonzini bonz...@gnu.org wrote: On 25/11/2014 22:21, Christian Couder wrote: On Tue, Nov 25, 2014 at 6:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: As far as I understand, all the git-am hooks are called on the commit rather than the incoming email

Re: [PATCH] introduce git root

2014-11-30 Thread Christian Couder
On Mon, Dec 1, 2014 at 4:04 AM, Junio C Hamano gits...@pobox.com wrote: If I were redoing this today, I would probably nominate the git potty as such a kitchen synk command. We have --man-path that shows the location of the manual pages, --exec-path[=path] that either shows or allows us to

Re: [PATCH] introduce git root

2014-12-02 Thread Christian Couder
On Tue, Dec 2, 2014 at 8:04 AM, Jeff King p...@peff.net wrote: On Mon, Dec 01, 2014 at 05:17:22AM +0100, Christian Couder wrote: On Mon, Dec 1, 2014 at 4:04 AM, Junio C Hamano gits...@pobox.com wrote: If I were redoing this today, I would probably nominate the git potty as such a kitchen

Re: [PATCH] introduce git root

2014-12-04 Thread Christian Couder
Jeff King p...@peff.net wrote: Some of the discussion has involved mixing config options into this kitchen sink, but that does not make any sense to me (and is why I find git var -l so odd). Config options are fundamentally different, in that they are set and retrieved, not computed (from

Re: [PATCH] introduce git root

2014-12-06 Thread Christian Couder
On Fri, Dec 5, 2014 at 10:27 AM, Jeff King p...@peff.net wrote: On Fri, Dec 05, 2014 at 03:27:17AM +0100, Christian Couder wrote: I do not think git var --exec-path is a good idea, nor GIT_EXEC_PATH for the environment-variable confusion you mentioned. I was thinking of just creating a new

Re: Accept-language test fails on Mac OS

2014-12-08 Thread Christian Couder
On Sun, Dec 7, 2014 at 8:18 AM, Jeff King p...@peff.net wrote: On Sat, Dec 06, 2014 at 10:04:06PM +0100, Torsten Bögershausen wrote: I get this: expecting success: check_language ko-KR, *;q=0.1 ko_KR.UTF-8 de_DE.UTF-8 ja_JP.UTF-8 en_US.UTF-8 check_language de-DE, *;q=0.1

Re: [RFC/PATCH 0/5] git-glossary

2014-12-08 Thread Christian Couder
On Mon, Dec 8, 2014 at 4:38 PM, Michael J Gruber g...@drmicha.warpmail.net wrote: More and more people use Git in localised setups, which usually means mixed localisation setups - not only, but also because of our English man pages. Here's an attempt at leveraging our current infrastructure

Re: [PATCH] introduce git root

2014-12-10 Thread Christian Couder
On Tue, Dec 9, 2014 at 7:17 PM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net writes: But the one place I do not agree is: I think sequence.editor and core.editor are better because: - they use the same syntax as the config variables, so they are easier to remember and to

Re: confusion with some `git reset` commands

2014-12-18 Thread Christian Couder
On Tue, Dec 16, 2014 at 7:39 PM, Arup Rakshit arupraks...@rocketmail.com wrote: From the command help I see - [arup@to_do_app]$ git reset -h You can also use git help reset to have the full man page. It has a lot more information. But I am looking for any differences - Do you have some

Re: Misbehaving git bisect bad HEAD

2014-12-22 Thread Christian Couder
On Mon, Dec 22, 2014 at 3:04 PM, Andreas Schwab sch...@linux-m68k.org wrote: Running git bisect bad should be the same as git bisect bad HEAD, shouldn't it? Yeah, it should. When replaying this bisect log on the Linux kernel tree: git bisect start # bad:

[PATCH 2/2] bisect: add test to check that revs are properly parsed

2014-12-25 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- t/t6030-bisect-porcelain.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh index 064f5ce..e6abe65 100755 --- a/t/t6030-bisect-porcelain.sh +++ b/t/t6030-bisect

[PATCH 1/2] bisect: parse revs before passing them to check_expected_revs()

2014-12-25 Thread Christian Couder
in bisect_state(). Let's just store the hash values that result from this parsing, and then reuse them after all the parsing is done. This way we can also use a for loop over these values to call bisect_write() on them, instead of using eval. Signed-off-by: Christian Couder chrisc...@tuxfamily.org

Re: [PATCH 1/2] bisect: parse revs before passing them to check_expected_revs()

2014-12-29 Thread Christian Couder
From: Junio C Hamano gits...@pobox.com Christian Couder chrisc...@tuxfamily.org writes: When running for example git bisect bad HEAD or git bisect good master, the parameter passed to git bisect (bad|good) has to be parsed into a commit hash before checking if it is the expected commit

[PATCH 3/3] Documentation: add trailer.trimEmpty config variable

2015-02-07 Thread Christian Couder
Signed-off-by: Christian Couder chrisc...@tuxfamily.org --- Documentation/git-interpret-trailers.txt | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/git-interpret-trailers.txt b/Documentation/git-interpret-trailers.txt index d6d9231..816dd65 100644

<    2   3   4   5   6   7   8   9   10   11   >