summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: df1b059)
raw | patch | inline | side by side (parent: df1b059)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 17 Jan 2007 21:35:13 +0000 (13:35 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 18 Jan 2007 07:48:20 +0000 (23:48 -0800) |
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: Junio C Hamano <junkio@cox.net>
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: Junio C Hamano <junkio@cox.net>
Documentation/git-format-patch.txt | patch | blob | history | |
builtin-log.c | patch | blob | history |
index 574cf76dca2194e9d13d5db384d39409a9095740..811c6e2e77fda7b06ae0816a0beb56dff77161a6 100644 (file)
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
--------
diff --git a/builtin-log.c b/builtin-log.c
index 1cd9d3f76834b40eb217cbb36784b85d5d076e3a..9453e6d2db672d593195e199a10cc6ce1bf34db2 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
}
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)