summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 52e8370)
raw | patch | inline | side by side (parent: 52e8370)
author | Dmitry Potapov <dpotapov@gmail.com> | |
Sun, 5 Oct 2008 02:14:40 +0000 (06:14 +0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 6 Oct 2008 14:19:36 +0000 (07:19 -0700) |
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
builtin-apply.c | patch | blob | history | |
builtin-checkout.c | patch | blob | history | |
builtin-reset.c | patch | blob | history |
diff --git a/builtin-apply.c b/builtin-apply.c
index e2c611bf964d8cd589171f74e5ccce5aeb392643..342f2fe5e6476db7cb7b4647aea45a42d7ac7642 100644 (file)
--- a/builtin-apply.c
+++ b/builtin-apply.c
sha1_ptr = sha1;
ce = make_cache_entry(patch->old_mode, sha1_ptr, name, 0, 0);
+ if (!ce)
+ die("make_cache_entry failed for path '%s'", name);
if (add_index_entry(&result, ce, ADD_CACHE_OK_TO_ADD))
die ("Could not add %s to temporary index", name);
}
diff --git a/builtin-checkout.c b/builtin-checkout.c
index b572b3bf69c791912717eae313942316cd77ac37..3762f71aaeae623b37d38c5c03b7a0d10973efc4 100644 (file)
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
ce = make_cache_entry(create_ce_mode(active_cache[pos+1]->ce_mode),
sha1,
path, 2, 0);
+ if (!ce)
+ die("make_cache_entry failed for path '%s'", path);
status = checkout_entry(ce, state, NULL);
return status;
}
diff --git a/builtin-reset.c b/builtin-reset.c
index c24c21909194014b467c86fd3598796e7db576b3..16e6bb20f1af6a7a684a747b3c0cc26ceabe8ce7 100644 (file)
--- a/builtin-reset.c
+++ b/builtin-reset.c
struct cache_entry *ce;
ce = make_cache_entry(one->mode, one->sha1, one->path,
0, 0);
+ if (!ce)
+ die("make_cache_entry failed for path '%s'",
+ one->path);
add_cache_entry(ce, ADD_CACHE_OK_TO_ADD |
ADD_CACHE_OK_TO_REPLACE);
} else