On 7/31/2014 5:08 PM, Matthieu Moy wrote:
Matthieu Moy matthieu@grenoble-inp.fr writes:
Tanay Abhra tanay...@gmail.com writes:
On 7/30/2014 7:43 PM, Matthieu Moy wrote:
* if (!values-items[i].string)
config_error_nonbool(
= This check could be done once and for all
From: Matthieu Moy matthieu@imag.fr
Signed-off-by: Matthieu Moy matthieu@imag.fr
---
v2: error messages now start with a small letter.
config.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/config.c b/config.c
index 058505c..7330789 100644
Whenever a callback returns a negative value, the functions
of `git_config_*()` family die printing the line number and
file name. In addition to them, add the variable name to the
error message.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c| 4 ++--
t/t4055-diff
Junio, drop (2/2) of this series, it has conflicts with ta/config-set in pu.
This patch can easily come later. Sorry for the inconvenience.
Patch 1/2 is OK.
Thanks.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More
to the line we just parsed during the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra tanay...@gmail.com
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b
://thread.gmane.org/gmane.comp.version-control.git/254101
[3]: http://thread.gmane.org/gmane.comp.version-control.git/254211
Tanay Abhra (7):
config.c: fix accuracy of line number in errors
add line number and file name info to `config_set`
change `git_config()` return value to void
rewrite git_config
-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 11 +++
1 file changed, 11 insertions(+)
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 7fdf840..e2f9d0b 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,15 @@ test_expect_success
Store file name and line number for each key-value pair in the cache
during parsing of the configuration files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index ed5fc8e
Add tests for `git_config_get_string_const()`, check whether it
dies printing the line number and the file name if a NULL
value is retrieved for the given key.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 10 ++
test-config.c | 10 ++
2 files
,
if (!git_config_get_value(key, value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api
to avoid config file rereads on each invocation during a git process
lifetime. First invocation constructs the cache, and after that for each
successive invocation, `git_config()` feeds values from the config cache
instead of rereading the configuration files.
Signed-off-by: Tanay Abhra tanay
for one case in branch.c.
Change `git_config()` return value to void and make it die if it receives
a negative value from `git_config_with_options()`.
Original-patch-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
branch.c | 5 +
cache.h | 2 +-
config.c
On 7/31/2014 9:25 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
+void git_die_config(const char *key)
+{
+const struct string_list *values;
+struct key_value_info *kv_info;
+values = git_config_get_value_multi(key);
+kv_info = values-items[values-nr - 1
On 7/31/2014 10:22 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/31/2014 9:25 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
+void git_die_config(const char *key)
+{
+ const struct string_list *values;
+ struct key_value_info *kv_info;
+ values
On 7/31/2014 11:39 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/31/2014 10:22 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/31/2014 9:25 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
+void git_die_config(const char *key
] for the documentation of the new API functions and a general
description of the
new API.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/254286/
[2]: http://thread.gmane.org/gmane.comp.version-control.git/252334
Tanay Abhra (5):
alias.c | 25 ++---
branch.c| 24
Use `git_config_get_string()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
branch.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/branch.c
Use `git_config_get_value_multi()` instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow,
also previously 'string_list_add_refs_by_glob()' was called even when
the retrieved value was NULL, correct it while we are at it.
Signed-off-by: Tanay Abhra
Use `git_config_get_value()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
pager.c | 40 +---
1 file changed, 13 insertions(+), 27 deletions(-)
diff
Use `git_config_get_string()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
alias.c | 25 ++---
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/alias.c
Use `git_config_get_*()` family instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
imap-send.c | 61 +++--
1 file changed, 27 insertions
On 7/30/2014 7:16 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
[PATCH v4]: Tiny style nits corrected. Patch 2/5 has been totally reworked.
One thing to check is if the config variables I changed in the series
are single valued or multi valued. Though I have
On 7/30/2014 7:43 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
-git_config(notes_display_config, load_config_refs);
+if (load_config_refs) {
+values = git_config_get_value_multi(notes.displayref);
+if (values
/254211
Tanay Abhra (6):
config.c: fix accuracy of line number in errors
add line number and file name info to `config_set`
rewrite git_config() to use the config-set API
add a test for semantic errors in config files
config: add `git_die_config()` to the config-set API
add tests
and the file name.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 11 +++
1 file changed, 11 insertions(+)
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 7fdf840..e2f9d0b 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4
in addition to line number and file name to the
error message that is printed when `git_config()` dies.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
cache.h | 24
config.c| 58 ++---
t/t4055-diff-context.sh
Store file name and line number for each key-value pair in the cache
during parsing of the configuration files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index e5b7f10
to the line we just parsed during the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra tanay...@gmail.com
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b
,
if (!git_config_get_value(key, value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api
Add tests for `git_config_get_string_const()`, check whether it
dies printing the line number and the file name if a NULL
value is retrieved for the given key.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 10 ++
test-config.c | 10 ++
2 files
diff --git a/t/t4055-diff-context.sh b/t/t4055-diff-context.sh
index cd04543..741e080 100755
--- a/t/t4055-diff-context.sh
+++ b/t/t4055-diff-context.sh
@@ -79,7 +79,7 @@ test_expect_success 'non-integer config parsing' '
test_expect_success 'negative integer config parsing' '
git
can
leverage the new API to unset the previously set values.
Any suggestions for new features or improvements are welcome!
Also, I like to thank my mentors Matthieu and Ram for their suggestions
and timely review even when my patches were late. ;)
Cheers,
Tanay Abhra.
[1]:http://thread.gmane.org
On 7/29/2014 6:10 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
configset_iter unconditionnally returns 0 (or it dies). Since it is more
or less the equivalent of the old git_config(), I understand why we
never encounter the situation where git_config() would return -1
On 7/29/2014 7:33 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/29/2014 6:10 PM, Matthieu Moy wrote:
So, I think it's time to make it official that git_config() does not
return an error code, and make it return void. I would do that in a
patch before the git_config
be seen at [1].
[1]:: http://thread.gmane.org/gmane.comp.version-control.git/253862/
Tanay Abhra (2):
add `config_set` API for caching config-like files
test-config: add tests for the config_set API
.gitignore | 1 +
Documentation/technical/api-config.txt | 142
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
the `config_set` API.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api-config.txt | 142 +
cache.h| 32
config.c | 274
to avoid config file rereads on each invocation during a git process
lifetime. First invocation constructs the cache, and after that for each
successive invocation, `git_config()` feeds values from the config cache
instead of rereading the configuration files.
Signed-off-by: Tanay Abhra tanay
://thread.gmane.org/gmane.comp.version-control.git/254286
[2]: http://thread.gmane.org/gmane.comp.version-control.git/254101
[3]: http://thread.gmane.org/gmane.comp.version-control.git/254211
Tanay Abhra (6):
config.c: fix accuracy of line number in errors
add line number and file name info to `config_set
to the line we just parsed during the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra tanay...@gmail.com
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b
-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 11 +++
1 file changed, 11 insertions(+)
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 7fdf840..35c6ee2 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,15 @@ test_expect_success
Store file name and line number for each key-value pair in the cache
during parsing of the configuration files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index e5b7f10
Add tests for `git_config_get_string_const()`, check whether it
dies printing the line number and the file name if a NULL
value is retrieved for the given key.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 9 +
test-config.c | 10 ++
2 files
,
if (!git_config_get_value(key, value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Note: git_config_get_string
Replace TODO introduced in commit 9c3c22 with documentation
explaining Git config API functions for writing configuration
files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api-config.txt | 31 ++-
1 file changed, 30 insertions(+), 1
On 7/28/2014 4:25 PM, Ramsay Jones wrote:
On 28/07/14 11:33, Tanay Abhra wrote:
Add `git_die_config` that dies printing the line number and the file name
of the highest priority value for the configuration variable `key`.
It has usage in non-callback based config value retrieval where we can
On 7/28/2014 4:52 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'check line errors for malformed values' '
+mv .git/config .git/config.old
+test_when_finished mv .git/config.old .git/config
+cat .git/config -\EOF
+[alias
Store file name and line number for each key-value pair in the cache
during parsing of the configuration files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 19 ++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 06257d9
to the line we just parsed during the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra tanay...@gmail.com
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b
/253862
[2]: http://thread.gmane.org/gmane.comp.version-control.git/254101
Tanay Abhra (6):
config.c: fix accuracy of line number in errors
add line number and file name info to `config_set`
rewrite git_config() to use the config-set API
add a test for semantic errors in config files
-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 11 +++
1 file changed, 11 insertions(+)
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 7fdf840..35c6ee2 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,15 @@ test_expect_success
to avoid config file rereads on each invocation during a git process
lifetime. First invocation constructs the cache, and after that for each
successive invocation, `git_config()` feeds values from the config cache
instead of rereading the configuration files.
Signed-off-by: Tanay Abhra tanay
Add tests for `git_config_get_string()`, check whether it
dies printing the line number and the file name if a NULL
value is retrieved for the given key.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 9 +
test-config.c | 10 ++
2 files changed
,
if (!git_config_get_value(key, value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api
On 7/25/2014 7:14 PM, Matthieu Moy wrote:
This allows a caller to requst the global config file without requesting
nit s/requst/request/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at
On 7/25/2014 7:28 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
+struct config_set_element {
+struct hashmap_entry ent;
+char *key;
+struct string_list value_list;
+};
+
+struct configset_list_item {
+struct config_set_element *e;
+int value_index
On 7/25/2014 7:33 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
--- a/config.c
+++ b/config.c
@@ -1403,11 +1403,12 @@ const struct string_list
*git_configset_get_value_multi(struct config_set *cs, c
int git_configset_get_string_const(struct config_set *cs, const
On 7/24/2014 3:19 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
If a callback returns a negative value to `git_config*()` family,
they call `die()` while printing the line number and the file name.
Currently the printed line number is off by one, thus printing the
wrong
On 7/24/2014 3:41 AM, Junio C Hamano wrote:
Matthieu Moy matthieu@grenoble-inp.fr writes:
Tanay Abhra tanay...@gmail.com writes:
+test_expect_success 'check line errors for malformed values' '
+ cp .git/config .git/config.old
Should this be mv not cp? You will be overwriting
Are you done with the original series, or do you still want to fix
the const-ness issue with the string pointer before working on
follow-up topics like this one?
I am attaching the v12 with two new functions git_configset_get_string()
git_configset_get_string_const().
Diff between v11 and
the `config_set` API.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api-config.txt | 142 +
cache.h| 32
config.c | 282
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
On 7/24/2014 9:09 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
I am attaching the v12 with two new functions git_configset_get_string()
git_configset_get_string_const().
Didn't you intend to change git_config_get_string to let it die in case
of error instead
,
Tanay Abhra.
We will be forbidden from correcting a UI
mistake by using the approach we took to transtion funcname over
to xfuncname (i.e. giving users funcname and allowing the
platform BRE parser that may or may not allow the users to write
backslashed ERE is spreading possible
On 7/25/2014 12:01 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/24/2014 3:19 AM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
If a callback returns a negative value to `git_config*()` family,
they call `die()` while printing the line number
On 7/25/2014 12:50 AM, Junio C Hamano wrote:
Matthieu Moy matthieu@grenoble-inp.fr writes:
Tanay Abhra tanay...@gmail.com writes:
For core the only test failing was xfuncname vs funcname,
Being a little pessimistic: there may be other cases where the hashtable
magically gives
On 7/25/2014 2:52 AM, Ramsay Jones wrote:
On 24/07/14 20:54, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
If we take the easy way out, fixing UI mistakes would be easier,
just replace git_config_cache() with git_config_raw() for such cases.
I do not think that would fly
to get accurate line number in error messages.
Discovered-by: Tanay Abhra tanay...@gmail.com
Signed-off-by: Matthieu Moy matthieu@grenoble-inp.fr
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 22971e9..6db8f97 100644
,
if (!git_config_get_value(key, value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api
-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 8
1 file changed, 8 insertions(+)
diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh
index 7fdf840..bd033df 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,12 @@ test_expect_success 'proper
the configuration files twice instead of four
times.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/253862
Tanay Abhra (7):
Documentation/technical/api-config.txt | 5 ++
cache.h| 1 +
config.c | 93
Add tests for `git_config_get_string()`, check whether it
dies printing the line number and the file name if an NULL
value is retrieved for the given key.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
t/t1308-config-set.sh | 9 +
test-config.c | 10 ++
2 files
Store file name and line number for each key-value pair in the cache.
Use the information to print line number and file name in errors raised
by `git_config()` which now uses the configuration files caching layer
internally.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
config.c | 32
to avoid config file rereads on each invocation during a git process
lifetime. First invocation constructs the cache, and after that for each
successive invocation, `git_config()` feeds values from the config cache
instead of rereading the configuration files.
Signed-off-by: Tanay Abhra tanay
`funcname` variable, enforce `xfuncname` precedence over
`funcname` when the variables have the same subsection. Remove dependency
that required values to be fed to userdiff_config() in parsing order for the
test to succeed.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Note: this the only test
`git_config_string()` output parameter `dest` is declared as a const
which is unnecessary as the caller of the function is given a strduped
string which can be modified without causing any harm.
Thus, remove the const from the function signature.
Signed-off-by: Tanay Abhra tanay...@gmail.com
On 7/22/2014 4:37 PM, Jeff King wrote:
On Tue, Jul 22, 2014 at 03:49:56AM -0700, Tanay Abhra wrote:
`git_config_string()` output parameter `dest` is declared as a const
which is unnecessary as the caller of the function is given a strduped
string which can be modified without causing any
On 7/22/2014 5:14 PM, Matthieu Moy wrote:
Jeff King p...@peff.net writes:
will complain that we are passing a pointer to const char *, not a
pointer to char *. And indeed, compiling with your patch introduces a
ton of compiler warnings.
Tanay: are you not compiling with gcc -Wall
Use `git_config_get_string()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
branch.c | 24
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/branch.c
Use `git_config_get_value()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
The function now raises an error instead of dying when a NULL value is found
for key notes.rewritemode.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
notes
Use `git_config_get_value()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
pager.c | 40 +---
1 file changed, 13 insertions(+), 27 deletions(-)
diff
Use `git_config_get_*()` family instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
The function now raises an error instead of dying in cases where a NULL value is
not allowed.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
imap-send.c
.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/253862
[2]: http://thread.gmane.org/gmane.comp.version-control.git/252334
Tanay Abhra (6):
alias.c | 27 +++
branch.c | 24
imap-send.c | 41
Use `git_config_get_string()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
The function now raises an error instead of dying when a NULL value is found.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
alias.c | 27
Use `git_config_get_value()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow, also previously
'string_list_add_refs_by_glob()' was called even when the retrieved value
was NULL, correct it while we are at it.
Signed-off-by: Tanay Abhra tanay
Use `git_config_get_*()` family instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Consider this as a proof of concept as the others callers have to be rewritten
as well.
I think
On 7/21/2014 6:21 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
[PATCH v3]: Most of Eric's suggestions has been implemented. See [2] for
discussion.
Also, new helpers introduced in v7 of the config-set API series have
been used.
See [1] for the documentation
On 7/21/2014 7:15 PM, Matthieu Moy wrote:
Tanay Abhra tanay...@gmail.com writes:
On 7/21/2014 6:21 PM, Matthieu Moy wrote:
2) Add a by-address parameter to git_configset_get_value that allows the
user to get the file and line information. In your previous patch,
that would mean
+if + git_config_get_string(core.notesref, (const
char**)notes_ref_name);
This cast is needed only because notes_ref_name is declared as
non-const, but a better fix would be to make the variable const, and
remove the cast.
Same casts had to be used in imap-send.c patch, I will
On 7/21/2014 11:29 PM, Junio C Hamano wrote:
Tanay Abhra tanay...@gmail.com writes:
Use `git_config_get_string()` instead of `git_config()` to take advantage of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
branch.c | 24
Replace TODO introduced in commit 9c3c22 with documentation
explaining Git config API functions for writing configuration
files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Minor nit corrected. Thanks for the review.
Documentation/technical/api-config.txt | 31
Replace TODO introduced in commit 9c3c22 with documentation
explaining Git config API functions for writing configuration
files.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api-config.txt | 31 ++-
1 file changed, 30 insertions(+), 1
/gmane.comp.version-control.git/253113
[11] http://thread.gmane.org/gmane.comp.version-control.git/253248
[12] http://thread.gmane.org/gmane.comp.version-control.git/253562
Tanay Abhra (4):
string-list: add string_list initialiser helper functions
Use string-list initializaer functions to rewrite
The string-list API has STRING_LIST_INIT_* macros to be used
to define variables with initializers, but lacks functions
to initialise an uninitialized piece of memory to be used as
a string-list at the run-time.
Introduce `string_list_init()` function for that.
Signed-off-by: Tanay Abhra tanay
Expose the `config_set` C API as a set of simple commands in order to
facilitate testing. Add tests for the `config_set` API as well as for
`git_config_get_*()` family for the usual config files.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
the `config_set` API.
Signed-off-by: Matthieu Moy matthieu@imag.fr
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Documentation/technical/api-config.txt | 137 +
cache.h| 30
config.c | 263
Using memset and then manually setting values of the string-list
members is not future proof as the internal representation of
string-list may change any time.
Use `string_list_init()` or STRING_LIST_INIT_* macros instead of
memset.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
builtin
On 7/18/2014 3:10 PM, Matthieu Moy wrote:
- Original Message -
Documentation/technical/api-config.txt | 137 +
cache.h| 30
config.c | 263
+
3 files changed, 430
-control.git/252959/
[10] http://article.gmane.org/gmane.comp.version-control.git/253113
[11] http://thread.gmane.org/gmane.comp.version-control.git/253248
[12] http://thread.gmane.org/gmane.comp.version-control.git/253562
[13] http://thread.gmane.org/gmane.comp.version-control.git/253799
Tanay Abhra
Using memset and then manually setting values of the string-list
members is not future proof as the internal representation of
string-list may change any time.
Use `string_list_init()` or STRING_LIST_INIT_* macros instead of
memset.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
builtin
101 - 200 of 304 matches
Mail list logo