From: Tanay Abhra
Change test 'find value_list for a key from a configset' to redirect the
result to 'expect' instead of 'except' which was a typo.
With this change, the test case actually fails because it uses
`configset_get_value`. Clearly, this was intended to
he typo.
I will submit a patch fixing the test. The fix can be checked at
https://github.com/git/git/pull/451.
'configset_get_value' will be changed to 'configset_get_value_multi'
since the test expects a list of values instead of a single value.
Thanks,
Tanay Abhra
King
Signed-off-by: Tanay Abhra
---
Hi Jeff,
I went through Junio's config guideline patch series
and the whole thread of underscore bug report and I also think
that pager.*.command is the right path to go.
If you want to relax the syntactic requirement (such as add '_' to
the
like `configset_find_element()` get their keys from
the git itself so a return value signifying error would be enough.
The error output shown to the user is useless and confusing in this
case so add a show_err flag to suppress errors in such cases.
Signed-off-by: Tanay Abhra
---
Hi,
I just saw
ly in a place where only a return value would be enough.
>>
>> Thanks for bringing this to our attention.
>>
>> Cheers,
>> Tanay Abhra.
>
> Who are *you* in the above, and what was the bug report about (if it
> was a bug report)? Perhaps summarize it in a form of
>From c87ddf6397964154932d49385ed1433b62631f30 Mon Sep 17 00:00:00 2001
From: Tanay Abhra
Date: Thu, 30 Oct 2014 08:54:58 -0700
Subject: [PATCH] config: add show_err flag to git_config_parse_key()
`git_config_parse_key()` is used to sanitize the input key.
Some callers of the function l
like `configset_find_element()` get their keys from
the git itself so a return value signifying error would be enough.
The error output shown to the user is useless and confusing in this
case so add a show_err flag to suppress errors in such cases.
Signed-off-by: Tanay Abhra
---
Hi,
You were
On 10/8/2014 11:05 PM, Junio C Hamano wrote:
> Richard Hartmann writes:
>
>> So this is not a real bug report, more of a "is this intended this way?"
>> richih@titanium ~/git_test % git rev-parse --is-inside-work-tree
>> error: Malformed value for branch.autosetuprebase
>> fatal: bad config file
On 10/5/2014 10:58 PM, Alberto Scotto wrote:
> Hi all,
>
> I've just found that:
> - given you have an empty staging area
> - and you have only untracked files in your working dir
> - when you do `git stash --untracked`
> - then `git stash show` gives you an empty output => stash looks empty
>
>
On 10/7/2014 12:58 AM, Junio C Hamano wrote:
>
> The point is to prevent"git config --add foo.baz anothervalue" starting from
>
> --- --- ---
> [foo]
> bar = some
> [unset] variable = foo.baz
> --- --- ---
>
> from adding foo.baz next to existing foo.bar. We would want to end up with
>
> ---
On 10/4/2014 1:42 AM, Junio C Hamano wrote:
> Matthieu Moy writes:
>
>> Junio C Hamano writes:
Well, the normal use-case for unset.variable is to put it in a local
config file, to unset a variable set in another, lower-priority file.
>>>
>>> I agree that is one major use case.
>>>
On 10/3/2014 1:53 AM, Junio C Hamano wrote:
> Tanay Abhra writes:
>
>> On 10/3/2014 1:39 AM, Junio C Hamano wrote:
>>> Tanay Abhra writes:
>>>
>>>> +test_expect_success 'document how unset.variable will behave in shell
>>>> scripts&
On 10/3/2014 1:39 AM, Junio C Hamano wrote:
> Tanay Abhra writes:
>
>> +test_expect_success 'document how unset.variable will behave in shell
>> scripts' '
>> +rm -f .git/config &&
>> +cat >expect <<-\EOF &&
>>
Move configset_iter() to an appropriate position where it
can be called by git_config_*() family without putting
a forward declaration for it.
Helped-by: Matthieu Moy
Signed-off-by: Tanay Abhra
---
config.c | 38 +++---
1 file changed, 19 insertions(+), 19
Helped-by: Matthieu Moy
Signed-off-by: Tanay Abhra
---
t/t1300-repo-config.sh | 54 ++
1 file changed, 54 insertions(+)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index ce5ea01..f75c001 100755
--- a/t/t1300-repo-config.sh
+++ b
]
variable = foo.bar
to unset foo.bar previously declared in system wide config file.
Helped-by: Matthieu Moy
Signed-off-by: Tanay Abhra
---
config.c | 34 ++
1 file changed, 34 insertions(+)
diff --git a/config.c b/config.c
index 09cf009..a808
variable while dying.
Helped-by: Matthieu Moy
Signed-off-by: Tanay Abhra
---
config.c | 21 +++--
t/t1300-repo-config.sh | 2 +-
2 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/config.c b/config.c
index cb474b2..09cf009 100644
--- a/config.c
+++ b
Helped-by: Matthieu Moy
Signed-off-by: Tanay Abhra
---
Documentation/config.txt | 12
1 file changed, 12 insertions(+)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 3b5b24a..7f36d35 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
Hi,
This series aims to add a method to filter previously set variables.
The patch series can be best described by the 3/5 log message
which I have pasted below verbatim.
"
Add a new config variable "unset.variable" which unsets previously set
variables. It affects `git_config()` and `git_config_
entry" and use it in the implementation of "git config --add".
For removing the segfault add a check for NULL values in `matches()` in
config.c.
Helped-by: Junio C Hamano
Signed-off-by: Tanay Abhra
---
builtin/config.c| 2 +-
cache.h | 2 ++
alue. Document these deficiencies in form of a test.
Helped-by: Junio C Hamano
Signed-off-by: Tanay Abhra
---
Sorry for this very late reply. I was stuck in a flood affected region
with no internet connectivity for the past week. I am safe now. :)
FWIW, here is the reroll with a set bit in the
7]. More project ideas are mentioned in the previous GSoC ideas lists.
Conclusion
--
So a great summer comes to an end. Hopefully I would still be part of
Git's community
and will continue working on it to improve it. I like to thank my
mentors for being patient
with me and
or not.
For removing the segfault add a check for NULL values in `matches()` in
config.c.
Signed-off-by: Tanay Abhra
---
builtin/config.c| 2 +-
config.c| 2 +-
t/t1303-wacky-config.sh | 20
3 files changed, 22 insertions(+), 2 deletions(-)
diff --g
If we change the signature to void git_default_config(void),
we would have to use a patch like this to change the call sites
of the function. This patch is just for illustrative purpose,
I couldn't finalize if this was unnecessary code cruft or
a valid approach.
---
builtin/check-attr.c |
git_default_config() now uses config-set API functions to query for
values.
Signed-off-by: Tanay Abhra
---
Sorry, for the short log message, I will explain why.
The git_default_config() rewrite is 100% complete, the only
problem remains is the call sites; there are too many of them.
Some are
ult" raises an error.
Signed-off-by: Tanay Abhra
---
We cannot easily use the new config-set API here, because
much of the function is dedicated to processing
"merge..variable" which does not easily translate to
the new API. If it were for variables like,
"merge.summary", "me
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
---
fast-import.c | 44 +---
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git
>> if (pack_idx_opts.version > 2)
>> -die("bad pack.indexversion=%"PRIu32,
>> -pack_idx_opts.version);
>> -return 0;
>> +die("bad pack.indexversion=%"PRIu32,
>> pack_idx_opts.version);
>
> One more opportunit
Use `git_config_get_string_const()` instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
builtin/apply.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/builtin/apply.c b/builtin
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
---
fast-import.c | 42 +++---
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a
Signed-off-by: Tanay Abhra
---
ll-merge.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/ll-merge.c b/ll-merge.c
index fb61ea6..8ea03e5 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -225,11 +225,8 @@ static int read_merge_config(const char *var, const
Use `git_config_get_int()` instead of `git_config()` to take advantage
of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
merge-recursive.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/merge-recursive.c b
On 8/8/2014 2:01 AM, Junio C Hamano wrote:
> Matthieu Moy writes:
>
Why is this needed? Are you now using key_value_info outside config.c?
Or is it a leftover from a previous experiment?
>>>
>>> Has this been resolved in the new round?
>>
>> Tanay explained in another subthread why this
On 8/8/2014 12:25 AM, Junio C Hamano wrote:
> Tanay Abhra writes:
>
>> diff --git a/Documentation/technical/api-config.txt
>> b/Documentation/technical/api-config.txt
>> index 21f280c..0d8b99b 100644
>> --- a/Documentation/technical/api-config.txt
>&g
-merge-msg.c resulting in addition of a spurious newline to the `out`
strbuf. Now, the newline addition is skipped as -1 is returned to the caller
if no value is found.
Signed-off-by: Tanay Abhra
---
v3: Changed the commit message to a more appropriate one.
branch.c | 27
/gmane.comp.version-control.git/254633/
Tanay Abhra (11):
daemon.c: replace `git_config()` with `git_config_get_bool()` family
http-backend.c: replace `git_config()` with `git_config_get_bool()`
family
read-cache.c: replace `git_config()` with `git_config_get_*()` family
archive.c: replace
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
---
alias.c | 25 ++---
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/alias.c b/alias.c
index
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
daemon.c | 26 --
1 file changed, 4 insertions(+), 22 deletions(-)
diff --git a/daemon.c b
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
---
builtin/gc.c | 51 ---
1 file changed, 20 insertions(+), 31 deletions(-)
diff
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
---
pager.c | 40 +---
1 file changed, 13 insertions(+), 27 deletions(-)
diff --git a/pager.c b
Use `git_config_get_*()` family instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Use an intermediate value, as `version` can not be used directly in
git_config_get_int() due to incompatible type.
Signed-off-by: Tanay Abhra
---
read
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
---
imap-send.c | 60 ++--
1 file changed, 26 insertions(+), 34 deletions
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
---
branch.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/branch.c b/branch.c
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
archive.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/archive.c b/archive.c
index
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
http-backend.c | 31 ---
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/http
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
---
rerere.c | 43 ---
1 file changed, 12 insertions(+), 31 deletions(-)
diff --git a
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
---
fetch-pack.c | 35 ---
1 file changed, 8 insertions(+), 27 deletions(-)
diff --git a/fetch
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
---
t/t1308-config-set.sh | 10 ++
test-config.c | 10 ++
2 files changed, 20
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 Abhra
---
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..9cc678d 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,15 @@ test_expect_success 'proper error on
the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra
Signed-off-by: Tanay Abhra
Signed-off-by: Matthieu Moy
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 34940fd..bb4629e 100644
n value except 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
Signed-off-by: Tanay Abhra
---
branch.c | 5 +
cache.h | 2 +-
config.c | 16 +++
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
---
cache.h | 5 +
config.c | 16 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/cache.h b/cache.h
index 7292aef
From: Matthieu Moy
Signed-off-by: Matthieu Moy
---
config.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/config.c b/config.c
index a191328..34940fd 100644
--- a/config.c
+++ b/config.c
@@ -457,9 +457,9 @@ static int git_parse_source(config_fn_t fn,
is illegal", value);
else
/* do work */
}
Signed-off-by: Tanay Abhra
---
Documentation/technical/api-config.txt | 13
cache.h| 3 +++
config.c | 39 +++
strings for translation
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
config: add `git_die_config()` to the config-set API
rewrite git_config() to use the config-set API
On 8/6/2014 9:02 PM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> +test_expect_success 'find string value for a key' '
>> +check_config get_string case.baz hask &&
>> +check_config expect_code 1 get_st
On 8/5/2014 12:29 AM, Eric Sunshine wrote:
> On Mon, Aug 4, 2014 at 2:33 PM, Tanay Abhra wrote:
>> Use `git_config_get_bool()` family instead of `git_config()` to take
>> advantage of
>> the config-set API which provides a cleaner control flow.
>>
>> Signed-off
: Tanay Abhra
---
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..5ea0aa4 100755
--- a/t/t1308-config-set.sh
+++ b/t/t1308-config-set.sh
@@ -197,4 +197,15 @@ test_expect_success 'proper error on
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
---
t/t1308-config-set.sh | 10 ++
test-config.c | 10 ++
2 files changed, 20
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
From: Matthieu Moy
Signed-off-by: Matthieu Moy
---
config.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/config.c b/config.c
index a191328..34940fd 100644
--- a/config.c
+++ b/config.c
@@ -457,9 +457,9 @@ static int git_parse_source(config_fn_t fn,
is illegal", value);
else
/* do work */
}
Signed-off-by: Tanay Abhra
---
Documentation/technical/api-config.txt | 13
cache.h| 3 +++
config.c | 39 +++
the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra
Signed-off-by: Tanay Abhra
Signed-off-by: Matthieu Moy
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 34940fd..bb4629e 100644
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
---
cache.h | 5 +
config.c | 16 ++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/cache.h b/cache.h
index 7292aef
n value except 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
Signed-off-by: Tanay Abhra
---
branch.c | 5 +
cache.h | 2 +-
config.c | 16 +++
onfig.c: mark error and warnings strings for translation
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
config: add `git_die_config()` to the config-set API
rewrite git_config() t
On 8/5/2014 1:34 AM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> I was aping the old git_config() system, it also does exactly what you
>> described
>> above. for example, builtin/gc.c line 91,
>>
>> if (!strcmp(var, "gc.pruneexpire"
> ---
>
> Hi Tanay,
>
> If you need to re-roll the patches in the 'ta/config-set-1' branch,
> could you please squash this into the relevant patch. Thanks!
>
Sorry, my bad. I will squash it in the relevant patch for my next re roll.
Thanks,
Tanay Abhra.
--
To uns
On 8/4/2014 11:37 PM, Junio C Hamano wrote:
> Tanay Abhra writes:
>
>> 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 confi
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
---
alias.c | 25 ++---
1 file changed, 6 insertions(+), 19 deletions(-)
diff --git a/alias.c b/alias.c
index
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
---
imap-send.c | 61 +++--
1 file changed, 27 insertions(+), 34 deletions
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
---
branch.c | 27 +++
1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/branch.c b/branch.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
---
fetch-pack.c | 35 ---
1 file changed, 8 insertions(+), 27 deletions(-)
diff --git a/fetch
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
archive.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/archive.c b/archive.c
index
Use `git_config_get_*()` family instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Use an intermediate value, as `version` can not be used directly in
git_config_get_int() due to incompatible type.
Signed-off-by: Tanay Abhra
---
read
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
daemon.c | 27 +--
1 file changed, 5 insertions(+), 22 deletions(-)
diff --git a/daemon.c b
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
---
builtin/gc.c | 51 ---
1 file changed, 20 insertions(+), 31 deletions(-)
diff
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
---
pager.c | 40 +---
1 file changed, 13 insertions(+), 27 deletions(-)
diff --git a/pager.c b
Use `git_config_get_bool()` family instead of `git_config()` to take advantage
of
the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
http-backend.c | 31 ---
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/http
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
---
rerere.c | 43 ---
1 file changed, 12 insertions(+), 31 deletions(-)
diff --git a
e_fmt() which would behave like strbuf_addf(). It will
probably
come in a later series.
[1]: http://thread.gmane.org/gmane.comp.version-control.git/254633/
Tanay Abhra (11):
alias.c| 25 ++--
archive.c | 12 +++-
branch.c
`git_pretty_formats_config()` continues without checking git_config_string's
return value which can lead to a SEGFAULT. Instead return -1 when
git_config_string fails signalling `git_config()` to die printing the location
of the erroneous variable.
Signed-off-by: Tanay Abhra
---
pretty.
: Tanay Abhra
---
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 'proper error on
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
---
t/t1308-config-set.sh | 10 ++
test-config.c | 10 ++
2 files changed, 20
From: Matthieu Moy
Signed-off-by: Matthieu Moy
---
config.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/config.c b/config.c
index a191328..34940fd 100644
--- a/config.c
+++ b/config.c
@@ -457,9 +457,9 @@ static int git_parse_source(config_fn_t fn,
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
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
---
config.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index bb4629e..e685b66 100644
n value except 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
Signed-off-by: Tanay Abhra
---
branch.c | 5 +
cache.h | 2 +-
config.c | 16 +++
the call
to callback to get accurate line number in error messages.
Commit-message-by: Tanay Abhra
Signed-off-by: Tanay Abhra
---
config.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/config.c b/config.c
index 34940fd..bb4629e 100644
--- a/config.c
+++ b
comp.version-control.git/254211
Matthieu Moy (1):
config.c: mark error and warnings strings for translation
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
config: add `git_die_con
(!git_config_get_value(key, &value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra
---
Documentation/technical/api-config.txt
On 8/1/2014 12:11 AM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> On 7/31/2014 11:39 PM, Matthieu Moy wrote:
>>
>>> This is the part I find weird. You're calling git_die_config_exact() on
>>> the first boggus value, and git_die_config_exact() will no
On 7/31/2014 11:39 PM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> On 7/31/2014 10:22 PM, Matthieu Moy wrote:
>>> Tanay Abhra writes:
>>>
>>>> On 7/31/2014 9:25 PM, Matthieu Moy wrote:
>>>>> Tanay Abhra
On 7/31/2014 10:22 PM, Matthieu Moy wrote:
> Tanay Abhra writes:
>
>> On 7/31/2014 9:25 PM, Matthieu Moy wrote:
>>> Tanay Abhra writes:
>>>
>>>> +void git_die_config(const char *key)
>>>> +{
>>>> + const struct string_li
On 7/31/2014 9:25 PM, Matthieu Moy wrote:
> Tanay Abhra 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);
>> +
n value except 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
Signed-off-by: Tanay Abhra
---
branch.c | 5 +
cache.h | 2 +-
config.c | 16 +++
(!git_config_get_value(key, &value)) {
/* NULL values not allowed */
if (!value)
git_config_die(key);
else
/* do work */
}
Signed-off-by: Tanay Abhra
---
Documentation/technical/api-config.txt
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
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
---
config.c | 21 +++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/config.c b/config.c
index ed5fc8e..4a15383 100644
1 - 100 of 311 matches
Mail list logo