aboutsummaryrefslogtreecommitdiffstats
path: root/rev-list.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-07-03 13:07:52 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-03 13:07:52 -0700
commit960bba0d8c14c9eb76bbb42eebc39eff58fc452b (patch)
tree11debe811d5fcdc8cc347a4c9aab607bf91fe4cf /rev-list.c
parentdade09c2269ec2117df085e8a99efcabccf08c53 (diff)
downloadgit-960bba0d8c14c9eb76bbb42eebc39eff58fc452b.tar.gz
Add "--all" flag to rev-parse that shows all refs
And make git-rev-list just silently ignore non-commit refs if we're not asking for all objects.
Diffstat (limited to 'rev-list.c')
-rw-r--r--rev-list.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rev-list.c b/rev-list.c
index fb75c22bc7..abb611f8b5 100644
--- a/rev-list.c
+++ b/rev-list.c
@@ -377,7 +377,7 @@ static struct commit *get_commit_reference(const char *name, unsigned int flags)
if (object->type == tree_type) {
struct tree *tree = (struct tree *)object;
if (!tree_objects)
- die("%s is a tree object, not a commit", name);
+ return NULL;
if (flags & UNINTERESTING) {
mark_tree_uninteresting(tree);
return NULL;
@@ -392,7 +392,7 @@ static struct commit *get_commit_reference(const char *name, unsigned int flags)
if (object->type == blob_type) {
struct blob *blob = (struct blob *)object;
if (!blob_objects)
- die("%s is a blob object, not a commit", name);
+ return NULL;
if (flags & UNINTERESTING) {
mark_blob_uninteresting(blob);
return NULL;