From: Sven Verdoolaege <skimo@kotnet.org>
---
builtin-read-tree.c | 9 ++++++---
unpack-trees.c | 3 +++
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/builtin-read-tree.c b/builtin-read-tree.c
index 929dd95..b9fcff7 100644
--- a/builtin-read-tree.c
+++ b/builtin-read-tree.c
@@ -17,9 +17,12 @@ static struct object_list *trees;
static int list_tree(unsigned char *sha1)
{
- struct tree *tree = parse_tree_indirect(sha1);
- if (!tree)
- return -1;
+ struct tree *tree = NULL;
+ if (!is_null_sha1(sha1)) {
+ tree = parse_tree_indirect(sha1);
+ if (!tree)
+ return -1;
+ }
object_list_append(&tree->object, &trees);
return 0;
}
diff --git a/unpack-trees.c b/unpack-trees.c
index e979bc5..30c2a49 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -26,6 +26,9 @@ static struct tree_entry_list *create_tree_entry_list(struct tree *tree)
struct tree_entry_list *ret = NULL;
struct tree_entry_list **list_p = &ret;
+ if (!tree)
+ return ret;
+
if (!tree->object.parsed)
parse_tree(tree);
--
1.5.2.rc3.783.gc7476-dirty
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
| Ingo Molnar | Re: [PATCH 6/6] sched: disabled rt-bandwidth by default |
| Maciej W. Rozycki | [PATCH 2/2] acpi: Disable IRQ 0 through I/O APIC for some HP systems |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Ryan Hope | reiser4 for 2.6.27-rc1 |
git: | |
| Johannes Schindelin | Re: [PATCH] use natural ordering to display list of branches. |
| David Kastrup | Terminology question about remote branches. |
| David Kastrup | Re: If you would write git from scratch now, what would you change? |
| Johannes Schindelin | [PATCH 1/2] clone: Add an option to set up a mirror |
| Martin Toft | Mysterious transfer speed differences |
| Joachim Schipper | Re: OpenBSD/alpha Status |
| Richard Daemon | OpenBSD 4.3 running in VirtualBox? Anyone have it working properly? |
| Diana Eichert | Re: In Memoriam: Jun-ichiro Hagino |
| binto | Before & After Under The Giant Lock |
| Florent Thoumie | Re: New wpi driver |
| Peter Jeremy | Re: repeatedly opening the same .so(s) is slow? |
| Dirk Engling | Re: Strange keyboard (viral?) behaviour |
