Skip to content

Commit 342990c

Browse files
dschogitster
authored andcommitted
fill_tree_descriptor(): mark error message for translation
There is an error message in that function to report a missing tree; In contrast to three other, similar error messages, it is not marked for translation yet. Mark it for translation, and while at it, make the error message consistent with the others by enclosing the SHA in parentheses. This requires a change to t6030 which expects the previous format of the commit message. Theoretically, this could present problems with existing scripts that use `git bisect` and parse its output (because Git does not provide other means for callers to discern between error conditions). However, this is unlikely to matter in practice because the most common course of action to deal with fatal corruptions is to report the error message to the user and exit, rather than trying to do something with the reported SHA of the missing tree. Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5aca024 commit 342990c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

t/t6030-bisect-porcelain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ test_expect_success 'broken branch creation' '
872872

873873
echo "" > expected.ok
874874
cat > expected.missing-tree.default <<EOF
875-
fatal: unable to read tree $deleted
875+
fatal: unable to read tree ($deleted)
876876
EOF
877877

878878
test_expect_success 'bisect fails if tree is broken on start commit' '

tree-walk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void *fill_tree_descriptor(struct repository *r,
100100
if (oid) {
101101
buf = read_object_with_reference(r, oid, OBJ_TREE, &size, NULL);
102102
if (!buf)
103-
die("unable to read tree %s", oid_to_hex(oid));
103+
die(_("unable to read tree (%s)"), oid_to_hex(oid));
104104
}
105105
init_tree_desc(desc, buf, size);
106106
return buf;

0 commit comments

Comments
 (0)