Commit d4a492f
submodule--helper: fix bad config API usage
Fix bad config API usage added in a452128 (submodule--helper:
introduce add-config subcommand, 2021-08-06). After
git_config_get_string() returns successfully we know the "char **dest"
will be non-NULL.
A coccinelle patch that transforms this turns up a couple of other
such issues, one in fetch-pack.c, and another in upload-pack.c:
@@
identifier F =~ "^(repo|git)_config_get_string(_tmp)?$";
identifier V;
@@
!F(..., &V)
- && (V)
But let's focus narrowly on submodule--helper for now, we can fix
those some other time.
Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]>
Reviewed-by: Glen Choo <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 86e16ed commit d4a492f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3107 | 3107 | | |
3108 | 3108 | | |
3109 | 3109 | | |
3110 | | - | |
| 3110 | + | |
3111 | 3111 | | |
3112 | 3112 | | |
3113 | 3113 | | |
| |||
0 commit comments