git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Stephen Boyd <bebarino@gmail.com>
Date
Nov 3, 2010, 09:20 UTC
Message-ID
<4CD12950.2080901@gmail.com>
In-Reply-To
<1288727952-57498-6-git-send-email-patnotz@gmail.com>

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:
Show 6 quoted lines
> +--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.
Show 7 quoted lines
> @@ -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?
Previous: Pat NotzNext: Pat Notz
Message 8 of 9 in “[PATCHv7 0/6] Add commit message options for rebase --autosquash”
  1. Pat NotzNov 2, 2010
  2. 1/6 commit: helper methods to reduce redundant blocks of codePat Notz, Nov 2, 2010
  3. Thiago FarinaNov 2, 2010
  4. 2/6 pretty.c: teach format_commit_message() to reencode the outputPat Notz, Nov 2, 2010
  5. 3/6 commit: --fixup option for use with rebase --autosquashPat Notz, Nov 2, 2010
  6. 4/6 add tests of commit --fixupPat Notz, Nov 2, 2010
  7. 5/6 commit: --squash option for use with rebase --autosquashPat Notz, Nov 2, 2010
  8. Stephen BoydNov 3, 2010
  9. 6/6 add tests of commit --squashPat Notz, Nov 2, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.