[PATCH] commit.c:record_author_date() use skip_prefix() instead of starts_with()

2014-03-01 Thread Tanay Abhra
Signed-off-by: Tanay Abhra tanay...@gmail.com --- commit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commit.c b/commit.c index 6bf4fe0..c954ecb 100644 --- a/commit.c +++ b/commit.c @@ -566,7 +566,7 @@ static void record_author_date(struct author_date_slab

[PATCH V2] commit.c: Use skip_prefix() instead of starts_with()

2014-03-03 Thread Tanay Abhra
In record_author_date() parse_gpg_output() ,using skip_prefix() instead of starts_with() is more elegant and abstracts away the details. Helped-by: Michael Haggerty mhag...@alum.mit.edu Signed-off-by: Tanay Abhra tanay...@gmail.com --- Patch V2 Corrected email formatting ,reapplied

[PATCH v3] commit.c: use skip_prefix() instead of starts_with()

2014-03-04 Thread Tanay Abhra
In record_author_date() parse_gpg_output() ,using skip_prefix() instead of starts_with() is a more suitable abstraction. Helped-by: Max Horn m...@quendi.de Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Michael Haggerty mhag...@alum.mit.edu Signed-off-by: Tanay Abhra tanay...@gmail.com

Re: [PATCH] [PATCH] commit.c: Replace starts_with() with skip_prefix()

2014-03-04 Thread Tanay Abhra
() advantages are not so important in the context.So the replace may not be so advantageous ,I may be wrong in this case. Cheers, Tanay Abhra. -- 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 http

Re: git compile with debug symbols

2014-03-04 Thread Tanay Abhra
at 0x80f8b40: file help.c, line 396. Cheers, Tanay Abhra. -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH v4] commit.c: use skip_prefix() instead of starts_with()

2014-03-04 Thread Tanay Abhra
Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Michael Haggerty mhag...@alum.mit.edu Signed-off-by: Tanay Abhra tanay...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Patch V4 Identation improved, removed useless comment. [1] Thanks to Junio C Hamano and Max

[PATCH v5] commit.c: use skip_prefix() instead of starts_with()

2014-03-04 Thread Tanay Abhra
Helped-by: Junio C Hamano gits...@pobox.com Helped-by: Michael Haggerty mhag...@alum.mit.edu Signed-off-by: Tanay Abhra tanay...@gmail.com --- Patch V5 Minor revision of indentation Patch V4 Identation improved, removed useless comment. [1] Thanks to Junio C Hamano and Max Horn. [1

Re: [PATCH v4] commit.c: use skip_prefix() instead of starts_with()

2014-03-04 Thread Tanay Abhra
that mail. Also , what should be my next step ,should I present a rough draft of a proposal , or tackle other bugs on the mailing list? Thanks for the suggestions and advice, Regards, Tanay Abhra. [1] http://article.gmane.org/gmane.comp.version-control.git/243395 -- To unsubscribe from this list: send

[RFC][GSoC] Calling for comments regarding rough draft of proposal

2014-03-19 Thread tanay abhra
[2]http://thread.gmane.org/gmane.comp.version-control.git/208113 --- Thanks, Tanay Abhra. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info

[GSoC] Inquiry about writing config file to disk

2014-03-20 Thread Tanay Abhra
help me , I just want the starting function and will trace the function calls after that. Regards, Tanay Abhra. -- 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 http://vger.kernel.org/majordomo-info.html

Re: [PATCH] Modify fsck_commit. Replace memcmp by skip_prefix

2014-03-23 Thread Tanay Abhra
this, [PATCH v2] fsck_commit.c: Replace memcmp() by skip_prefix() Cheers, Tanay Abhra. -- 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 http://vger.kernel.org/majordomo-info.html

[GSoC 2014] Accepted GSoC student introduction

2014-04-25 Thread tanay abhra
this option. links:- [1]http://thread.gmane.org/gmane.comp.version-control.git/219505 [2]http://thread.gmane.org/gmane.comp.version-control.git/208113 -- Cheers, Tanay Abhra

Re: commit all the untracked files prior adding them to stage using git add

2014-05-17 Thread Tanay Abhra
, try try.github.com/ for an interactive tutorial. Cheers, Tanay Abhra. -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH v9 0/8] Rewrite `git_config()` using config-set API

2014-08-07 Thread Tanay Abhra
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 add a test for semantic errors

[PATCH v9 1/8] config.c: mark error and warnings strings for translation

