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

Re: [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that can occur when the script is sourced on systems with "set, -u."

From
Shawn O. Pearce <spearce@spearce.org>
Date
Jan 13, 2009, 16:45 UTC
Message-ID
<20090113164518.GS10179@spearce.org>
In-Reply-To
<496CBD17.3000207@tedpavlic.com>
Ted Pavlic <ted@tedpavlic.com> wrote:
Show 10 quoted lines
>
> Third in a series of patches that make bash completions more robust to
> different interactive shell configurations and editors.
>
> [PATCH 3/3] Adds a #!bash to the top of bash completions so that editors  
> can recognize
>  it as a bash script. Also adds a few simple comments above commands that
>  take arguments. The comments are meant to remind editors of potential
>  problems that can occur when the script is sourced on systems with "set
>  -u."

Aside from the message format... OK. The message really should have looked like this from an mbox point of view:

	From: Ted Pavlic <ted@tedpavlic.com>
	To: git <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>
	Cc: "Shawn O. Pearce" <spearce@spearce.org>
	Bcc: 
	Subject: [PATCH 3/3] bash-completion: Add internal function documentation
	Slightly document the internal functions of the bash
	completion package, so callers are more easily able to
	determine the expected arguments.
	Signed-off-by: Ted Pavlic <ted@tedpavlic.com>
	---
	 Third in a series to improve the bash completion package,
	 so it sucks less.
	 contrib/completion/git-completion.bash |   15 +++++++++++++++
	 1 files changed, 15 insertions(+), 0 deletions(-)
	diff --git a/contrib/completion/git-completion.bash  

See how the stuff that doesn't matter to the commit message itself goes after the "---" line? And how the subject is a niceshort, one line summary of the module impacted and the change? These show up in gitk and git shortlog, and thus in the "What's changed in git.git" newsletters Junio publishes. Its important that the subject be really short and sweet. You can put more detail above the "---" line, and it will be included in the commit when Junio applies it.

This is all based on the formatting at the time of commit. Anything up to the first "\n\n" in a commit message goes into the email subject line. The rest goes into the email body, but above the "---" line. You can then edit the buffer before sending to insert non-commit message text after the "---" and before the diff stat.

You can include my Ack'd by line below your Signed-off-by when you resend it.

Acked-by: Shawn O. Pearce <spearce@spearce.org>
> ---
>  contrib/completion/git-completion.bash |   15 +++++++++++++++
>  1 files changed, 15 insertions(+), 0 deletions(-)
-- 
Shawn.
Previous: Ted PavlicNext: Boyd Stephen Smith Jr.
Message 2 of 7 in “Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that can occur when the script is sourced on systems with "set, -u."”
  1. 3/3 Adds a #!bash to the top of bash completions so that editors can recognize, it as a bash script. Also adds a few simple comments above commands that, take arguments. The comments are meant to remind editors of potential, problems that can occur when the script is sourced on systems with "set, -u."Ted Pavlic, Jan 13, 2009
  2. Shawn O. PearceJan 13, 2009
  3. Boyd Stephen Smith Jr.Jan 13, 2009
  4. Adeodato SimóJan 13, 2009
  5. Commit messagesTeemu Likonen, Jan 13, 2009
  6. Ted PavlicJan 14, 2009
  7. Markus HeidelbergJan 15, 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.