提交 7c496280 编写于 作者: J Junio C Hamano

git-format-patch -3

This teaches "git-format-patch" to honor the --max-count
parameter revision traversal machinery takes, so that you can
say "git-format-patch -3" to process the three topmost commits
from the current HEAD (or "git-format-patch -2 topic" to name a
specific branch).
Signed-off-by: NJunio C Hamano <junkio@cox.net>
上级 df1b059d
......@@ -126,6 +126,9 @@ git-format-patch -M -B origin::
understand renaming patches, so use it only when you know
the recipient uses git to apply your patch.
git-format-patch -3::
Extract three topmost commits from the current branch
and format them as e-mailable patches.
See Also
--------
......
......@@ -482,8 +482,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
}
if (rev.pending.nr == 1) {
rev.pending.objects[0].item->flags |= UNINTERESTING;
add_head(&rev);
if (rev.max_count < 0) {
rev.pending.objects[0].item->flags |= UNINTERESTING;
add_head(&rev);
}
/* Otherwise, it is "format-patch -22 HEAD", and
* get_revision() would return only the specified count.
*/
}
if (ignore_if_in_upstream)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册