Jacob Keller <jacob.e.kel...@intel.com> writes:

> From: Jacob Keller <jacob.kel...@gmail.com>
>
> Change the default behavior of git-format-patch to generate numbered
> sequence of 0/1 and 1/1 when generating both a cover-letter and a single
> patch. This standardizes the cover letter to have 0/N which helps
> distinguish the cover letter from the patch itself. Since the behavior
> is easily changed via configuration as well as the use of -n and -N this
> should be acceptable default behavior.
>
> Signed-off-by: Jacob Keller <jacob.kel...@gmail.com>
> ---

This obviously changes the behaviour, but I do not think of a reason
why this change is a bad idea.  

>  builtin/log.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/builtin/log.c b/builtin/log.c
> index 92dc34dcb0cc..8e6100fb0c5b 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -1676,7 +1676,7 @@ int cmd_format_patch(int argc, const char **argv, const 
> char *prefix)
>               /* nothing to do */
>               return 0;
>       total = nr;
> -     if (!keep_subject && auto_number && total > 1)
> +     if (!keep_subject && auto_number && (total > 1 || cover_letter))
>               numbered = 1;
>       if (numbered)
>               rev.total = total + start_number - 1;
--
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  http://vger.kernel.org/majordomo-info.html

Reply via email to