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

2014-07-01 Thread Matthieu Moy
Tanay Abhra tanay...@gmail.com writes: 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 tanay...@gmail.com wrote: On 6/25/2014 1:24 PM, Eric Sunshine wrote: On Mon, Jun 23, 2014 at 6:41 AM, Tanay Abhra

Re: [PATCH 2/2] wt-status: simplify building of summary limit argument

2014-07-01 Thread Matthieu Moy
René Scharfe l@web.de writes: Signed-off-by: Rene Scharfe l@web.de --- wt-status.c | 4 +--- Both patches sound straightforward and good to me. -- Matthieu Moy http://www-verimag.imag.fr/~moy/ -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: move detection doesnt take filename into account

2014-07-01 Thread Robin Rosenberg
- Ursprungligt meddelande - Från: Elliot Wolk elliot.w...@gmail.com Till: git@vger.kernel.org Skickat: måndag, 30 jun 2014 8:38:18 Ämne: move detection doesnt take filename into account if you move two identical {e.g.: empty} files to two new locations in a single commit, the

Re: [PATCH] Fix filter-branch to eliminate duplicate mapped parents

2014-07-01 Thread Charles Bailey
On Mon, Jun 30, 2014 at 10:20:27PM +0100, Charles Bailey wrote: From: Charles Bailey cbaile...@bloomberg.net This change ensure that duplicate parents are pruned before the parent filter and ensures that --prune-empty is idempotent, removing all empty non-merge commits in a singe pass.

Re: [PATCH v12 11/11] Documentation: add documentation for 'git interpret-trailers'

2014-07-01 Thread Christian Couder
On Mon, Jun 30, 2014 at 1:57 PM, Jakub Narębski jna...@gmail.com wrote: Christian Couder wrote: + + +* Configure a 'sign' trailer with a command to automatically add a + 'Signed-off-by: ' with the author information only if there is no + 'Signed-off-by: ' already, and show how

Re: move detection doesnt take filename into account

2014-07-01 Thread Elliot Wolk
interesting that it considers suffixes {only suffixes following periods?}. this is insufficient, in my opinion. with all other things being equal, it ought to find the closest match {using smith-waterman or some such algorithm}. as a real-world use case, i have a repository with empty files

Re: What's cooking in git.git (Jun 2014, #06; Thu, 26)

2014-07-01 Thread Junio C Hamano
Johannes Sixt j...@kdbg.org writes: Am 27.06.2014 00:02, schrieb Junio C Hamano: Four mingw series are still in limbo--are they in good enough shape for Windows folks who wanted to upstream them? I've now tested the Unicode patches a bit, and I didn't notice a regression in my use-cases.

Re: move detection doesnt take filename into account

2014-07-01 Thread Junio C Hamano
Robin Rosenberg robin.rosenb...@dewire.com writes: I think it does, but based on filename suffix. E.g. here is a rename of three empty files with a suffix. 3 files changed, 0 insertions(+), 0 deletions(-) rename 1.a = 2.a (100%) rename 1.b = 2.b (100%) rename 1.c = 2.c (100%) This is

Re: [PATCH] Fix filter-branch to eliminate duplicate mapped parents

2014-07-01 Thread Junio C Hamano
Charles Bailey char...@hashpling.org writes: I worked on this after discovering that --prune-empty often left some apparently empty commits that I was wasn't expecting it to leave and that running filter-branch --prune-empty in a loop would often do many passes where it was still pruning

Re: move detection doesnt take filename into account

2014-07-01 Thread Elliot Wolk
thanks for the info! then i suppose my bug is a petition to have name similarity instead use a different statistical matching algorithm. On 07/01/2014 10:57 AM, Junio C Hamano wrote: Robin Rosenberg robin.rosenb...@dewire.com writes: I think it does, but based on filename suffix. E.g. here

Re: [PATCH 3/8] paint_down_to_common: use prio_queue

