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

Re: [PATCH] mergetool merge/skip/abort

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 25, 2009, 05:20 UTC
Message-ID
<7vljt0j70w.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090125064539.6117@nanako3.lavabit.com>
Nanako Shiraishi <nanako3@lavabit.com> writes:
Show 10 quoted lines
>  2. patterns in case command start at the same column as case and esac,
>     and ";;" is at the same column as any other commands.
>
> 	case "$ans" in
> 	[mM]*|"")
> 		break
> 		;;
> 	[Ss]*)
> 		...
> 	esac

I generally prefer the above style, but mergetool is not mine, and the predominant style in it is:

        case xyzzy in
            frotz)
                do this
                ;;
            nitfol)
                do that
                ;;
        esac

Namely, case arms' labels are indented by 4 spaces from case/esac, and the commands in each case arm are further indented by 4 spaces (including the terminating double-semicolon).

It is always preferable to match the _local_ convention. I'd expect a new script added to git suite to match my preference (the one I showed you in my comments to you that is used in git-am, which is what you suggested above), but I'd expect a modification to mergetool to match the style mergetool already uses.

IOW, Caleb's indentation style is fine. The placement of double-semicolon is not, though.

Previous: Caleb CushingNext: Theodore Tso
Message 14 of 17 in “mergetool merge/skip/abort”
  1. mergetool merge/skip/abortCaleb Cushing, Jan 21, 2009
  2. Caleb CushingJan 21, 2009
  3. Johannes SchindelinJan 21, 2009
  4. Markus HeidelbergJan 21, 2009
  5. Caleb CushingJan 22, 2009
  6. Charles BaileyJan 21, 2009
  7. Caleb CushingJan 22, 2009
  8. Charles BaileyJan 22, 2009
  9. Caleb CushingJan 23, 2009
  10. Junio C HamanoJan 23, 2009
  11. Caleb CushingJan 24, 2009
  12. Nanako ShiraishiJan 24, 2009
  13. Caleb CushingJan 25, 2009
  14. Junio C HamanoJan 25, 2009
  15. Theodore TsoJan 26, 2009
  16. Charles BaileyJan 27, 2009
  17. Junio C HamanoJan 27, 2009

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.