Re: [PATCH v3 1/4] rebase -i: mark commits that begin empty in todo editor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> writes:

> diff --git a/sequencer.c b/sequencer.c
> index e528225e787..ce9fd27a878 100644
> --- a/sequencer.c
> +++ b/sequencer.c
> @@ -4656,6 +4656,9 @@ static int make_script_with_merges(struct pretty_print_context *pp,
>  			strbuf_addf(&buf, "%s %s %s", cmd_pick,
>  				    oid_to_hex(&commit->object.oid),
>  				    oneline.buf);
> +			if (is_empty)
> +				strbuf_addf(&buf, " %c empty",
> +					    comment_line_char);
> ...
> @@ -4861,6 +4864,8 @@ int sequencer_make_script(struct repository *r, struct strbuf *out,>  		pretty_print_commit(&pp, commit, out);
> +		if (is_empty)
> +			strbuf_addf(out, " %c empty", comment_line_char);
>  		strbuf_addch(out, '\n');

While I was re-reviewing the topics in flight, it occurred to me
that this change may hurt automation if people feed the insn file to
their own machinery to process, as the title in "git log --oneline"
and in the file no longer matches.  I am not sure how big a deal is
(even when I am scripting, I only use the commit object name and
ignore the title string, but there are people with diferent taste in
this world, so...).  It might be safer to add this as a comment on
its own line, next to the usual "pick <commit> <title>" line, but I
dunno.

This is more about raising awareness of possible regression than a
suggestion to change anything.

Thanks.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux