Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > Junio C Hamano writes: > >> The duplicated code to read the same file bothers me somewhat. >> >> I wondered if it makes the result easier to follow (and easier to >> update) if this part of the code is restructured like this: >> >>

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-09 Thread Junio C Hamano
Junio C Hamano writes: > The duplicated code to read the same file bothers me somewhat. > > I wondered if it makes the result easier to follow (and easier to > update) if this part of the code is restructured like this: > > if (file_exists(git_path_merge_msg()) || >

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-08 Thread Junio C Hamano
Sven Strickroth writes: > Here hook_arg1 would be always "merge" and never "squash"... Before my > change it was only "squash" if no conflict occurred. Oh, that wasn't an intended change. It was merely an illustration of a possible restructuring of the flow to avoid having to

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-08 Thread Sven Strickroth
Am 08.03.2016 um 19:32 schrieb Junio C Hamano: >> +if (!stat(git_path_squash_msg(), )) { >> +if (strbuf_read_file(, git_path_squash_msg(), 0) < 0) >> +die_errno(_("could not read SQUASH_MSG")); >> +hook_arg1 =

Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-08 Thread Junio C Hamano
Sven Strickroth writes: > Subject: Re: [PATCH] Also read SQUASH_MSG if a conflict on a merge squash > occurred A reader sees this line in the output of "git shortlog --no-merges"; does it sufficiently tell her which Git subcommand is affected by this change, if this is a

[PATCH] Also read SQUASH_MSG if a conflict on a merge squash occurred

2016-03-07 Thread Sven Strickroth
After a merge --squash with a conflict the commit message did not contain the information about the squashed commits, but only the "# Conflicts:" information. Signed-off-by: Sven Strickroth --- builtin/commit.c | 6 ++ 1 file changed, 6 insertions(+) diff --git