Re: [ANNOUNCE] Git v2.16.0-rc2 - breakages in t1308 and 1404

2018-01-12 Thread Tanay Abhra
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

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

2014-03-01 Thread Tanay Abhra
Signed-off-by: Tanay Abhra --- 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 *author_date

[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 Signed-off-by: Tanay Abhra --- Patch V2 Corrected email formatting ,reapplied the implementation according to suggest

[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 Helped-by: Junio C Hamano Helped-by: Michael Haggerty Signed-off-by: Tanay Abhra --- Patch V3 Variable naming improved, removed assignments in

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

2014-03-04 Thread Tanay Abhra
ite the superfluous stuff which you have written in the bottom after ---(the three dashes after the signed off statement) . In the parse_signed_commit() function, gpg_sig_header_len and gpg_sig_header variables are precomputed outside of the function, and also Junio said to prefer starts_with(

Re: git compile with debug symbols

2014-03-04 Thread Tanay Abhra
(gdb)> gdb break help.c:396 Breakpoint 1 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
d-by: Junio C Hamano Helped-by: Michael Haggerty Signed-off-by: Tanay Abhra Signed-off-by: Junio C Hamano --- Patch V4 Identation improved, removed useless comment. [1] Thanks to Junio C Hamano and Max Horn. [1] http://article.gmane.org/gmane.comp.version-control.git/243388 Patc

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

2014-03-04 Thread Tanay Abhra
d-by: Junio C Hamano Helped-by: Michael Haggerty Signed-off-by: Tanay Abhra --- Patch V5 Minor revision of indentation Patch V4 Identation improved, removed useless comment. [1] Thanks to Junio C Hamano and Max Horn. [1] http://article.gmane.org/gmane.comp.version-control.git/24

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

2014-03-04 Thread Tanay Abhra
your mail late, so I had already sent a revised patch [1]. Please ignore 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

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

2014-03-19 Thread tanay abhra
ad.gmane.org/gmane.comp.version-control.git/219505 [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 th

[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-22 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 retrospective (Git Config API Improvements)

2014-09-04 Thread Tanay Abhra
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

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

2014-09-12 Thread Tanay Abhra
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

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

2014-09-12 Thread Tanay Abhra
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 ++

[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 `git_config_

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

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

[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 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

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

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

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

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

[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 Signed-off-by: Tanay Abhra --- config.c | 38 +++--- 1 file changed, 19 insertions(+), 19

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 writes: > >> +test_expect_success 'document how unset.variable will behave in shell >> scripts' ' >> +rm -f .git/config && >> +cat >expect <<-\EOF && >>

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 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&

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 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. >>>

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 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 > > ---

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 > >

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 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

[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 --- Hi, You were

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

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

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

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

[GSoC 2014] Accepted GSoC student introduction

2014-04-25 Thread tanay abhra
rimental.But , other suggestions are welcome for this problem .The mailing list itself was conflicted about 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. -- 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: commit all the untracked files prior adding them to stage using "git add"

2014-05-17 Thread Tanay Abhra
want is, $ git add -A && git commit -m "your message" where git add -A adds all new files to the staging area to track. A piece of advice, you seem to be new to git, 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

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

2014-05-26 Thread Tanay Abhra
s and values. I have 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 c

[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 --- 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 @@ -1271,6 +1271,8

[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 --- Documentation/technical/api-config.txt | 19 +++ 1 file changed, 19

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

2014-05-27 Thread Tanay Abhra
e->value_list->nr = 0; >> +e->value_list->alloc = 0; >> +e->value_list->items = NULL; >> +e->value_list->cmp = NULL; > When malloc() is replaced by xcalloc() the x = NULL and y = 0 can go away, > and the code is shorter and eas

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

2014-06-02 Thread Tanay Abhra
Add a NULL value in the end of STRING_LIST_INIT_NODUP and STRING_LIST_DUP to initialize `compare_strings_fn`. Signed-off-by: Tanay Abhra --- When I used a malloced string_list to play around with string-list API and used the default init_list, it caused a seg fault. After an hour of debugging I

[PATCH] config: Add documentation for writing config files

2014-06-02 Thread Tanay Abhra
Signed-off-by: Tanay Abhra --- 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 100644 --- a

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

2014-06-02 Thread Tanay Abhra
nZUN1E/edit?usp=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

[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 --- Documentation/technical/api-config.txt | 18 ++ 1 file changed, 18

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

2014-06-02 Thread Tanay Abhra
. Signed-off-by: Tanay Abhra --- 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 @@ extern int

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 writes: > >> Signed-off-by: Tanay Abhra >> --- >> Documentation/technical/api-config.txt | 31 ++- >> 1 file changed, 30 insertions(+), 1 deletion(-) > > Even though th

[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

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

2014-06-09 Thread Tanay Abhra
ttps://drive.google.com/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

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

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

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..5b6e37

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 wrote: >> +static int config_cache_set_value(const char *key, const char *value) >> +{ >> + struct hashmap *config_cache; >> +

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

2014-06-16 Thread Tanay Abhra
] http://git.661346.n2.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, Tan

[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 --- string-list.c | 18 ++ string

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

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

[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 --- **DOUBT** This patch builds on

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 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 `gi

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 writes: > >> Original implementation uses a

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. Previou

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

2014-06-17 Thread Tanay Abhra
th a strcmp like, + v = git_config_get_string(alias_key); + if (!strcmp(v, "")) + 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.

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 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 >> initial

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 --- imap-send.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/imap-sen

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

2014-06-23 Thread Tanay Abhra
http://thread.gmane.org/gmane.comp.version-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

[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 --- Documentation/technical/api-config.txt | 26 ++ cache.h| 2 + config.c | 144 + 3 files changed, 172 insertions

[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 --- .gitignore| 1 + Makefile | 1 + test-con

[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 --- pager.c | 44 +++- 1 file changed, 15 insertions(+), 29 deletions(-) diff --git a/pager.c

[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 --- notes.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/notes.c b/notes.c index 5fe691d

[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 --- notes-utils.c | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/notes-utils.c

[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 --- imap-send.c | 68 ++--- 1 file changed, 29 insertions(+), 39 deletions

[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 --- branch.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/branch.c b/branch.c index

[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 --- alias.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/alias.c b/alias.c index

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" >>

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

2014-06-23 Thread Tanay Abhra
On 6/24/2014 4:08 AM, Jonathan Nieder wrote: Tanay Abhra wrote: alias.c | 28 ++-- 1 file changed, 10 insertions(+), 18 deletions(-) What commit are these patches against? Are they a continuation of the "git config cache & special querying api" serie

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

2014-06-24 Thread Tanay Abhra
ady allows looking up local configuration by passing in the null_sha1 for gitmodule or commit sha1. What else can I add to my implementation, please suggest. 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 at http://vger.kernel.org/majordomo-info.html

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

2014-06-24 Thread Tanay Abhra
uot;cooking" now. His series already allows looking up local configuration by passing in the null_sha1 for gitmodule or commit sha1. What else can I add to my implementation, please suggest. [1] http://thread.gmane.org/gmane.comp.version-control.git/250811 Thanks, Tanay Abhra -- To u

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

2014-06-24 Thread Tanay Abhra
On 6/23/2014 5:25 PM, Matthieu Moy wrote: Tanay Abhra writes: +/* for NULL values, 'util' for each `string_list_item` is flagged as 1 */ It's a void *, so just saying that it is flagged as 1 does not say how it's encoded. How about "... is an 'int *' poin

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

2014-06-24 Thread Tanay Abhra
On 6/24/2014 4:44 AM, Junio C Hamano wrote: Tanay Abhra writes: +static int hashmap_initialized; + ... +static struct hashmap *get_config_cache(void) +{ + static struct hashmap config_cache; + if (!hashmap_initialized) { + config_cache_init(&config_c

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 10:15 AM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> diff --git a/branch.c b/branch.c >> index 660097b..c9a2a0d 100644 >> --- a/branch.c >> +++ b/branch.c >> @@ -140,33 +140,25 @@ static int setup_tracking(co

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 12:39 PM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> Use git_config_get_string instead of git_config to take advantage of >> the config hash-table api which provides a cleaner control flow. > > You may want to mention as a

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 1:24 PM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> 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 Abhr

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 1:36 PM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> 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 Abh

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 7:42 AM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> 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 Abh

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

2014-06-26 Thread Tanay Abhra
On 6/25/2014 9:29 AM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >> 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 Abh

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

2014-06-26 Thread Tanay Abhra
Hi, I thought about adding a test*.sh file after sending the series. No worries, I will rectify it in the next patch. Also, I have read all your comments. Thanks for the review. Cheers, Tanay Abhra. On 6/25/2014 4:49 PM, Eric Sunshine wrote: > On Mon, Jun 23, 2014 at 6:11 AM, Tanay Ab

[PATCH/RFC] config: Add config sets for config parsing & retrieval

2014-06-27 Thread Tanay Abhra
et_int and similar, won't the helper functions in config.c would become redundant. Is it really necessary to write new helper functions for the non-callback code, instead of reusing the older ones? [1]: http://marc.info/?t=14035185021&r=1&w=2 Cheers, Tanay Abhra. Documentat

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

2014-06-30 Thread Tanay Abhra
On 6/30/2014 7:04 PM, Karsten Blees wrote: > Am 29.06.2014 13:01, schrieb Eric Sunshine: >> On Thu, Jun 26, 2014 at 4:19 AM, Tanay Abhra wrote: >>> On 6/25/2014 1:24 PM, Eric Sunshine wrote: >>>> On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra wrote: >>>

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

2014-06-30 Thread Tanay Abhra
On 6/30/2014 9:26 PM, Karsten Blees wrote: > Am 30.06.2014 16:39, schrieb Tanay Abhra: >> >> On 6/30/2014 7:04 PM, Karsten Blees wrote: >>> Am 29.06.2014 13:01, schrieb Eric Sunshine: >>>> On Thu, Jun 26, 2014 at 4:19 AM, Tanay Abhra wrote: >>>

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

2014-07-01 Thread Tanay Abhra
51073/focus=251369 [5] http://thread.gmane.org/gmane.comp.version-control.git/251704/ [6] http://thread.gmane.org/gmane.comp.version-control.git/252329/ Tanay Abhra (2): config-hash.c test-config .gitignore | 1 + Documentation/technical/api-config.txt |

[PATCH v4 1/2] add `config_set` API for caching config files

2014-07-01 Thread Tanay Abhra
query functions that are implemented as a thin wrapper around the `config_set` API. Signed-off-by: Tanay Abhra --- Documentation/technical/api-config.txt | 144 Makefile | 1 + cache.h| 41 config-hash.c

[PATCH 2/2] test-config: Add tests for the config_set API

2014-07-01 Thread Tanay Abhra
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: Tanay Abhra --- .gitignore | 1 + Makefile | 1 + t

Re: [PATCH v4 1/2] add `config_set` API for caching config files

2014-07-02 Thread Tanay Abhra
On 7/2/2014 2:44 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> Add a `config_set` construct that points to an ordered set of config files >> specified by the user, each of which represents what was read and cached >> in core as hashmaps. Add two external functions

Re: [PATCH 2/2] test-config: Add tests for the config_set API

2014-07-02 Thread Tanay Abhra
On 7/2/2014 2:59 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> +test_expect_success 'clear default config' ' >> +rm -f .git/config >> +' >> + >> +cat > .git/config << EOF > > t/README says: > > - Put all

Re: [PATCH v4 1/2] add `config_set` API for caching config files

2014-07-03 Thread Tanay Abhra
On 7/2/2014 10:30 PM, Junio C Hamano wrote: > Tanay Abhra writes: > >> diff --git a/Documentation/technical/api-config.txt >> b/Documentation/technical/api-config.txt >> index 230b3a0..2c02fee 100644 >> --- a/Documentation/technical/api-config.txt >&g

Re: [PATCH v4 1/2] add `config_set` API for caching config files

2014-07-03 Thread Tanay Abhra
the multi hashmap one. Cheers, Tanay Abhra. -- >8 -- diff --git a/Makefile b/Makefile index 07ea105..d503f78 100644 --- a/Makefile +++ b/Makefile @@ -777,6 +777,7 @@ LIB_OBJS += commit.o LIB_OBJS += compat/obstack.o LIB_OBJS += compat/terminal.o LIB_OBJS += config.o +LIB_OBJS += config-has

Re: [PATCH v4 1/2] add `config_set` API for caching config files

2014-07-04 Thread Tanay Abhra
On 7/4/2014 2:47 PM, Matthieu Moy wrote: > Tanay Abhra writes: > >> Hi, >> >> I have cooked up a single hashmap implementation. What are your >> thoughts about it? > > I had a quick look, and it looks good to me. I'll make a more detailed > revie

[PATCH v5 2/2] test-config: Add tests for the config_set API

2014-07-06 Thread Tanay Abhra
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: Tanay Abhra --- .gitignore | 1 + Makefile | 1 + t

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

2014-07-06 Thread Tanay Abhra
sion-control.git/252329/ [7] http://marc.info/?t=14042811521&r=1&w=2 Tanay Abhra (2): config-hash.c test-config .gitignore | 1 + Documentation/technical/api-config.txt | 134 +++ Makefile | 2 + cache.h

[PATCH v5 1/2] add `config_set` API for caching config-like files

2014-07-06 Thread Tanay Abhra
around the `config_set` API. Signed-off-by: Tanay Abhra --- Documentation/technical/api-config.txt | 134 +++ Makefile | 1 + cache.h| 34 config-hash.c | 297

[PATCH v6 1/2] add `config_set` API for caching config-like files

2014-07-07 Thread Tanay Abhra
the `config_set` API. Signed-off-by: Tanay Abhra --- Documentation/technical/api-config.txt | 134 +++ Makefile | 1 + cache.h| 34 config-hash.c | 295

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

2014-07-07 Thread Tanay Abhra
mane.org/gmane.comp.version-control.git/251073/focus=251369 [5] http://thread.gmane.org/gmane.comp.version-control.git/251704/ [6] http://thread.gmane.org/gmane.comp.version-control.git/252329/ [7] http://marc.info/?t=14042811521&r=1&w=2 [8] http://article.gmane.org/gmane.comp.version-

[PATCH v6 2/2] test-config: Add tests for the config_set API

2014-07-07 Thread Tanay Abhra
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: Tanay Abhra --- .gitignore | 1 + Makefile | 1 + t

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

2014-07-09 Thread Tanay Abhra
git/252329/ [7] http://marc.info/?t=14042811521&r=1&w=2 [8] http://article.gmane.org/gmane.comp.version-control.git/252942/ [9] http://thread.gmane.org/gmane.comp.version-control.git/252959/ Tanay Abhra (2): config-hash.c test-config .gitignore | 1 + D

  1   2   3   4   >