Re: [PATCH v3 01/20] commit-graph: UNLEAK before die()
- From
Derrick Stolee <stolee@gmail.com>
- Date
- May 25, 2018, 00:08 UTC
- Message-ID
- <67f7c4ef-d82e-fe66-b4cb-d118e6366c54@gmail.com>
- In-Reply-To
- <CAGZ79kYaC3VsH2kGMvsv0Xn-ghu5t7ENe+yebQCS5nvW5ms1_g@mail.gmail.com>
On 5/24/2018 6:47 PM, Stefan Beller wrote:
Show 23 quoted lines
> On Thu, May 24, 2018 at 9:25 AM, Derrick Stolee <dstolee@microsoft.com> wrote:
>> Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
>> ---
>> builtin/commit-graph.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/builtin/commit-graph.c b/builtin/commit-graph.c
>> index 37420ae0fd..f0875b8bf3 100644
>> --- a/builtin/commit-graph.c
>> +++ b/builtin/commit-graph.c
>> @@ -51,8 +51,11 @@ static int graph_read(int argc, const char **argv)
>> graph_name = get_commit_graph_filename(opts.obj_dir);
>> graph = load_commit_graph_one(graph_name);
>>
>> - if (!graph)
>> + if (!graph) {
>> + UNLEAK(graph_name);
>> die("graph file %s does not exist", graph_name);
> Unrelated to this patch: Is the command that ends up die()ing here
> a plumbing or porcelain, or: Do we want to translate the message here?
>
> In a lot of commands that show paths we single quote them '%s',
> (speaking from experience with a lot of submodule path code)This is for the 'git commit-graph read' command, which is plumbing (and 'read' is really only for testing). I don't think this message requires translation.
I'll keep the quotes in mind for the future.
Thanks,
-Stolee