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

Re: [RFC/PATCH 2/4] Restructuring git-merge.sh

From
Jakub Narebski <jnareb@gmail.com>
Date
Mar 26, 2008, 12:40 UTC
Message-ID
<m3od91vetv.fsf@localhost.localdomain>
In-Reply-To
<402c10cd0803252056n122cae6cv1a6f4e46a5fb5096@mail.gmail.com>
"Sverre Hvammen Johansen" <hvammen@gmail.com> writes:
> for preparation of new feature:

A bit of nit-picking: I'd like to have full sentences in commit message (in the commit description); continuing first line isn't the best style, IMHO. I'd write instead the following:

  Restructure git-merge.sh, adding find_real_parents() function,
  in preparation for new feature:
 
Show 18 quoted lines
>    Head reduction before selecting merge strategy
> 
> Signed-off-by: Sverre Hvammen Johansen <hvammen@gmail.com>
> ---
>  git-merge.sh |  166 ++++++++++++++++++++++++++++++----------------------------
>  1 files changed, 85 insertions(+), 81 deletions(-)
> 
> diff --git a/git-merge.sh b/git-merge.sh
> index 17f40f2..2acd2cc 100755
> --- a/git-merge.sh
> +++ b/git-merge.sh
> @@ -207,6 +207,29 @@ parse_config () {
>         args_left=$#
>  }
> 
> +# Find real parents
> +# Set the following variables as followd:
> +#   real_parents: The parents specified on the command line
Not specified_parents, or arg_parents?
> +#   common:       All common ancestors or not_queried
> +#   ff_head:      Fast forward of head
> +find_real_parents () {
Very nice.
> +       real_parents=$(git rev-parse "$@")
> +       real_parents=${real_parents#$LF}
Why this trick with adding $LF?
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Previous: Sverre Hvammen JohansenNext: Junio C Hamano
Message 2 of 3 in “Re: [RFC/PATCH 2/4] Restructuring git-merge.sh”
  1. Sverre Hvammen JohansenMar 26, 2008
  2. Jakub NarebskiMar 26, 2008
  3. Junio C HamanoMar 26, 2008

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.