2014-08-07 Thread Tanay Abhra
From: Matthieu Moy matthieu@imag.fr Signed-off-by: Matthieu Moy matthieu@imag.fr --- 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 @@

[PATCH v9 5/8] config: add `git_die_config()` to the config-set API

2014-08-07 Thread Tanay Abhra
); else /* do work */ } Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 13 cache.h| 3 +++ config.c | 39 -- 3 files

[PATCH v9 2/8] config.c: fix accuracy of line number in errors

2014-08-07 Thread Tanay Abhra
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 Signed-off-by: Matthieu Moy matthieu@imag.fr --- config.c | 12 +++- 1 file changed, 11 insertions(+), 1

[PATCH v9 4/8] change `git_config()` return value to void

2014-08-07 Thread Tanay Abhra
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

[PATCH v9 3/8] add line number and file name info to `config_set`

2014-08-07 Thread 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 tanay...@gmail.com --- cache.h | 5 + config.c | 16 ++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h

[PATCH v9 8/8] add tests for `git_config_get_string_const()`

2014-08-07 Thread Tanay Abhra
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

[PATCH v9 6/8] rewrite git_config() to use the config-set API

2014-08-07 Thread Tanay Abhra
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

[PATCH v9 7/8] add a test for semantic errors in config files

2014-08-07 Thread Tanay Abhra
-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..9cc678d 100755 --- a/t/t1308-config-set.sh +++ b/t/t1308-config-set.sh @@ -197,4 +197,15 @@ test_expect_success

[PATCH v2 05/11] fetchpack.c: replace `git_config()` with `git_config_get_*()` family

2014-08-07 Thread Tanay Abhra
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 --- fetch-pack.c | 35 --- 1 file changed, 8 insertions(+), 27 deletions(-) diff

[PATCH v2 06/11] rerere.c: replace `git_config()` with `git_config_get_*()` family

2014-08-07 Thread Tanay Abhra
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 --- rerere.c | 43 --- 1 file changed, 12 insertions(+), 31 deletions

[PATCH v2 08/11] pager.c: replace `git_config()` with `git_config_get_value()`

2014-08-07 Thread 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

[PATCH v2 04/11] archive.c: replace `git_config()` with `git_config_get_bool()` family

2014-08-07 Thread Tanay Abhra
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 tanay...@gmail.com --- archive.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/archive.c b

[PATCH v2 10/11] alias.c: replace `git_config()` with `git_config_get_string()`

2014-08-07 Thread Tanay Abhra
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

[PATCH v2 01/11] daemon.c: replace `git_config()` with `git_config_get_bool()` family

2014-08-07 Thread Tanay Abhra
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 tanay...@gmail.com --- daemon.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git

[PATCH v2 00/11] git_config callers rewritten with the new config-set API

2014-08-07 Thread Tanay Abhra
/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

[PATCH v2 02/11] http-backend.c: replace `git_config()` with `git_config_get_bool()` family

2014-08-07 Thread Tanay Abhra
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 tanay...@gmail.com --- http-backend.c | 31 --- 1 file changed, 12 insertions(+), 19 deletions

[PATCH v2 03/11] read-cache.c: replace `git_config()` with `git_config_get_*()` family

2014-08-07 Thread Tanay Abhra
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 tanay

[PATCH v2 09/11] imap-send.c: replace `git_config()` with `git_config_get_*()` family

2014-08-07 Thread Tanay Abhra
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 | 60 ++-- 1 file changed, 26 insertions

[PATCH v2 07/11] builtin/gc.c: replace `git_config()` with `git_config_get_*()` family

2014-08-07 Thread Tanay Abhra
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 --- builtin/gc.c | 51 --- 1 file changed, 20 insertions(+), 31

[PATCH v2 11/11] branch.c: replace `git_config()` with `git_config_get_string()

2014-08-07 Thread Tanay Abhra
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 | 27 +++ 1 file changed, 7 insertions(+), 20 deletions(-) diff --git

[PATCH v3 11/11] branch.c: replace `git_config()` with `git_config_get_string()

2014-08-07 Thread Tanay Abhra
-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 tanay...@gmail.com --- v3: Changed the commit message to a more appropriate one. branch.c | 27

Re: [PATCH v9 5/8] config: add `git_die_config()` to the config-set API

2014-08-08 Thread Tanay Abhra
On 8/8/2014 12:25 AM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com 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 +++ b/Documentation/technical/api

Re: [PATCH v8 0/8] Rewrite `git_config()` using config-set API

