[PATCH 1/4] Use BASIC_FLAGS for profile feedback

2014-07-07 Thread Andi Kleen
From: Andi Kleen Use BASIC_CFLAGS instead of CFLAGS to set up the profile feedback option in the Makefile. This allows still overriding CFLAGS on the make command line without disabling profile feedback. Signed-off-by: Andi Kleen --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 delet

[PATCH 4/4] Fix profile feedback with -jN and add profile-fast

2014-07-07 Thread Andi Kleen
From: Andi Kleen Profile feedback always failed for me with -jN. The problem was that there was no implicit ordering between the profile generate stage and the profile use stage. So some objects in the later stage would be linked with profile generate objects, and fail due to the missing -lgcov.

[PATCH 3/4] Run the perf test suite for profile feedback too

2014-07-07 Thread Andi Kleen
From: Andi Kleen Signed-off-by: Andi Kleen --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index a9770ac..ba64be9 100644 --- a/Makefile +++ b/Makefile @@ -1647,6 +1647,7 @@ ifeq ($(filter all,$(MAKECMDGOALS)),all) all:: profile-clean $(MAKE) PROFILE

[PATCH 2/4] Don't define away __attribute__ on gcc

2014-07-07 Thread Andi Kleen
From: Andi Kleen Profile feedback sets -DNO_NORETURN, which causes the compat header file to go into a default #else block. That #else block defines away __attribute__(). Doing so causes all kinds of problems with the Linux and gcc system headers: in particular it makes the xmmintrin.h headers er

Profile feedback patchkit v2

2014-07-07 Thread Andi Kleen
Fix the bitrotted profile feedback support. Changes to v1: - Remove obsolete comment - Remove controversal diff script. -- 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-

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

2014-07-07 Thread Christian Couder
From: Junio C Hamano > Christian Couder writes: > >> 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 >> --- > > Heh, "might be useful" is

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

2014-07-07 Thread Christian Couder
From: Junio C Hamano > Christian Couder writes: > >> 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 >>

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

2014-07-07 Thread Christian Couder
From: Junio C Hamano > > Christian Couder writes: > >> 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 p

Branch list by date

2014-07-07 Thread Jeremy Apthorp
I built this terribly-written alias because I wanted to see a list of branches by date of commit. The output looks like this: $ git bbd 11 months ago pipette_editor 7 weeks ago ensure-ie-rendering-edge 6 weeks ago strings-yml 5 weeks ago message-when-validation-fails 4 weeks

[PATCH v5 2/4] test-dump-cache-tree: invalid trees are not errors

2014-07-07 Thread David Turner
Do not treat known-invalid trees as errors even when their subtree_nr is incorrect. Because git already knows that these trees are invalid, an incorrect subtree_nr will not cause problems. Add a couple of comments. Signed-off-by: David Turner --- test-dump-cache-tree.c | 4 ++-- 1 file changed

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

2014-07-07 Thread David Turner
Add tests to confirm that invalidation of subdirectories neither over- nor under-invalidates. Signed-off-by: David Turner --- t/t0090-cache-tree.sh | 26 +++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index

[PATCH v5 4/4] cache-tree: Write updated cache-tree after commit

2014-07-07 Thread David Turner
During the commit process, update the cache-tree. Write this updated cache-tree so that it's ready for subsequent commands. Add test code which demonstrates that git commit now writes the cache tree. Make all tests test the entire cache-tree, not just the root level. Signed-off-by: David Turner

[PATCH v5 1/4] cache-tree: Create/update cache-tree on checkout

2014-07-07 Thread David Turner
When git checkout checks out a branch, create or update the cache-tree so that subsequent operations are faster. update_main_cache_tree learned a new flag, WRITE_TREE_REPAIR. When WRITE_TREE_REPAIR is set, portions of the cache-tree which do not correspond to existing tree objects are invalidated

Re: [PATCH v4 4/4] cache-tree: Write updated cache-tree after commit

