Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH v3 2/2] Ensure git ls-tree exits with a non-zero exit code if read_tree_recursive fails.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:51:39

Jon Seymour [off-list ref] writes:
quoted hunk
@@ -173,6 +173,7 @@ int cmd_ls_tree(int argc, const char **argv, const
char *prefix)
        tree = parse_tree_indirect(sha1);
        if (!tree)
                die("not a tree object");
-       return read_tree_recursive(tree, "", 0, 0, &pathspec, show_tree, NULL);
+       ret = read_tree_recursive(tree, "", 0, 0, &pathspec, show_tree, NULL);

+       return ret ? 1 : 0;
 }
Surely, or "return !!read_tree_recursive(...);" is fine as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help