Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
config: drop unused parameter from maybe_remove_section()
author
Jeff King
<peff@peff.net>
Thu, 24 Jan 2019 13:12:32 +0000
(08:12 -0500)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 24 Jan 2019 20:35:44 +0000
(12:35 -0800)
We don't need the contents buffer to drop a section; the parse
information in the config_store_data parameter is enough for our logic.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
3d42034
)
diff --git
a/config.c
b/config.c
index ff521eb27ad243b27c7bd95f3ad7a1b777a4ae00..24ad1a985400168e33778781d01d6e9e6c6ededf 100644
(file)
--- a/
config.c
+++ b/
config.c
@@
-2565,7
+2565,6
@@
static ssize_t write_pair(int fd, const char *key, const char *value,
* entry (which all are to be removed).
*/
static void maybe_remove_section(struct config_store_data *store,
* entry (which all are to be removed).
*/
static void maybe_remove_section(struct config_store_data *store,
- const char *contents,
size_t *begin_offset, size_t *end_offset,
int *seen_ptr)
{
size_t *begin_offset, size_t *end_offset,
int *seen_ptr)
{
@@
-2850,7
+2849,7
@@
int git_config_set_multivar_in_file_gently(const char *config_filename,
replace_end = store.parsed[j].end;
copy_end = store.parsed[j].begin;
if (!value)
replace_end = store.parsed[j].end;
copy_end = store.parsed[j].begin;
if (!value)
- maybe_remove_section(&store,
contents,
+ maybe_remove_section(&store,
©_end,
&replace_end, &i);
/*
©_end,
&replace_end, &i);
/*