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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jon Seymour <jon.seymour@xxxxxxxxx> writes:

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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]