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

Re: [PATCH 2/2] Use NullProgressMonitor.INSTANCE and indent for loop

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 6, 2009, 20:54 UTC
Message-ID
<20090506205444.GN30527@spearce.org>
In-Reply-To
<46FFA889-7EFA-4CF2-9493-81DF5A319B6C@gmail.com>
Alex Blewitt <alex.blewitt@gmail.com> wrote:
Show 5 quoted lines
> I've been using git send-email --format-patch, which doesn't appear to  
> add the signed by line. If I do it as the commit, will it add the  
> signed-by when it gets committed, and thus I can use send-email? git  
> format-patch just seems to dump a load of files into the directory, and 
> (as noted elsewhere) the git-rebase doesn't appear to work for me.

IIRC, "git send-email --format-patch -- -s" would pass -s to the format-patch script, adding the line automatically. But that's an undocumented feature of send-email.

Personally, I put the SOB line in with "git commit -s" when I write the change. Then its there when I dump it out with format-patch.

As for format-patch making a ton of files, yea, that's its job. I actually use the following pair of scripts to manage sending, as this lets me edit _sop/OUT/* before firing it off.

--8<--
#!/bin/sh
if [ -n "$(git rev-parse --show-cdup)" ]; then
	cd $(git rev-parse --show-cdup) || exit
fi
mkdir -p _sop/OUT &&
rm -f $(find _sop/OUT -name '*.patch' | grep -v '0000-cover-letter') &&
base="${1:-master}" &&
if [ $(git rev-list ^$base HEAD | wc -l) -gt 1 ]
then
	n="--numbered --cover-letter"
fi &&
git format-patch \
	--output-directory _sop/OUT \
	--subject-prefix='JGIT PATCH' \
	-M \
	$n \
	$base || exit
----
--8<--
#!/bin/sh
if [ -n "$(git rev-parse --show-cdup)" ]; then
	cd $(git rev-parse --show-cdup) || exit
fi

ls -1 _sop/OUT read

git send-email \
	--to 'Robin Rosenberg <robin.rosenberg@dewire.com>' \
	--cc 'git@vger.kernel.org' \
	--chain-reply-to \
	--suppress-cc self \
	--smtp-server localhost \
	--smtp-server-port 8025 \
	_sop/OUT
----
-- 
Shawn.
Previous: Alex BlewittNext: Robin Rosenberg
Message 6 of 8 in “Allow monitor/unintersting objects to be null”
  1. 1/2 Allow monitor/unintersting objects to be nullAlex Blewitt, May 6, 2009
  2. 2/2 Use NullProgressMonitor.INSTANCE and indent for loopAlex Blewitt, May 6, 2009
  3. Shawn O. PearceMay 6, 2009
  4. Shawn O. PearceMay 6, 2009
  5. Alex BlewittMay 6, 2009
  6. Shawn O. PearceMay 6, 2009
  7. Robin RosenbergMay 6, 2009
  8. Alex BlewittMay 6, 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.