summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-10-30 19:38:50 -0800
committerJunio C Hamano <junkio@cox.net>2006-10-30 19:38:50 -0800
commit83877f8d92b2050eb668dc3351277e57779a8f05 (patch)
treedeedf7e97c113e09a4cb58f4ba25c0339b318279
parent6fb75bed5c4a6ce099a24e581ea327e9de3ab8b0 (diff)
parent9dad9d2e5b322835c87e1653268d892a95ee0f1f (diff)
downloadgit-83877f8d92b2050eb668dc3351277e57779a8f05.tar.gz
Merge branch 'maint'
* maint: revision traversal: --unpacked does not limit commit list anymore. Continue traversal when rev-list --unpacked finds a packed commit. Use memmove instead of memcpy for overlapping areas quote.c: ensure the same quoting across platforms. Surround "#define DEBUG 0" with "#ifndef DEBUG..#endif"
-rw-r--r--blame.c5
-rw-r--r--cache-tree.c2
-rw-r--r--imap-send.c2
-rw-r--r--quote.c2
-rw-r--r--revision.c16
5 files changed, 16 insertions, 11 deletions
diff --git a/blame.c b/blame.c
index e664813cb4..3ec1c8f1b2 100644
--- a/blame.c
+++ b/blame.c
@@ -19,7 +19,9 @@
#include "xdiff-interface.h"
#include "quote.h"
+#ifndef DEBUG
#define DEBUG 0
+#endif
static const char blame_usage[] =
"git-blame [-c] [-l] [-t] [-f] [-n] [-p] [-S <revs-file>] [--] file [commit]\n"
@@ -232,6 +234,9 @@ static void print_map(struct commit *cmit, struct commit *other)
util2->num_lines ? util->num_lines : util2->num_lines;
int num;
+ if (print_map == NULL)
+ ; /* to avoid "unused function" warning */
+
for (i = 0; i < max; i++) {
printf("i: %d ", i);
num = -1;
diff --git a/cache-tree.c b/cache-tree.c
index d388848dd2..a80326289d 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -2,7 +2,9 @@
#include "tree.h"
#include "cache-tree.h"
+#ifndef DEBUG
#define DEBUG 0
+#endif
struct cache_tree *cache_tree(void)
{
diff --git a/imap-send.c b/imap-send.c
index 16804ab286..a6a65680ee 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -272,7 +272,7 @@ buffer_gets( buffer_t * b, char **s )
n = b->bytes - start;
if (n)
- memcpy( b->buf, b->buf + start, n );
+ memmove(b->buf, b->buf + start, n);
b->offset -= start;
b->bytes = n;
start = 0;
diff --git a/quote.c b/quote.c
index ee7d62c751..a418a0f803 100644
--- a/quote.c
+++ b/quote.c
@@ -209,7 +209,7 @@ static int quote_c_style_counted(const char *name, int namelen,
if (!ch)
break;
if ((ch < ' ') || (ch == '"') || (ch == '\\') ||
- (ch == 0177)) {
+ (ch >= 0177)) {
needquote = 1;
switch (ch) {
case '\a': EMITQ(); ch = 'a'; break;
diff --git a/revision.c b/revision.c
index f1e0caaae3..04fa7e5171 100644
--- a/revision.c
+++ b/revision.c
@@ -418,9 +418,6 @@ static void limit_list(struct rev_info *revs)
if (revs->max_age != -1 && (commit->date < revs->max_age))
obj->flags |= UNINTERESTING;
- if (revs->unpacked &&
- has_sha1_pack(obj->sha1, revs->ignore_packed))
- obj->flags |= UNINTERESTING;
add_parents_to_list(revs, commit, &list);
if (obj->flags & UNINTERESTING) {
mark_parents_uninteresting(commit);
@@ -1015,7 +1012,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
add_pending_object(revs, object, def);
}
- if (revs->topo_order || revs->unpacked)
+ if (revs->topo_order)
revs->limited = 1;
if (revs->prune_data) {
@@ -1149,17 +1146,18 @@ struct commit *get_revision(struct rev_info *revs)
* that we'd otherwise have done in limit_list().
*/
if (!revs->limited) {
- if ((revs->unpacked &&
- has_sha1_pack(commit->object.sha1,
- revs->ignore_packed)) ||
- (revs->max_age != -1 &&
- (commit->date < revs->max_age)))
+ if (revs->max_age != -1 &&
+ (commit->date < revs->max_age))
continue;
add_parents_to_list(revs, commit, &revs->commits);
}
if (commit->object.flags & SHOWN)
continue;
+ if (revs->unpacked && has_sha1_pack(commit->object.sha1,
+ revs->ignore_packed))
+ continue;
+
/* We want to show boundary commits only when their
* children are shown. When path-limiter is in effect,
* rewrite_parents() drops some commits from getting shown,