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

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

2014-07-06 Thread Tanay Abhra
Hi, [PATCH V5]: `config_set` now uses a single hashmap. Corrected style nits raised in the thread[7]. Thanks to Junio and Matthieu for their suggestions. [PATCH v4]: Introduced `config_set` construct which points to a ordered set of config-files cached as hashmap

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

2014-07-06 Thread Tanay Abhra
Currently `git_config()` uses a callback mechanism and file rereads for config values. Due to this approach, it is not uncommon for the config files to be parsed several times during the run of a git program, with different callbacks picking out different variables useful to themselves. Add a `con

Re: [PATCH v4 3/4] cache-tree: subdirectory tests

2014-07-06 Thread Eric Sunshine
On Sun, Jul 6, 2014 at 12:06 AM, David Turner wrote: > Add tests to confirm that invalidation of subdirectories nether over- s/nether/neither/ > nor under-invalidates. > > Signed-off-by: David Turner > --- -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a messag

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

2014-07-06 Thread Ramsay Jones
On 06/07/14 08:19, Tanay Abhra wrote: > Currently `git_config()` uses a callback mechanism and file rereads for > config values. Due to this approach, it is not uncommon for the config > files to be parsed several times during the run of a git program, with > different callbacks picking out differe

RE: FYI

2014-07-06 Thread Denton, Cari-Lee
From: Denton, Cari-Lee Sent: July 6, 2014 12:44 AM To: Denton, Cari-Lee Subject: FYI You are picked, e-mail: mackenzie.glo...@yahoo.es for Info. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a

Re: Idea, Transparent commits, easier "code style" commits

2014-07-06 Thread Andrius Bentkus
-w looks good for my very specific whitespace case, but imagine you are adding or removing parenthesis like, it is still codestyle but -w doesn't cut it anymore. So yes, I want a flag! Well, if I think about it, the tools can implement themselves. They just have to look into the commit message a

Re: Idea, Transparent commits, easier "code style" commits

2014-07-06 Thread Javier Domingo Cansino
> They just have to look into the commit message and look for > "#codestylefix" or whatever other string. In many projects I have seen, they have a format for commits, such as "docs: Add support for XXX", "formatting: Space before parethesis and after comas", "tests: " and so on. Maybe, being

Test failure in t9814-git-p4-rename.sh - my environment or bad test?

2014-07-06 Thread Christoph Bonitz
Hi, I'm trying to get the git p4 tests to pass on my machine (OS X Mavericks) from master before making some changes. I'm experiencing a test failure in "detect copies" of the rename test. The test creates file2 with some content, creates a few copies (each with a commit), then does the following

Re: [PATCH 5/5] Add a little script to compare two make perf runs

2014-07-06 Thread Bert Wesarg
Hi, On Sat, Jul 5, 2014 at 1:43 AM, Andi Kleen wrote: > From: Andi Kleen > > Signed-off-by: Andi Kleen > --- > diff-res | 26 ++ > 1 file changed, 26 insertions(+) > create mode 100755 diff-res > > diff --git a/diff-res b/diff-res > new file mode 100755 > index 000

Re: [PATCH 5/5] Add a little script to compare two make perf runs

2014-07-06 Thread Andi Kleen
> a justification why the geometric mean is used here would increase my > confident significantly. It's just a standard way to summarize sets of benchmarks. For example SPEC uses the same approach. Anyways the script is not essential to the rest of the profile feedback feature. Just ignore it i

Re: [PATCH 5/5] Add a little script to compare two make perf runs

2014-07-06 Thread Bert Wesarg
On Sun, Jul 6, 2014 at 6:15 PM, Andi Kleen wrote: >> a justification why the geometric mean is used here would increase my >> confident significantly. > > It's just a standard way to summarize sets of benchmarks. For example SPEC > uses the same approach. No, SPEC would have calculated the geomet

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

2014-07-06 Thread Matthieu Moy
Tanay Abhra writes: > Add a default `config_set`, `the_config_set` to cache all key-value pairs > read from usual config files (repo specific .git/config, user wide > ~/.gitconfig and the global /etc/gitconfig). `the_config_set` uses a > single hashmap populated using `git_config()`. "uses a sin

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

2014-07-06 Thread Matthieu Moy
Tanay Abhra writes: > +test_expect_success 'get value for a simple key' ' > + echo "very blue" >expect && > + test-config get_value core.penguin >actual && > + test_cmp expect actual > +' All these tests would greatly benefit from a helper like test_expect_config () { echo "

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

2014-07-06 Thread Matthieu Moy
Tanay Abhra writes: > diff --git a/test-config.c b/test-config.c > new file mode 100644 > index 000..45ccd0a > --- /dev/null > +++ b/test-config.c > @@ -0,0 +1,127 @@ > +#include "cache.h" > +#include "hashmap.h" Useless include, you're not using the hashmap directly. > +int main(int argc,

Re: [PATCH v5 00/28] Support multiple checkouts

2014-07-06 Thread Max Kirillov
Hi. What future does this have? Currently it is marked as "Stalled", but still mergeable with some trivial conflicts and seem to be working (except some bugs in interaction with submodules, see below). It would be very nice if this feature is officially supported. I also have a comment about how

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

2014-07-06 Thread Ramkumar Ramachandra
A couple of quick nits. Tanay Abhra wrote: > +test_expect_success 'clear default config' ' > + rm -f .git/config > +' Unnecessary; a fresh temporary directory is created for each test run. > +test_expect_success 'initialize default config' ' You might want to mark this as "setup". -- To u

Re: Test failure in t9814-git-p4-rename.sh - my environment or bad test?

2014-07-06 Thread Pete Wyckoff
ml.christophbon...@gmail.com wrote on Sun, 06 Jul 2014 16:32 +0200: > I'm trying to get the git p4 tests to pass on my machine (OS X > Mavericks) from master before making some changes. I'm experiencing a > test failure in "detect copies" of the rename test. > > The test creates file2 with some co

[PATCH v1] rebase -p: Command line option --no-ff is ignored

2014-07-06 Thread Fabian Ruch
The --no-ff option instructs git-rebase to always recreate commits as they are being replayed, even if fast-forwards are possible. However, if git-rebase is asked to recreate merge commits (via the -p option), it suddenly ignores the --no-ff option and fast-forwards both normal and merge commits w

[PATCH v6 00/10] Add --graft option to git replace

2014-07-06 Thread Christian Couder
Here is a small series to implement: git replace [-f] --graft [...] This patch series goes on top of the patch series that implements --edit. The changes since v5, thanks to Junio, are: - new patch 1/10 to clean up redirection style in t6050 - new patches 8/10, 9/10 and 10/10 to check

[PATCH v6 01/10] replace: cleanup redirection style in tests

2014-07-06 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 48 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 68b3cb2..fb07ad2 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@

[PATCH v6 02/10] replace: add --graft option

2014-07-06 Thread Christian Couder
The usage string for this option is: git replace [-f] --graft [...] First we create a new commit that is the same as except that its parents are [...] Then we create a replace ref that replace with the commit we just created. With this new option, it should be straightforward to convert graf

[PATCH v6 06/10] replace: remove signature when using --graft

2014-07-06 Thread Christian Couder
It could be misleading to keep a signature in a replacement commit, so let's remove it. Note that there should probably be a way to sign the replacement commit created when using --graft, but this can be dealt with in another commit or patch series. Signed-off-by: Christian Couder --- builtin/r

[PATCH v6 05/10] contrib: add convert-grafts-to-replace-refs.sh

2014-07-06 Thread Christian Couder
This patch adds into contrib/ an example script to convert grafts from an existing grafts file into replace refs using the new --graft option of "git replace". While at it let's mention this new script in the "git replace" documentation for the --graft option. Signed-off-by: Christian Couder Sig

[PATCH v6 10/10] replace: add test for --graft with a mergetag

2014-07-06 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index 15fd541..3bb8d06 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -416,4 +416,26 @@ test_expect_success GPG '

[PATCH v6 04/10] Documentation: replace: add --graft option

2014-07-06 Thread Christian Couder
Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-replace.txt | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/git-replace.txt b/Documentation/git-replace.txt index 61461b9..491875e 100644 --- a/Documentation/git-replace.txt +++ b/Docume

[PATCH v6 07/10] replace: add test for --graft with signed commit

2014-07-06 Thread Christian Couder
Signed-off-by: Christian Couder --- t/t6050-replace.sh | 25 + 1 file changed, 25 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index d80a89e..15fd541 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.sh @@ -7,6 +7,7 @@ test_description='Tests rep

[PATCH v6 03/10] replace: add test for --graft

2014-07-06 Thread Christian Couder
Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- t/t6050-replace.sh | 40 1 file changed, 40 insertions(+) diff --git a/t/t6050-replace.sh b/t/t6050-replace.sh index fb07ad2..d80a89e 100755 --- a/t/t6050-replace.sh +++ b/t/t6050-replace.

[PATCH v6 09/10] replace: check mergetags when using --graft

2014-07-06 Thread Christian Couder
When using --graft, with a mergetag in the original commit, we should check that the commit pointed to by the mergetag is still a parent of then new commit we create, otherwise the mergetag could be misleading. If the commit pointed to by the mergetag is no more a parent of the new commit, we coul

[PATCH v6 08/10] commit: add for_each_mergetag()

2014-07-06 Thread Christian Couder
In the same way as there is for_each_ref() to iterate on refs, it might be useful to have for_each_mergetag() to iterate on the mergetags of a given commit. Signed-off-by: Christian Couder --- commit.c | 13 + commit.h | 5 + log-tree.c | 15 --- 3 files changed,