Skip to content

Commit

Permalink
Merge branch 'jk/sha1-file-reduce-useless-warnings'
Browse files Browse the repository at this point in the history
* jk/sha1-file-reduce-useless-warnings:
  sha1_file: squelch "packfile cannot be accessed" warnings
  • Loading branch information
Junio C Hamano committed May 11, 2015
2 parents 68a2e6a + 319b678 commit cedeffe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -961,10 +961,8 @@ static int want_object_in_pack(const unsigned char *sha1,
off_t offset = find_pack_entry_one(sha1, p);
if (offset) {
if (!*found_pack) {
if (!is_pack_valid(p)) {
warning("packfile %s cannot be accessed", p->pack_name);
if (!is_pack_valid(p))
continue;
}
*found_offset = offset;
*found_pack = p;
}
Expand Down
4 changes: 1 addition & 3 deletions sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2473,10 +2473,8 @@ static int fill_pack_entry(const unsigned char *sha1,
* answer, as it may have been deleted since the index was
* loaded!
*/
if (!is_pack_valid(p)) {
warning("packfile %s cannot be accessed", p->pack_name);
if (!is_pack_valid(p))
return 0;
}
e->offset = offset;
e->p = p;
hashcpy(e->sha1, sha1);
Expand Down

0 comments on commit cedeffe

Please sign in to comment.