2014-08-08 Thread Tanay Abhra
On 8/8/2014 2:01 AM, Junio C Hamano wrote: Matthieu Moy matthieu@grenoble-inp.fr 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

[PATCH 3/4] merge-recursive.c: replace `git_config()` with `git_config_get_int()`

2014-08-13 Thread Tanay Abhra
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 tanay...@gmail.com --- merge-recursive.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git

[PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
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 --- fast-import.c | 42 +++--- 1 file changed, 19 insertions(+), 23 deletions

[PATCH 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Tanay Abhra
Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH 4/4] builtin/apply.c: replace `git_config()` with `git_config_get_string_const()`

2014-08-13 Thread Tanay Abhra
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 tanay...@gmail.com --- builtin/apply.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/builtin

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
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 opportunity for

[PATCH v2 1/5] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
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 --- fast-import.c | 44 +--- 1 file changed, 21 insertions(+), 23

[PATCH v2 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Tanay Abhra
-off-by: Tanay Abhra tanay...@gmail.com --- We cannot easily use the new config-set API here, because much of the function is dedicated to processing merge.name.variable which does not easily translate to the new API. If it were for variables like, merge.summary, merge.tool, and merge.verbosity, we

[PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

2014-08-13 Thread Tanay Abhra
git_default_config() now uses config-set API functions to query for values. Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH/RFC v2 2/2] use the new git_default_config()

2014-08-13 Thread Tanay Abhra
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

[PATCH] make config --add behave correctly for empty and NULL values

2014-08-18 Thread Tanay Abhra
for NULL values in `matches()` in config.c. Signed-off-by: Tanay Abhra tanay...@gmail.com --- builtin/config.c| 2 +- config.c| 2 +- t/t1303-wacky-config.sh | 20 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/builtin/config.c b/builtin

[PATCH v2 1/2] document irregular config --add behaviour for empty and NULL values

2014-09-12 Thread Tanay Abhra
these deficiencies in form of a test. Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH v2 2/2] make config --add behave correctly for empty and NULL values

2014-09-12 Thread Tanay Abhra
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 gits...@pobox.com Signed-off-by: Tanay Abhra tanay...@gmail.com --- builtin/config.c| 2 +- cache.h | 2 ++ config.c

[PATCH/RFC 0/5] add unset.variable for unsetting previously set variables

2014-10-02 Thread Tanay Abhra
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

[PATCH/RFC 4/5] document the new unset.variable variable

2014-10-02 Thread Tanay Abhra
Helped-by: Matthieu Moy matthieu@imag.fr Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH/RFC 2/5] make git_config_with_options() to use a configset

2014-10-02 Thread Tanay Abhra
variable while dying. Helped-by: Matthieu Moy matthieu@imag.fr Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH/RFC 3/5] add unset.variable for unsetting previously set variables

2014-10-02 Thread Tanay Abhra
foo.bar previously declared in system wide config file. Helped-by: Matthieu Moy matthieu@imag.fr Signed-off-by: Tanay Abhra tanay...@gmail.com --- config.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/config.c b/config.c index 09cf009..a80832d 100644

[PATCH/RFC 5/5] add tests for checking the behaviour of unset.variable

2014-10-02 Thread Tanay Abhra
Helped-by: Matthieu Moy matthieu@imag.fr Signed-off-by: Tanay Abhra tanay...@gmail.com --- 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

[PATCH/RFC 1/5] config.c : move configset_iter() to an appropriate position

2014-10-02 Thread Tanay Abhra
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 matthieu@imag.fr Signed-off-by: Tanay Abhra tanay...@gmail.com --- config.c | 38 +++--- 1

Re: [PATCH/RFC 5/5] add tests for checking the behaviour of unset.variable

2014-10-02 Thread Tanay Abhra
On 10/3/2014 1:39 AM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: +test_expect_success 'document how unset.variable will behave in shell scripts' ' +rm -f .git/config +cat expect -\EOF +EOF +git config foo.bar boz1 +git config --add foo.bar boz2

Re: [PATCH/RFC 5/5] add tests for checking the behaviour of unset.variable

2014-10-02 Thread Tanay Abhra
On 10/3/2014 1:53 AM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: On 10/3/2014 1:39 AM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: +test_expect_success 'document how unset.variable will behave in shell scripts' ' + rm -f .git/config + cat expect

Re: [PATCH/RFC 5/5] add tests for checking the behaviour of unset.variable

