Subject: Re: [PATCHv7 5/6] commit: --squash option for use with rebase --autosquash

From: Stephen Boyd <[email-masked]>
Date: Wed, 03 Nov 2010 02:20:16 -0700

Sorry if I've missed earlier versions and this has already been
answered. You can carry forward Cc's if you like and thus earlier
commentators will be more likely to re-review your code.

On 11/02/10 12:59, Pat Notz wrote:
> +--squash=<commit>::
> +	Construct a commit message for use with `rebase --autosquash`.
> +	The commit message subject line is taken from the specified
> +	commit with a prefix of "squash! ".  Can be used with additional
> +	commit message options (`-m`/`-c`/`-C`/`-F`). See
> +	linkgit:git-rebase[1] for details.

This doesn't mention the editor being invoked. The editor is invoked
only with certain option combinations right? I'm expecting this:

uses editor
------------
--squash
--squash -c
--squash -t
--squash -eF
--squash -eC
--squash -em
--squash --amend

doesn't use editor
------------------
--squash -C = no editor
--squash -m = no editor
--squash -F = no editor

I haven't thoroughly checked the code to make sure that's happening.

> @@ -619,6 +639,16 @@ static int prepare_to_commit(const char *index_file, const char *prefix,
>  	else if (in_merge)
>  		hook_arg1 = "merge";
>  
> +	if (squash_message) {
> +		/*
> +		 * If squash_commit was used for the commit subject,

squash_commit or squash_message?