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.
This commit is contained in:
Linus Torvalds
2005-07-03 13:07:52 -07:00
parent dade09c226
commit 960bba0d8c
2 changed files with 14 additions and 3 deletions

View File

@ -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;