2014-10-06 Thread Tanay Abhra
On 10/4/2014 1:42 AM, Junio C Hamano wrote: Matthieu Moy matthieu@grenoble-inp.fr writes: Junio C Hamano gits...@pobox.com 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

Re: [PATCH/RFC 5/5] add tests for checking the behaviour of unset.variable

2014-10-06 Thread Tanay Abhra
On 10/7/2014 12:58 AM, Junio C Hamano wrote: The point is to preventgit 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 --- --- ---

Re: [bug] [UX] `stash save --untracked` produces a stash that *looks* empty

2014-10-08 Thread Tanay Abhra
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 My first

Re: [BUG?] `config branch.autosetuprebase true` breaks `rev-parse --is-inside-work-tree`

2014-10-08 Thread Tanay Abhra
On 10/8/2014 11:05 PM, Junio C Hamano wrote: Richard Hartmann richih.mailingl...@gmail.com 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

[PATCH] config: add show_err flag to git_config_parse_key()

2014-10-30 Thread Tanay Abhra
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 tanay...@gmail.com

Re: [PATCH] config: add show_err flag to git_config_parse_key()

2014-10-30 Thread Tanay Abhra
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 a few new tests in t/t13XX series is in order? Thanks. Sorry about that, I am behind a firewall and had to use

[RFC/PATCH 0/2] Git config cache special querying api utilizing the cache

2014-05-26 Thread Tanay Abhra
added only the file from each variable value pair comes in an upcoming series. What else should I add or implement ;is my approach right? [1] https://drive.google.com/file/d/0B4suZ-aHqDcnSUZJRXVTTnZUN1E/edit?usp=sharing Cheers, Tanay Abhra. Tanay Abhra (2): config: Add cache for config

[RFC/PATCH 1/2] config: Add cache for config value querying

2014-05-26 Thread Tanay Abhra
manner from the cache. Signed-off-by: Tanay Abhra tanay...@gmail.com --- cache.h | 2 ++ config.c | 105 +++ 2 files changed, 107 insertions(+) diff --git a/cache.h b/cache.h index 107ac61..2038150 100644 --- a/cache.h +++ b/cache.h

[RFC/PATCH 2/2] config: Add new query functions to the api

2014-05-26 Thread Tanay Abhra
Add explanations for `git_config_get_string_multi` and `git_config_get_string` which utilize the config cache for querying in an non callback manner for a specific variable. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 19 +++ 1 file

Re: [RFC/PATCH 1/2] config: Add cache for config value querying

2014-05-27 Thread Tanay Abhra
rid of the variable int num_values by simply writing result = values-items[values-nr-1].string; Noted. Cheers, Tanay Abhra. -- 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 http://vger.kernel.org

[PATCH] config: Add documentation for writing config files

2014-06-02 Thread Tanay Abhra
Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt index 230b3a0..df08385

[RFC/PATCH v2 0/2] Git config cache special querying api utilizing the cache

2014-06-02 Thread Tanay Abhra
=sharing Cheers, Tanay Abhra. Tanay Abhra (2): config: Add hashtable for config parsing retrieval config: Add new query functions to the api docs Documentation/technical/api-config.txt | 18 + cache.h| 2 + config.c | 118

[RFC/PATCH v2 2/2] config: Add new query functions to the api docs

2014-06-02 Thread Tanay Abhra
Add explanations for `git_config_get_string_multi` and `git_config_get_string` which utilize the config hash table for querying in a non-callback manner for a specific variable. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 18 ++ 1

[RFC/PATCH v2 1/2] config: Add hashtable for config parsing retrieval

2014-06-02 Thread Tanay Abhra
. Signed-off-by: Tanay Abhra tanay...@gmail.com --- cache.h | 2 ++ config.c | 118 +++ 2 files changed, 120 insertions(+) diff --git a/cache.h b/cache.h index 107ac61..2038150 100644 --- a/cache.h +++ b/cache.h @@ -1271,6 +1271,8

Re: [PATCH] config: Add documentation for writing config files

2014-06-03 Thread Tanay Abhra
On 06/02/2014 12:37 PM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 31 ++- 1 file changed, 30 insertions(+), 1 deletion(-) Even though the reason

[PATCH v2] string-list: Add a value to string_list initializer lists

2014-06-03 Thread Tanay Abhra
l = { NULL, 0, 0, 1 }; and the last member that is not mentioned (i.e. 'cmp') is initialized to NULL. While there is nothing wrong in this construct, spelling out all the values where the macros are defined will serve also as a documentation, so let's do so. Signed-off-by: Tanay Abhra tanay