2014-07-07 Thread Junio C Hamano
Junio C Hamano writes: >> diff --git a/builtin/commit.c b/builtin/commit.c >> index 9cfef6c..5981755 100644 >> --- a/builtin/commit.c >> +++ b/builtin/commit.c >> @@ -342,6 +342,8 @@ static char *prepare_index(int argc, const char **argv, >> const char *prefix, >> >> discard_cache

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

2014-07-07 Thread Junio C Hamano
Christian Couder writes: > 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 > --- Heh, "might be useful" is an understatement ;-) We won't apply

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

2014-07-07 Thread Junio C Hamano
Christian Couder writes: > 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 mo

Re: Potential bug in ls-files (version 1.7.9.5)

2014-07-07 Thread Jonathan Nieder
Hi Hamilton, Hamilton Turner wrote: > My project has this directory structure > > . > ├── aspnet > │ ├── .gitignore > │ ├── __init__.py > │ ├── lib > │ │ ├── > > My aspnet/.gitignore lists lib/*, and git add aspnet/lib/foo reports > that this path is ignored. > > But git ls-files --

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

2014-07-07 Thread Junio C Hamano
Christian Couder writes: > 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 > ---

Re: [PATCH 3/5] Run the perf test suite for profile feedback too

2014-07-07 Thread Andi Kleen
On Mon, Jul 07, 2014 at 02:06:57PM -0700, Junio C Hamano wrote: > Andi Kleen writes: > > > From: Andi Kleen > > > > Open: If the perf test suite is representative enough it may > > be reasonable to only run that and skip the much longer full > > test suite. Thoughts? > > I do not think it right

Potential bug in ls-files (version 1.7.9.5)

2014-07-07 Thread Hamilton Turner
I'd appreciate if someone could confirm that this is a bug in git, as this works as expected with git 1.8.5.2. I'm not sure if this 1.7.X is still supported, but I think it's still the latest git-core available in Ubuntu 12.04 repositories. I'm having problems with git ls-files --others --ignored

Re: [BUG] rebase no longer omits local commits

2014-07-07 Thread John Keeping
On Mon, Jul 07, 2014 at 10:56:23AM -0700, Junio C Hamano wrote: > John Keeping writes: > > > Perhaps we shuld do something like this (which passes the test suite): > > > > -- >8 -- > > diff --git a/git-rebase.sh b/git-rebase.sh > > index 06c810b..0c6c5d3 100755 > > --- a/git-rebase.sh > > +++ b/g

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

2014-07-07 Thread Junio C Hamano
Pete Wyckoff writes: > I'm not sure how to robustify this. At least doing the multiple > comparisons should make the tests work again. The goal of this > series of tests is to make sure that copy detection is working, > not to verify that the correct copy choice was made. That should > be in o

Re: [PATCH 3/5] Run the perf test suite for profile feedback too

2014-07-07 Thread Junio C Hamano
Andi Kleen writes: > From: Andi Kleen > > Open: If the perf test suite is representative enough it may > be reasonable to only run that and skip the much longer full > test suite. Thoughts? I do not think it right now is representative, nor it was meant to become so. The operations are those t

Re: [PATCH v4 4/4] cache-tree: Write updated cache-tree after commit

2014-07-07 Thread Junio C Hamano
David Turner writes: > During the commit process, update the cache-tree. Write this updated > cache-tree so that it's ready for subsequent commands. > > Add test code which demonstrates that git commit now writes the cache > tree. Make all tests test the entire cache-tree, not just the root > le

Re: [PATCH 00/14] Add submodule test harness

2014-07-07 Thread Torsten Bögershausen
On 2014-07-07 19.05, Junio C Hamano wrote: > Jens Lehmann writes: > >> Junio, do you want me to resend 02/14 without the non-portable "echo -n" >> or could you just squash the following diff in? > > Amended locally here already; thanks, both. There seems to be some other trouble under Mac OS, n

Re: [PATCH v4 2/4] test-dump-cache-tree: invalid trees are not errors

2014-07-07 Thread Junio C Hamano
David Turner writes: > Do not treat known-invalid trees as errors even when their count is > incorrect. Because git already knows that these trees are invalid, > nothing depends on the count field. s/count/subtree_nr/; they are different. "nothing depends on" is not quite correct. The field k

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

2014-07-07 Thread Junio C Hamano
David Turner writes: > Add tests to confirm that invalidation of subdirectories nether over- > nor under-invalidates. > > Signed-off-by: David Turner > --- > t/t0090-cache-tree.sh | 28 +--- > 1 file changed, 25 insertions(+), 3 deletions(-) > > diff --git a/t/t0090-cach

Re: [PATCH v4 1/4] cache-tree: Create/update cache-tree on checkout

2014-07-07 Thread Junio C Hamano
David Turner writes: > When git checkout checks out a branch, create or update the > cache-tree so that subsequent operations are faster. > > update_main_cache_tree learned a new flag, WRITE_TREE_REPAIR. When > WRITE_TREE_REPAIR is set, portions of the cache-tree which do not > correspond to exi

Re: [PATCH 1/2] symlinks: remove PATH_MAX limitation

2014-07-07 Thread Junio C Hamano
Karsten Blees writes: > 'git checkout' fails if a directory is longer than PATH_MAX, because the > lstat_cache in symlinks.c checks if the leading directory exists using > PATH_MAX-bounded string operations. > > Remove the limitation by using strbuf instead. Good. > diff --git a/cache.h b/cache

Re: [PATCH] refs: Fix valgrind suppression file

2014-07-07 Thread Junio C Hamano
David Turner writes: > Add all of the ways in which check_refname_format violates valgrind's > expectations to the valgrind suppression file; remove an assumption about > the call chain of check_refname_format from same. > > Signed-off-by: David Turner > --- > t/valgrind/default.supp | 15 +

Re: [PATCH 2/2] t/Makefile: always test all lint targets when running tests

2014-07-07 Thread Junio C Hamano
Jens Lehmann writes: > Only the two targets "test-lint-duplicates" and "test-lint-executable" are > currently executed when running the test target. This was done on purpose > when the TEST_LINT variable was added in 81127d74. But as this does not > include the "test-lint-shell-syntax" target add

Re: [BUG] rebase no longer omits local commits

2014-07-07 Thread Junio C Hamano
John Keeping writes: > Perhaps we shuld do something like this (which passes the test suite): > > -- >8 -- > diff --git a/git-rebase.sh b/git-rebase.sh > index 06c810b..0c6c5d3 100755 > --- a/git-rebase.sh > +++ b/git-rebase.sh > @@ -544,7 +544,8 @@ if test "$fork_point" = t > then > new_u

Re: [PATCH v1 4/4] hashmap: add string interning API

2014-07-07 Thread Junio C Hamano
Karsten Blees writes: > Interning short strings with high probability of duplicates can reduce the > memory footprint and speed up comparisons. > > Add strintern() and memintern() APIs that use a hashmap to manage the pool > of unique, interned strings. > > Note: strintern(getenv()) could be used

Re: [PATCH v1 3/4] hashmap: add simplified hashmap_get_from_hash() API

2014-07-07 Thread Junio C Hamano
Karsten Blees writes: > Hashmap entries are typically looked up by just a key. The hashmap_get() > API expects an initialized entry structure instead, to support compound > keys. This flexibility is currently only needed by find_dir_entry() in > name-hash.c (and compat/win32/fscache.c in the msys

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

2014-07-07 Thread Max Kirillov
On Mon, Jul 07, 2014 at 12:49:01PM +0200, Dennis Kaarsemaker wrote: > I do intend to use checkout --to and submodule update on the same > repository, but have not yet done so. I will poke at that later this > month. If you can easily reproduce errors, I would appreciate to know > how, because my us

Re: [PATCH v1 1/4] hashmap: factor out getting an int hash code from a, SHA1

2014-07-07 Thread Junio C Hamano
Karsten Blees writes: > Copying the first bytes of a SHA1 is duplicated in six places, however, > the implications (wrong byte order on little-endian systems) is documented > only once. s/wrong /different /; but other than that I think this is a good change. > +`unsigned int sha1hash(const unsi

Re: Adding 'Signed-off-by' to 'subtree add --squash' commits

2014-07-07 Thread Jeff King
On Mon, Jul 07, 2014 at 06:55:07PM +0200, Andreas Schwab wrote: > "Finucane, Stephen" writes: > > > Is it possible to "sign off" squashed commits created by the 'git subtree > > add ... --squash' command? > > If it isn't directly possible, you can always use "git commit --amend -C > HEAD -s" t

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

2014-07-07 Thread Matthieu Moy
Tanay Abhra writes: > test_expect_success 'find value with misspelled key' ' > - echo "Value not found for \"my.fOo Bar.hi\"" >expect && > - test_must_fail test-config get_value "my.fOo Bar.hi" >actual && > - test_cmp expect actual > + check "my.fOo Bar.hi" "Value not found for \

Re: [PATCH 00/14] Add submodule test harness

2014-07-07 Thread Junio C Hamano
Jens Lehmann writes: > Junio, do you want me to resend 02/14 without the non-portable "echo -n" > or could you just squash the following diff in? Amended locally here already; thanks, both. > > -8< > diff --git a/t/lib-submodule-update.sh b/t/lib-submodule-update.sh > index 24c9fd7..358

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

2014-07-07 Thread Matthieu Moy
Tanay Abhra writes: > diff --git a/t/t1308-config-hash.sh b/t/t1308-config-hash.sh > new file mode 100755 > index 000..ad99f8b > --- /dev/null > +++ b/t/t1308-config-hash.sh > @@ -0,0 +1,168 @@ > +#!/bin/sh > + > +test_description='Test git config-hash API in different settings' You may want

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

2014-07-07 Thread Junio C Hamano
Tanay Abhra writes: > 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 >> review when you send t

Re: [PATCH 1/3] cache-tree: Create/update cache-tree on checkout

2014-07-07 Thread Junio C Hamano
David Turner writes: >> I am not convinced that doing an equivalent of write-tree when you >> switch branches is the right approach in the first place. You will >> eventually write it out as a tree, and having a relatively undamaged >> cache-tree will help you when you do so, but spending the cy

Re: Adding 'Signed-off-by' to 'subtree add --squash' commits

2014-07-07 Thread Andreas Schwab
"Finucane, Stephen" writes: > Is it possible to "sign off" squashed commits created by the 'git subtree add > ... --squash' command? If it isn't directly possible, you can always use "git commit --amend -C HEAD -s" to modify the commit afterwards. Andreas. -- Andreas Schwab, sch...@linux-m68

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

2014-07-07 Thread Dennis Kaarsemaker
On ma, 2014-07-07 at 17:25 +0700, Duy Nguyen wrote: > > I also have a comment about how it interacts with submodules. > > Would it be more appropriate to mark "modules" as a > > per-checkout directory? Because each of the working tree's > > submodule is obviously a separated directory in filesyste

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

2014-07-07 Thread Duy Nguyen
On Mon, Jul 7, 2014 at 3:46 AM, Max Kirillov wrote: > 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 >

Adding 'Signed-off-by' to 'subtree add --squash' commits

2014-07-07 Thread Finucane, Stephen
Is it possible to "sign off" squashed commits created by the 'git subtree add ... --squash' command? I ask, because the Signed-off-by tag is a requirement for a project I work on, but I've been unable to achieve this. A thorough search of Google/StackOverflow reveals nothing. Regards, Stephen

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

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

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

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

2014-07-07 Thread Tanay Abhra
Hi, [PATCH V6]: Style nits and mistakes corrected. Diff between v6 and v5[8] is at the bottom. Thanks to Matthieu, Ramsay and Ram for their suggestions. [PATCH V5]: `config_set` now uses a single hashmap. Corrected style nits raised in the thread[7]. Thanks t

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

2014-07-07 Thread Matthieu Moy
Ramkumar Ramachandra writes: > 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. Hmm, fresh, but not empty. Anyway, the next test does a ca