2014-07-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: The downside is that our priority queue is not stable, which means that commits with the same timestamp may not come out in the order we put them in. You can see this in the test update in t6024. That test does a recursive merge across a set of commits that

Vote now for the New WSEAS President for 2014-2017 - WSEAS Presidency Elections for 2014-2017 --- See also mmctse.org

2014-07-01 Thread Julia Aidiniou
Vote now for the New WSEAS President for 2014-2017 - WSEAS Presidency Elections for 2014-2017 Past WSEAS Presidents http://www.wseas.org/cms.action?id=7692 - WSEAS Members (http://www.wseas.org/cms.action?id=7659 as

Re: [PATCH 4/8] add functions for memory-efficient bitmaps

2014-07-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sun, Jun 29, 2014 at 03:41:37AM -0400, Eric Sunshine wrote: +static inline void bitset_set(unsigned char *bits, int n) +{ + bits[n / CHAR_BIT] |= 1 (n % CHAR_BIT); +} Is it intentional or an oversight that there is no way to clear a bit in

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-01 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: Hi Max, On Sun, 29 Jun 2014, Max Kirillov wrote: diff --git a/xdiff/xmerge.c b/xdiff/xmerge.c index 9e13b25..625198e 100644 --- a/xdiff/xmerge.c +++ b/xdiff/xmerge.c @@ -245,11 +245,11 @@ static int xdl_fill_merge_buffer(xdfenv_t

Re: move detection doesnt take filename into account

2014-07-01 Thread Junio C Hamano
Elliot Wolk elliot.w...@gmail.com writes: On 07/01/2014 10:57 AM, Junio C Hamano wrote: Robin Rosenberg robin.rosenb...@dewire.com writes: I think it does, but based on filename suffix. E.g. here is a rename of three empty files with a suffix. 3 files changed, 0 insertions(+), 0

Re: [PATCH 3/8] paint_down_to_common: use prio_queue

2014-07-01 Thread Jeff King
On Tue, Jul 01, 2014 at 09:23:21AM -0700, Junio C Hamano wrote: but with this patch, the positions of B and A are swapped. This is probably fine, as the order is an internal implementation detail anyway (it would _not_ be fine if we were using a priority queue for git log traversal, which

Re: [PATCH 4/8] add functions for memory-efficient bitmaps

2014-07-01 Thread Jeff King
On Tue, Jul 01, 2014 at 09:57:13AM -0700, Junio C Hamano wrote: Another thing I noticed was that the definition of and the commentary on bitset_equal() and bitset_empty() sounded somewhat undecided. These functions take max that is deliberately named differently from num_bits (the width of

Re: [PATCH 08/16] use skip_prefix to avoid magic numbers

2014-07-01 Thread Jeff King
On Mon, Jun 23, 2014 at 02:44:23PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: diff --git a/connect.c b/connect.c index 94a6650..37ff018 100644 --- a/connect.c +++ b/connect.c @@ -140,12 +141,12 @@ struct ref **get_remote_heads(int in, char *src_buf, size_t

Re: [PATCH] Prevent space after directories in tcsh completion

2014-07-01 Thread janparadowski
Hello script works beautifully except for a small thing: reporoot ls folder/ folder_file.txt reproot git commit foTAB completes to git commit folderSPACE without presenting the completion options (git diff foTAB completes as expected to git diff folder and gives the 2 completion options) is

Re: [PATCH 5/8] string-list: add pos to iterator callback

2014-07-01 Thread Junio C Hamano
Jeff King p...@peff.net writes: When we are running a string-list foreach or filter, the callback function sees only the string_list_item, along with a void* data pointer provided by the caller. This is sufficient for most purposes. However, it can also be useful to know the position of the

[PATCH] sha1_file: avoid overrunning alternate object base string

2014-07-01 Thread René Scharfe
While checking if a new alternate object database is a duplicate make sure that old and new base paths have the same length before comparing them with memcmp. This avoids overrunning the buffer of the existing entry if the new one is longer and it stops rejecting foobar/ after foo/ was already

Re: [PATCH 6/8] commit: provide a fast multi-tip contains function

2014-07-01 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: If you are trying to do branch --with $commit, what you would want is not exactly paint-down-to-common(all branches, $commit), but something that paints down to $commit from all branches, with an optimization that cuts off the traversal at a commit

Re: [PATCH 5/8] string-list: add pos to iterator callback

2014-07-01 Thread Jeff King
On Tue, Jul 01, 2014 at 10:45:19AM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: When we are running a string-list foreach or filter, the callback function sees only the string_list_item, along with a void* data pointer provided by the caller. This is sufficient for most

Re: [PATCH 6/8] commit: provide a fast multi-tip contains function

2014-07-01 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: I forgot about the other direction, i.e. branch --merged $commit. Since I do git branch --no-merged pu fairly often, I care about its performance ;-) We paint $commit as Left, and tips of all the branches as Right. We try to paint down from $commit

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

2014-07-01 Thread David Turner
On Tue, 2014-07-01 at 06:16 +0200, Torsten Bögershausen wrote: diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 6c33e28..7c60675 100755 --- a/t/t0090-cache-tree.sh +++ b/t/t0090-cache-tree.sh @@ -85,9 +85,22 @@ test_expect_success 'reset --hard without index gives

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

2014-07-01 Thread David Turner
When git checkout checks out a branch, create or update the cache-tree so that subsequent operations are faster. Signed-off-by: David Turner dtur...@twitter.com --- builtin/checkout.c| 8 cache-tree.c | 5 +++-- t/t0090-cache-tree.sh | 19 --- 3 files

[PATCH 3/3] cache-tree: Write index with updated cache-tree after commit

2014-07-01 Thread David Turner
During the commit process, the cache-tree is updated. We need to 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. Also demonstrate that cache-tree invalidation is correct. Signed-off-by: David

[PATCH 2/3] test-dump-cache-tree: Improve output format and exit code

2014-07-01 Thread David Turner
Make test-dump-cache-tree more useful for testing. Do not treat known invalid trees as errors (and do not produce non-zero exit code), because we can fall back to the non-cache-tree codepath. Signed-off-by: David Turner dtur...@twitter.com --- t/t0090-cache-tree.sh | 28

[PATCH/RFC] Add --force-seen option to git-fast-export

2014-07-01 Thread Roger Gammans
I've been playing with git-stitch-repo and similar tools all of which seem to use the fast export to get their input data with. I have need to provide these tools with a hints file so they can be given the extra metadata about parents - to do this they need to be able to decode marks-commit id's

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

2014-07-01 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: When git checkout checks out a branch, create or update the cache-tree so that subsequent operations are faster. Signed-off-by: David Turner dtur...@twitter.com --- builtin/checkout.c| 8 cache-tree.c | 5 +++--

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

2014-07-01 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: On Tue, 2014-07-01 at 06:16 +0200, Torsten Bögershausen wrote: diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 6c33e28..7c60675 100755 --- a/t/t0090-cache-tree.sh +++ b/t/t0090-cache-tree.sh @@ -85,9 +85,22 @@

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

2014-07-01 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: When git checkout checks out a branch, create or update the cache-tree so that subsequent operations are faster. Signed-off-by: David Turner dtur...@twitter.com --- Could you number your patches e.g. [PATCH v4 1/3] and/or summarize below the

[PATCH v3 02/14] submodules: Add the lib-submodule-update.sh test library

2014-07-01 Thread Jens Lehmann
Add this test library to simplify covering all combinations of submodule update scenarios without having to add those to a test of each work tree manipulating command over and over again. The functions test_submodule_switch() and test_submodule_forced_switch() are intended to be called from a

Re: [PATCH 2/3] test-dump-cache-tree: Improve output format and exit code

2014-07-01 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: Make test-dump-cache-tree more useful for testing. Do not treat known invalid trees as errors (and do not produce non-zero exit code), because we can fall back to the non-cache-tree codepath. Under-explained. more useful is subjective so I won't

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

2014-07-01 Thread David Turner
On Tue, 2014-07-01 at 14:03 -0700, Junio C Hamano wrote: David Turner dtur...@twopensource.com writes: On Tue, 2014-07-01 at 06:16 +0200, Torsten Bögershausen wrote: diff --git a/t/t0090-cache-tree.sh b/t/t0090-cache-tree.sh index 6c33e28..7c60675 100755 --- a/t/t0090-cache-tree.sh

Re: [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit

2014-07-01 Thread Junio C Hamano
David Turner dtur...@twopensource.com writes: During the commit process, the cache-tree is updated. We need to 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. Also demonstrate that

[PATCH v7 00/16] add performance tracing facility

2014-07-01 Thread Karsten Blees
...slowly turning into a full-fledged trace overhaul... When working on the documentation, I discovered GIT_TRACE_PACK_ACCESS, which uses a completely separate trace implementation that is 3 times faster by keeping the file open...so this round includes a performance patch that brings the trace

[PATCH v7 02/16] trace: consistently name the format parameter

2014-07-01 Thread Karsten Blees
The format parameter to trace_printf functions is sometimes abbreviated 'fmt'. Rename to 'format' everywhere (consistent with POSIX' printf specification). Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Junio C Hamano gits...@pobox.com --- trace.c | 22 +++--- trace.h

[PATCH v7 01/16] trace: move trace declarations from cache.h to new trace.h

2014-07-01 Thread Karsten Blees
Also include direct dependencies (strbuf.h and git-compat-util.h for __attribute__) so that trace.h can be used independently of cache.h, e.g. in test programs. Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Junio C Hamano gits...@pobox.com --- cache.h | 13 ++--- trace.h | 17

[PATCH v7 03/16] trace: remove redundant printf format attribute

2014-07-01 Thread Karsten Blees
trace_printf_key() is the only non-static function that duplicates the printf format attribute in the .c file, remove it for consistency. Signed-off-by: Karsten Blees bl...@dcon.de Signed-off-by: Junio C Hamano gits...@pobox.com --- trace.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v7 04/16] trace: improve trace performance

2014-07-01 Thread Karsten Blees
The trace API currently rechecks the environment variable and reopens the trace file on every API call. This has the ugly side effect that errors (e.g. file cannot be opened, or the user specified a relative path) are also reported on every call. Performance can be improved by about factor three

Re: [PATCH 3/3] cache-tree: Write index with updated cache-tree after commit

2014-07-01 Thread David Turner
On Tue, 2014-07-01 at 15:45 -0700, Junio C Hamano wrote: I didn't notice it when I gave the previous review comment but while reviewing this round, we already do the cache-tree population for commit -a in this function, which suggests me that it is the right place to do these changes. Modulo

[PATCH v7 05/16] Documentation/git.txt: improve documentation of 'GIT_TRACE*' variables

2014-07-01 Thread Karsten Blees
Separate GIT_TRACE description into what it prints and how to configure where trace output is printed to. Change other GIT_TRACE_* descriptions to refer to GIT_TRACE. Add descriptions for GIT_TRACE_SETUP and GIT_TRACE_SHALLOW. Signed-off-by: Karsten Blees bl...@dcon.de --- Documentation/git.txt

[PATCH v7 06/16] sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API

2014-07-01 Thread Karsten Blees
This changes GIT_TRACE_PACK_ACCESS functionality as follows: * supports the same options as GIT_TRACE (e.g. printing to stderr) * no longer supports relative paths * appends to the trace file rather than overwriting Signed-off-by: Karsten Blees bl...@dcon.de --- Documentation/git.txt | 4

[PATCH v7 07/16] trace: add infrastructure to augment trace output with additional info

2014-07-01 Thread Karsten Blees
To be able to add a common prefix or suffix to all trace output (e.g. a timestamp or file:line of the caller), factor out common setup and cleanup tasks of the trace* functions. When adding a common prefix, it makes sense that the output of each trace call starts on a new line. Add '\n' in case

[PATCH v7 08/16] trace: disable additional trace output for unit tests

2014-07-01 Thread Karsten Blees
Some unit-tests use trace output to verify internal state, and unstable output such as timestamps and line numbers are not useful there. Disable additional trace output if GIT_TRACE_BARE is set. Signed-off-by: Karsten Blees bl...@dcon.de --- t/test-lib.sh | 4 trace.c | 6 ++ 2

[PATCH v7 09/16] trace: add current timestamp to all trace output

2014-07-01 Thread Karsten Blees
This is useful to tell apart trace output of separate test runs. It can also be used for basic, coarse-grained performance analysis. Note that the accuracy is tainted by writing to the trace file, and you have to calculate the deltas yourself (which is next to impossible if multiple threads or

[PATCH v7 11/16] trace: add 'file:line' to all trace output

2014-07-01 Thread Karsten Blees
This is useful to see where trace output came from. Add 'const char *file, int line' parameters to the printing functions and rename them to *_fl. Add trace_printf* and trace_strbuf macros resolving to the *_fl functions and let the preprocessor fill in __FILE__ and __LINE__. As the

[PATCH v7 10/16] trace: move code around, in preparation to file:line output

2014-07-01 Thread Karsten Blees
No functional changes, just move stuff around so that the next patch isn't that ugly... Signed-off-by: Karsten Blees bl...@dcon.de --- trace.c | 36 ++-- trace.h | 12 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/trace.c b/trace.c

[PATCH v7 12/16] trace: add high resolution timer function to debug performance issues

2014-07-01 Thread Karsten Blees
Add a getnanotime() function that returns nanoseconds since 01/01/1970 as unsigned 64-bit integer (i.e. overflows in july 2554). This is easier to work with than e.g. struct timeval or struct timespec. Basing the timer on the epoch allows using the results with other time-related APIs. To

[PATCH v7 13/16] trace: add trace_performance facility to debug performance issues

2014-07-01 Thread Karsten Blees
Add trace_performance and trace_performance_since macros that print a duration and an optional printf-formatted text to the file specified in environment variable GIT_TRACE_PERFORMANCE. These macros, in conjunction with getnanotime(), are intended to simplify performance measurements from within

[PATCH v7 14/16] git: add performance tracing for git's main() function to debug scripts

2014-07-01 Thread Karsten Blees
Use trace_performance to measure and print execution time and command line arguments of the entire main() function. In constrast to the shell's 'time' utility, which measures total time of the parent process, this logs all involved git commands recursively. This is particularly useful to debug

[PATCH v7 15/16] wt-status: simplify performance measurement by using getnanotime()

2014-07-01 Thread Karsten Blees
Calculating duration from a single uint64_t is simpler than from a struct timeval. Change performance measurement for 'advice.statusuoption' from gettimeofday() to getnanotime(). Also initialize t_begin to prevent uninitialized variable warning. Signed-off-by: Karsten Blees bl...@dcon.de ---

[PATCH v7 16/16] progress: simplify performance measurement by using getnanotime()

2014-07-01 Thread Karsten Blees
Calculating duration from a single uint64_t is simpler than from a struct timeval. Change throughput measurement from gettimeofday() to getnanotime(). Also calculate misec only if needed, and change integer division to integer multiplication + shift, which should be slightly faster.

Re: [PATCH v2 2/2] git-merge-file: do not add LF at EOF while applying unrelated change

2014-07-01 Thread Max Kirillov
On Mon, Jun 30, 2014 at 04:55:10PM +0200, Johannes Schindelin wrote: I just wish the tests were a little easier to understand... What could be improved with them? Having said that, here is my ACK for the current revision of the patch series Thanks. By the way, for \r\n eol it did even