On Wed, May 01 2019, Derrick Stolee via GitGitGadget wrote:

> From: Derrick Stolee <dsto...@microsoft.com>
>
> The write_commit_graph() method uses die() to report failure and
> exit when confronted with an unexpected condition. This use of
> die() in a library function is incorrect and is now replaced by
> error() statements and an int return type.
>
> Now that we use 'goto cleanup' to jump to the terminal condition
> on an error, we have new paths that could lead to uninitialized
> values. New initializers are added to correct for this.
>
> The builtins 'commit-graph', 'gc', and 'commit' call these methods,
> so update them to check the return value.

Seems good to have a test to check for some of this behavior. I see that
can be done as just:

    echo doesnotexist | git commit-graph write --stdin-packs

And checking the exit code is 1 as it is now, not 128.

Reply via email to