Re: [PATCH v3 1/2] rerere "remaining"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 16, 2011, 21:14 UTC
- Message-ID
- <7vk4gziswj.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1297853265-18993-2-git-send-email-martin.von.zweigbergk@gmail.com>
Martin von Zweigbergk <martin.von.zweigbergk@gmail.com> writes:
> Junio, I wasn't sure how to handle the sign-off etc, so feel free to > modify those as appropriate.
At this point I think the primary value of the change is your adding "rerere_remaining()" to only where it matters (i.e. the isolation of the change) and you should get the credit as the primary author. Mine was impossible to read because I contaminated merge_rr in a wrong place and had to work it around in unrelated codepaths all over the place.
This was much cleaner and easier to read.
Show 27 quoted lines
> builtin/rerere.c | 17 +++++++++--
> rerere.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++-------
> rerere.h | 8 +++++
> 3 files changed, 91 insertions(+), 13 deletions(-)
>
> diff --git a/builtin/rerere.c b/builtin/rerere.c
> index 642bf35..7b9fe18 100644
> --- a/builtin/rerere.c
> +++ b/builtin/rerere.c
> @@ -8,7 +8,7 @@
> #include "xdiff-interface.h"
>
> static const char * const rerere_usage[] = {
> - "git rerere [clear | status | diff | gc]",
> + "git rerere [clear | status | remaining | diff | gc]",
> NULL,
> };
>
> @@ -154,9 +154,20 @@ int cmd_rerere(int argc, const char **argv, const char *prefix)
> } else if (!strcmp(argv[0], "gc"))
> garbage_collect(&merge_rr);
> else if (!strcmp(argv[0], "status"))
> - for (i = 0; i < merge_rr.nr; i++)
> + for (i = 0; i < merge_rr.nr; i++) {
> printf("%s\n", merge_rr.items[i].string);
> - else if (!strcmp(argv[0], "diff"))
> + }Unnecessary {} around a single printf(). Will clean-up.Thanks.