diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-06-25 11:02:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-06-25 11:02:10 -0700 |
commit | c53312583b2d25b6ed5f0aa421993795743d1da6 (patch) | |
tree | 6c93284d0591ed5b210139fcfff040689f8199fa /tree.c | |
parent | f249409b6be74132e80e6d83f264aaa158563be1 (diff) | |
parent | ce4e7b2ac38cfe5e4c165411d2e37b22e445ab88 (diff) | |
download | git-c53312583b2d25b6ed5f0aa421993795743d1da6.tar.gz git-c53312583b2d25b6ed5f0aa421993795743d1da6.tar.xz |
Merge branch 'jk/squelch-missing-link-warning-for-unreachable' into maint
Recent "git prune" traverses young unreachable objects to safekeep
old objects in the reachability chain from them, which sometimes
caused error messages that are unnecessarily alarming.
* jk/squelch-missing-link-warning-for-unreachable:
suppress errors on missing UNINTERESTING links
silence broken link warnings with revs->ignore_missing_links
add quieter versions of parse_{tree,commit}
Diffstat (limited to 'tree.c')
-rw-r--r-- | tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -204,7 +204,7 @@ int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size) return 0; } -int parse_tree(struct tree *item) +int parse_tree_gently(struct tree *item, int quiet_on_missing) { enum object_type type; void *buffer; @@ -214,7 +214,8 @@ int parse_tree(struct tree *item) return 0; buffer = read_sha1_file(item->object.sha1, &type, &size); if (!buffer) - return error("Could not read %s", + return quiet_on_missing ? -1 : + error("Could not read %s", sha1_to_hex(item->object.sha1)); if (type != OBJ_TREE) { free(buffer); |