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

Re: [PATCH 1/3] Refactor working tree setup

From
Miles Bader <miles@gnu.org>
Date
Nov 8, 2007, 22:41 UTC
Message-ID
<87bqa4gy2h.fsf@catnip.gol.com>
In-Reply-To
<1194088993-25692-1-git-send-email-mh@glandium.org>
Mike Hommey <mh@glandium.org> writes:
> Create a setup_work_tree() that can be used from any command requiring
> a working tree conditionally.
...
> +void setup_work_tree(void) {
> +	const char *work_tree = get_git_work_tree();
Hi, could you please not use this "function begin brace at EOL" style?

It's inconsistent with the rest of the source, makes the code harder to read, and confuses Emacs in some cases[1]. Also it's an abomination unto God, but I imagine it's the first of these reasons that you'll care about the most... :-)

Thanks,
-Miles

[1] Until quite recently, Emacs c-mode couldn't find the beginning of such functions (recent versions of c-mode seem OK though).

-- 
The secret to creativity is knowing how to hide your sources.
  --Albert Einstein
Previous: Johannes SchindelinNext: Junio C Hamano
Message 5 of 6 in “Refactor working tree setup”
  1. 1/3 Refactor working tree setupMike Hommey, Nov 3, 2007
  2. 2/3 Use setup_work_tree() in builtin-ls-files.cMike Hommey, Nov 3, 2007
  3. 3/3 Don't always require working tree for git-rmMike Hommey, Nov 3, 2007
  4. Johannes SchindelinNov 3, 2007
  5. Miles BaderNov 8, 2007
  6. Junio C HamanoNov 8, 2007

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.