[PATCH v1] Git config cache special querying api utilizing the cache

2014-06-09 Thread Tanay Abhra
/file/d/0B4suZ-aHqDcnSUZJRXVTTnZUN1E/edit?usp=sharing Cheers, Tanay Abhra. Tanay Abhra (1): config: Add hashtable for config parsing retrival Documentation/technical/api-config.txt | 18 + cache.h| 2 + config.c | 122

[PATCH v1] config: Add hashtable for config parsing retrival

2014-06-09 Thread Tanay Abhra
. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 18 + cache.h| 2 + config.c | 122 + 3 files changed, 142 insertions(+) diff --git a/Documentation

Re: [PATCH v1] config: Add hashtable for config parsing retrival

2014-06-10 Thread Tanay Abhra
Hi, Thanks for the review, Eric. I have replied to your comments below, I will try to reply early and more promptly now. On 06/10/2014 04:27 AM, Eric Sunshine wrote: --- diff --git a/Documentation/technical/api-config.txt b/Documentation/technical/api-config.txt index 230b3a0..5b6e376

Re: [PATCH v1] config: Add hashtable for config parsing retrival

2014-06-10 Thread Tanay Abhra
On 06/10/2014 04:45 AM, Eric Sunshine wrote: One additional comment... On Mon, Jun 9, 2014 at 8:49 AM, Tanay Abhra tanay...@gmail.com wrote: +static int config_cache_set_value(const char *key, const char *value) +{ + struct hashmap *config_cache; + struct config_cache_entry *e

[PATCH v2 0/2] Git config cache special querying api utilizing the cache

2014-06-16 Thread Tanay Abhra
.nabble.com/RFC-PATCH-0-2-Git-config-cache-amp-special-querying-api-utilizing-the-cache-td7611691.html [3] https://drive.google.com/file/d/0B4suZ-aHqDcnSUZJRXVTTnZUN1E/edit?usp=sharing [4] http://thread.gmane.org/gmane.comp.version-control.git/251073/focus=251369 Cheers, Tanay Abhra. Tanay Abhra (2

[PATCH v2 1/2] string-list: Add string_list initializer helper functions

2014-06-16 Thread Tanay Abhra
When a compound construct like a string_list within another struct is used, the default initializer macros are useless. For such cases add helper functions for string_list initialization for both DUP and NODUP modes. Signed-off-by: Tanay Abhra tanay...@gmail.com --- string-list.c | 18

[PATCH v2 2/2] config: Add hashtable for config parsing retrieval

2014-06-16 Thread Tanay Abhra
. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 17 + cache.h| 2 + config.c | 123 + 3 files changed, 142 insertions(+) diff --git a/Documentation

[PATCH/RFC] branch.c: Replace `git_config` with `git_config_get_string`

2014-06-16 Thread Tanay Abhra
://thread.gmane.org/gmane.comp.version-control.git/251704 Cheers, Tanay Abhra. branch.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/branch.c b/branch.c index 660097b..257b1bf 100644 --- a/branch.c +++ b/branch.c @@ -140,33 +140,26 @@ static int

[PATCH/RFC] alias.c: Replace git_config with git_config_get_string

2014-06-16 Thread Tanay Abhra
Original implementation uses a callback based approach which has some deficiencies like a convoluted control flow and redundant variables. Use git_config_get_string instead of git_config to take advantage of the config hash-table. Signed-off-by: Tanay Abhra tanay...@gmail.com --- **DOUBT

Re: [PATCH v2 2/2] config: Add hashtable for config parsing retrieval

2014-06-16 Thread Tanay Abhra
On 06/16/2014 10:11 AM, Matthieu Moy wrote: Tanay Abhra tanay...@gmail.com writes: Add a hash table to cache all key-value pairs read from config files (repo specific .git/config, user wide ~/.gitconfig and the global /etc/gitconfig). Add two external functions `git_config_get_string

Re: [PATCH/RFC] branch.c: Replace `git_config` with `git_config_get_string`

2014-06-16 Thread Tanay Abhra
On 06/16/2014 10:29 AM, Matthieu Moy wrote: Subject: Re: [PATCH/RFC] branch.c: Replace `git_config` with `git_config_get_string` Here and elsewhere: usually, no capital after :. Noted. Tanay Abhra tanay...@gmail.com writes: Original implementation uses a callback based approach which

Re: [PATCH] doc git: multivar configuration parameters append to existing values

2014-06-16 Thread Tanay Abhra
On 06/16/2014 05:49 AM, Philip Oakley wrote: Pass a configuration parameter to the command. The value - given will override values from configuration files. + given will override single valued variables from configuration + files, and append to multivar variables. Previous

Re: [PATCH/RFC] alias.c: Replace git_config with git_config_get_string

2014-06-17 Thread Tanay Abhra
, )) + config_error_nonbool(alias_key); What do you think about this approach? Thanks for the suggestion, I was pulling my hair out due this bug for last two days. Cheers, Tanay Abhra. -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord

Re: [PATCH v2 1/2] string-list: Add string_list initializer helper functions

2014-06-17 Thread Tanay Abhra
On 06/16/2014 03:59 PM, Junio C Hamano wrote: Tanay Abhra tanay...@gmail.com writes: When a compound construct like a string_list within another struct is used, the default initializer macros are useless. For such cases add helper functions for string_list initialization for both DUP

Re: [PATCH 0/16] skip_prefix refactoring and cleanups

2014-06-18 Thread Tanay Abhra
Hi, I was about to send a patch like this series today, I am attaching it below. -- 8 -- Subject: [PATCH] imap-send: use skip_prefix instead of using magic numbers Signed-off-by: Tanay Abhra tanay...@gmail.com --- imap-send.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff

[PATCH v3 0/3] git config cache special querying api utilizing the cache

2014-06-23 Thread Tanay Abhra
-control.git/251704/ Tanay Abhra (3): string-list: Add string_list initializer helper functions config: Add hashtable for config parsing retrieval test-config .gitignore | 1 + Documentation/technical/api-config.txt | 26 ++ Makefile

[PATCH v3 2/3] config: add hashtable for config parsing retrieval

2014-06-23 Thread Tanay Abhra
O(1) lookups once the hash table is constructed. Signed-off-by: Tanay Abhra tanay...@gmail.com --- Documentation/technical/api-config.txt | 26 ++ cache.h| 2 + config.c | 144 + 3 files changed

[PATCH v3 3/3] test-config: add usage examples for non-callback query functions

2014-06-23 Thread Tanay Abhra
Add different usage examples for 'git_config_get_string' and `git_config_get_string_multi`. They will serve as documentation on how to query for config values in a non-callback manner. Signed-off-by: Tanay Abhra tanay...@gmail.com --- .gitignore| 1 + Makefile | 1 + test-config.c

[PATCH v3 1/3] string-list: add string_list initialiser helper functions

2014-06-23 Thread Tanay Abhra
The string-list API has STRING_LIST_INIT_* macros to be used to define variables with initialisers, but lacks functions to initialise an uninitialised piece of memory to be used as a string-list at the run-time. Introduce string_list_init_{dup,nodup}() functions for that. Signed-off-by: Tanay

[RFC/PATCH] pager.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- pager.c | 44 +++- 1 file changed, 15 insertions(+), 29 deletions

[RFC/PATCH] notes.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- notes.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/notes.c b

[RFC/PATCH] notes-util.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- notes-utils.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff

[RFC/PATCH] imap-send.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- imap-send.c | 68 ++--- 1 file changed, 29 insertions

[RFC/PATCH V2] branch.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- branch.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/branch.c

[RFC/PATCH V2] alias.c: replace git_config with git_config_get_string

2014-06-23 Thread Tanay Abhra
Use git_config_get_string instead of git_config to take advantage of the config hash-table api which provides a cleaner control flow. Signed-off-by: Tanay Abhra tanay...@gmail.com --- alias.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git

Re: [PATCH v3 1/3] string-list: add string_list initialiser helper functions

2014-06-23 Thread Tanay Abhra
On 06/23/2014 05:36 AM, Torsten Bögershausen wrote: If we look at the definition below: struct string_list { struct string_list_item *items; unsigned int nr, alloc; unsigned int strdup_strings:1; compare_strings_fn cmp; /* NULL uses strcmp() */ I think a simple

Re: [PATCH v3 2/3] config: add hashtable for config parsing retrieval

2014-06-23 Thread Tanay Abhra
On 06/23/2014 07:57 AM, Ramsay Jones wrote: On 23/06/14 11:11, Tanay Abhra wrote: diff --git a/config.c b/config.c index a1aef1c..6200f36 100644 --- a/config.c +++ b/config.c @@ -9,6 +9,8 @@ #include exec_cmd.h #include strbuf.h #include quote.h +#include hashmap.h +#include string

  1   2   3   4   >