Re: [Bug] data loss with cyclic alternates

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 06:01:46PM +, Keller, Jacob E wrote: > > Yeah, don't do that. A thinks "eh, the other guy must have it" and > > B thinks the same. In general, do not prune or gc a repository > > other repositories borrow from, even if there is no cycle, because > > the borrowee does

Re: Error running 'git status' with Git version of current 'next' branch

2014-07-11 Thread Jeff King
On Wed, Jul 09, 2014 at 09:10:49AM +0200, Ralf Thielow wrote: > I'm getting the following error when calling 'git status' on one of > my projects. > > git: dir.c:739: last_exclude_matching_from_list: Assertion `x->baselen > == 0 || x->base[x->baselen - 1] == '/'' failed. > Aborted (core dumped) >

Re: 745224e0 gcc-4.9 emmintrin.h build error

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 12:12:55AM +0200, Tuncer Ayaz wrote: > Sorry, didn't test properly when I tried with/without config.mak, and > PROFILE=BUILD was the problem. I had that in config.mak based on > information gathered from INSTALL and Makefile. To be clear, is > PROFILE=BUILD (still) supporte

Re: [PATCH] http-push.c: make CURLOPT_IOCTLDATA a usable pointer

2014-07-11 Thread Jeff King
On Sat, Jul 05, 2014 at 08:43:48PM -0400, Abbaad Haider wrote: > Fixes a small bug affecting push to remotes which use some sort of > multi-pass authentication. In particular the bug affected SabreDAV as > configured by Box.com [1]. Thanks. This looks like it was caused by the refactor in ebaaf31

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

2014-07-11 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 v8 4/4] cache-tree: Write updated cache-tree after commit

2014-07-11 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 v8 1/4] cache-tree: Create/update cache-tree on checkout

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

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

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

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-11 Thread Duy Nguyen
On Sat, Jul 12, 2014 at 6:43 AM, Karsten Blees wrote: > Am 12.07.2014 00:29, schrieb Junio C Hamano: >> Karsten Blees writes: >> >>> Anyways, I'd like to kindly withdraw this patch in favor of Duy's version. >>> >>> http://article.gmane.org/gmane.comp.version-control.git/248310 >> >> Thanks; I've

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 02:54:25PM -0700, Junio C Hamano wrote: > > Yeah, we're quite inconsistent there. In some cases we silently ignore > > something unknown (e.g., a color.diff.* slot that we do not understand), > > but in most cases if it is a config key we understand but a value we do > > no

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 03:55:45PM -0700, Jacob Keller wrote: > From: Jeff King > > Make the parsing of the --sort parameter more readable by having > skip_prefix keep our pointer up to date. > > Signed-off-by: Jeff King > Signed-off-by: Jacob Keller > --- > Fixed issue with patch in that we

[PATCH v8 17/17] api-trace.txt: add trace API documentation

2014-07-11 Thread Karsten Blees
Signed-off-by: Karsten Blees --- Documentation/technical/api-trace.txt | 97 +++ 1 file changed, 97 insertions(+) create mode 100644 Documentation/technical/api-trace.txt diff --git a/Documentation/technical/api-trace.txt b/Documentation/technical/api-trace.txt

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

2014-07-11 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. Signed-off-by

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

2014-07-11 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 Signed-off-by: Junio

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

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

[PATCH v8 13/17] trace: add trace_performance facility to debug performance issues

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

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

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

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

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

[PATCH v8 11/17] trace: add 'file:line' to all trace output

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

[PATCH v8 08/17] trace: disable additional trace output for unit tests

2014-07-11 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 Signed-off-by: Junio C Hamano --- t/test-lib.sh | 4 trace.c

[PATCH v8 09/17] trace: add current timestamp to all trace output

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

[PATCH v8 06/17] sha1_file: change GIT_TRACE_PACK_ACCESS logging to use trace API

2014-07-11 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 Signed-off-by: Junio C Hamano --- Documentation

[PATCH v8 07/17] trace: add infrastructure to augment trace output with additional info

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

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

2014-07-11 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 Signed-off-by: Junio C Hamano --- Docu

[PATCH v8 04/17] trace: improve trace performance

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

[PATCH v8 03/17] trace: remove redundant printf format attribute

2014-07-11 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 Signed-off-by: Junio C Hamano --- trace.c | 1 - 1 file changed, 1 deletion(-) diff --git a/trace.c b/trace.c index 37a7fa9..3e

[PATCH v8 02/17] trace: consistently name the format parameter

2014-07-11 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 Signed-off-by: Junio C Hamano --- trace.c | 22 +++--- trace.h | 2 +- 2 files changed, 12 in

[PATCH v8 01/17] trace: move trace declarations from cache.h to new trace.h

2014-07-11 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 Signed-off-by: Junio C Hamano --- cache.h | 13 ++--- trace.h | 17 + 2 files cha

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

2014-07-11 Thread Eric Sunshine
On Fri, Jul 11, 2014 at 7:22 PM, David Turner wrote: > 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 cac

[PATCH v8 00/17] add performance tracing facility

2014-07-11 Thread Karsten Blees
Changes since v7: [04]: Fixed -Wextra compiler warnings, thanks to Ramsay Jones. [11]: Added #ifndef TRACE_CONTEXT, explained why __FILE__ ":" __FUNCTION__ doesn't work. [17]: New Documentation/technical/api-trace.txt Karsten Blees (17): trace: move trace declarations from cache.h to new

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-11 Thread Karsten Blees
Am 12.07.2014 00:29, schrieb Junio C Hamano: > Karsten Blees writes: > >> Anyways, I'd like to kindly withdraw this patch in favor of Duy's version. >> >> http://article.gmane.org/gmane.comp.version-control.git/248310 > > Thanks; I've already reverted it from 'next'. > > Is Duy's patch still vi

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

2014-07-11 Thread David Turner
On Fri, 2014-07-11 at 08:52 -0700, Junio C Hamano wrote: > David Turner writes: > > > @@ -16,8 +16,34 @@ cmp_cache_tree () { > > # We don't bother with actually checking the SHA1: > > # test-dump-cache-tree already verifies that all existing data is > > # correct. > > Is this statement now st

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

2014-07-11 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 v7 4/4] cache-tree: Write updated cache-tree after commit

2014-07-11 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 v7 2/4] test-dump-cache-tree: invalid trees are not errors

2014-07-11 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 v7 1/4] cache-tree: Create/update cache-tree on checkout

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

[PATCH] fixup! symlinks: remove PATH_MAX limitation

2014-07-11 Thread Karsten Blees
Rename cache_def_free to cache_def_clear as it doesn't free the struct cache_def, but just clears its content. Signed-off-by: Karsten Blees --- cache.h | 2 +- preload-index.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 44aa439..378ee7f

[PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Jeff King Signed-off-by: Jacob Keller --- Made parse_sort_string take a "var" parameter, and if given will only warn about invalid parameter,

[PATCH 2/3] tag: fix --sort tests to use cat<<-\EOF format

2014-07-11 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

[PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jacob Keller
From: Jeff King Make the parsing of the --sort parameter more readable by having skip_prefix keep our pointer up to date. Signed-off-by: Jeff King Signed-off-by: Jacob Keller --- Fixed issue with patch in that we dropped the reset to STRCMP_SORT, discovered by Junio. builtin/tag.c | 14 +

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 15:44 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > From: Jeff King > > > > Make the parsing of the --sort parameter more readable by having > > skip_prefix keep our pointer up to date. > > > > Signed-off-by: Jeff King > > Signed-off-by: Jacob Keller > > --- >

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

2014-07-11 Thread David Turner
On Fri, 2014-07-11 at 08:40 -0700, Junio C Hamano wrote: > Junio C Hamano writes: > > >>> + sed -n -e "s/[0-9]* subtrees//" -e '/#(ref)/d' -e '/^invalid /p' > >>> >actual && > > > > Is the second one to remove "#(ref)", which appears for a good > > "reference" cache tree entry shown for co

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

2014-07-11 Thread David Turner
On Fri, 2014-07-11 at 08:27 -0700, Junio C Hamano wrote: > Eric Sunshine writes: > > > On Thu, Jul 10, 2014 at 8:31 PM, David Turner > > wrote: > >> Add tests to confirm that invalidation of subdirectories neither over- > >> nor under-invalidates. > >> > >> Signed-off-by: David Turner > >> ---

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Junio C Hamano
Jacob Keller writes: > From: Jeff King > > Make the parsing of the --sort parameter more readable by having > skip_prefix keep our pointer up to date. > > Signed-off-by: Jeff King > Signed-off-by: Jacob Keller > --- > builtin/tag.c | 14 -- > 1 file changed, 4 insertions(+), 10 de

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 15:17 -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Jul 11, 2014 at 01:51:35PM -0700, Jacob Keller wrote: > > > >> + if (!strcmp(var, "tag.sort")) { > >> + if (!value) > >> + return config_error_nonbool(var); > >> + status

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-11 Thread Junio C Hamano
Karsten Blees writes: > Anyways, I'd like to kindly withdraw this patch in favor of Duy's version. > > http://article.gmane.org/gmane.comp.version-control.git/248310 Thanks; I've already reverted it from 'next'. Is Duy's patch still viable? -- To unsubscribe from this list: send the line "unsub

Re: [PATCH v3] http: Add Accept-Language header if possible

2014-07-11 Thread Eric Sunshine
On Fri, Jul 11, 2014 at 1:35 PM, Jeff King wrote: > On Sat, Jul 12, 2014 at 01:52:53AM +0900, Yi EungJun wrote: >> Add an Accept-Language header which indicates the user's preferred >> languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. >> >> Examples: >> LANGUAGE= -> "" >> LANGUA

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

2014-07-11 Thread Junio C Hamano
Karsten Blees writes: >> In other words, why isn't hashmap_get() more like this: >> ... >> with hashmap_entry_init() purely a static helper in hashmap.c? >> > 1. Performance OK. > 2. Simplicity > > Hashmap clients will typically provide small, type safe wrappers around the > hashmap API. OK.

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

2014-07-11 Thread Junio C Hamano
Karsten Blees writes: > Am 07.07.2014 20:30, schrieb Junio C Hamano: >> Karsten Blees writes: >> >> The above cache_def_free(cache) does not free the cache itself, but >> only its associated data, so the name cache_def_free() is somewhat >> misleading. >> > > You already merged this to master

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 11, 2014 at 01:51:35PM -0700, Jacob Keller wrote: > >> +if (!strcmp(var, "tag.sort")) { >> +if (!value) >> +return config_error_nonbool(var); >> +status = parse_sort_string(value, &tag_sort); >> +if (statu

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 14:54 -0700, Junio C Hamano wrote: > Jeff King writes: > > > On Fri, Jul 11, 2014 at 10:24:07AM -0700, Jacob Keller wrote: > > > >> Updated to include changes due to Junio's feedback. This has not resolved > >> whether we should fail on a configuration error or simply warn.

git-fast-import bug?

2014-07-11 Thread Duane Murphy
git-fast-import is not writing a commit even after a checkpoint/progress command. See my previous message "git p4 diff-tree ambiguous argument error". The error in git-p4 is caused by git not writing the commit even after git-fast-import has been given a checkpoint and progress command. On in

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 11, 2014 at 10:24:07AM -0700, Jacob Keller wrote: > >> Updated to include changes due to Junio's feedback. This has not resolved >> whether we should fail on a configuration error or simply warn. It appears >> that >> we actually seem to error out more than warn,

[PATCH 3/3 v7] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Jeff King Signed-off-by: Jacob Keller --- Updated warning texts based on Jeff's feedback. Also added translate specifier to the warning string

[PATCH 2/3] tag: fix --sort tests to use cat<<-\EOF format

2014-07-11 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

[PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jacob Keller
From: Jeff King Make the parsing of the --sort parameter more readable by having skip_prefix keep our pointer up to date. Signed-off-by: Jeff King Signed-off-by: Jacob Keller --- builtin/tag.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/builtin/tag.c b/

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 17:06 -0400, Jeff King wrote: > On Fri, Jul 11, 2014 at 01:51:35PM -0700, Jacob Keller wrote: > > > + if (!strcmp(var, "tag.sort")) { > > + if (!value) > > + return config_error_nonbool(var); > > + status = parse_sort_string(value, &tag

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 01:51:35PM -0700, Jacob Keller wrote: > + if (!strcmp(var, "tag.sort")) { > + if (!value) > + return config_error_nonbool(var); > + status = parse_sort_string(value, &tag_sort); > + if (status) { > +

Re: [PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 13:51 -0700, Jacob Keller wrote: > Add support for configuring default sort ordering for git tags. Command > line option will override this configured value, using the exact same > syntax. > > Cc: Jeff King > Signed-off-by: Jacob Keller > --- > Updated based on Junio's sugg

[PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jacob Keller
From: Jeff King Make the parsing of the --sort parameter more readable by having skip_prefix keep our pointer up to date. Signed-off-by: Jeff King Signed-off-by: Jacob Keller --- Fixed authorship. I don't expect this version to be taken, but it helps me in review, and I figured it is good to s

[PATCH 3/3] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Jeff King Signed-off-by: Jacob Keller --- Updated based on Junio's suggestions, as well as making sure that we don't bail if we can't understa

[PATCH 2/3] tag: fix --sort tests to use cat<<-\EOF format

2014-07-11 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 11:29 -0700, Junio C Hamano wrote: > "Keller, Jacob E" writes: > > > This is not how the rest of the current tests work. I will submit a > > patch which fixes up the current --sort tests (but not every test, for > > now) as well. > > I do not want to pile more work that is

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 14:22 -0400, Jeff King wrote: > On Fri, Jul 11, 2014 at 06:11:08PM +, Keller, Jacob E wrote: > > > I personally prefer error out on options, even though it can make it a > > bit more difficult, though as far as I know unknown fields simply warn > > or are ignored. (ie: ol

Re: Topic sk/mingw-unicode-spawn-args breaks tests

2014-07-11 Thread Karsten Blees
Am 10.07.2014 22:05, schrieb Johannes Sixt: > It looks like I totally missed the topic sk/mingw-unicode-spawn-args. > Now it's in master, and it breaks lots of test cases for me: > > t0050-filesystem > t0110-urlmatch-normalization > t4014-format-patch > t4041-diff-submodule-option > t4120-apply-po

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-11 Thread Karsten Blees
Am 09.07.2014 18:33, schrieb Junio C Hamano: > Karsten Blees writes: > >> 'git status' segfaults if a directory is longer than PATH_MAX, because >> processing .gitignore files in prep_exclude() writes past the end of a >> PATH_MAX-bounded buffer. >> >> Remove the limitation by using strbuf instea

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

2014-07-11 Thread Karsten Blees
Am 07.07.2014 20:30, schrieb Junio C Hamano: > Karsten Blees writes: > > The above cache_def_free(cache) does not free the cache itself, but > only its associated data, so the name cache_def_free() is somewhat > misleading. > You already merged this to master ("kb/path-max-must-go" lol), should

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

2014-07-11 Thread Karsten Blees
Am 07.07.2014 19:43, schrieb 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 >

Re: [PATCH 2/2] dir: remove PATH_MAX limitation

2014-07-11 Thread Karsten Blees
Am 05.07.2014 12:48, schrieb Duy Nguyen: > On Sat, Jul 5, 2014 at 5:42 AM, Karsten Blees wrote: >> 'git status' segfaults if a directory is longer than PATH_MAX, because >> processing .gitignore files in prep_exclude() writes past the end of a >> PATH_MAX-bounded buffer. >> >> Remove the limitatio

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Junio C Hamano
Jeff King writes: > On Fri, Jul 11, 2014 at 10:24:05AM -0700, Jacob Keller wrote: > >> Make the parsing of the --sort parameter more readable by having >> skip_prefix keep our pointer up to date. >> >> Authored-by: Jeff King > > I suspect Junio may just apply this on the version of the commit h

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Junio C Hamano
"Keller, Jacob E" writes: > This is not how the rest of the current tests work. I will submit a > patch which fixes up the current --sort tests (but not every test, for > now) as well. I do not want to pile more work that is unrelated to the task at hand on your plate, i.e. clean-up work, so I w

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

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 11:25:43AM -0700, Junio C Hamano wrote: > Christian Couder writes: > > > On Fri, Jul 11, 2014 at 4:22 PM, Junio C Hamano wrote: > >> Christian Couder writes: > >> > >>> On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano wrote: > >>> > > "Making sure A's parent is B" w

Re: pitfall with empty commits during git rebase

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 12:15:47PM +0200, Olaf Hering wrote: > Could not apply 6c5842320acc797d395afb5cdf373c2bfaebfa34... revert > > > Its not clear what '--allow-empty' refers to, git rebase does not seem to > understand this option. I think this is the same problem discussed recently in:

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

2014-07-11 Thread Junio C Hamano
Christian Couder writes: > On Fri, Jul 11, 2014 at 4:22 PM, Junio C Hamano wrote: >> Christian Couder writes: >> >>> On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano wrote: >>> > "Making sure A's parent is B" would be an > idempotent operation, no? Why not just make sure A's parent is

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 06:11:08PM +, Keller, Jacob E wrote: > I personally prefer error out on options, even though it can make it a > bit more difficult, though as far as I know unknown fields simply warn > or are ignored. (ie: old versions of git just ignore unknown fields in > configuratio

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

2014-07-11 Thread Junio C Hamano
Tanay Abhra writes: > diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh > new file mode 100755 > index 000..87a29f1 > --- /dev/null > +++ b/t/t1308-config-set.sh > @@ -0,0 +1,170 @@ > +#!/bin/sh > + > +test_description='Test git config-set API in different settings' > + > +. ./test-l

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 13:46 -0400, Jeff King wrote: > On Fri, Jul 11, 2014 at 10:24:07AM -0700, Jacob Keller wrote: > > > Updated to include changes due to Junio's feedback. This has not resolved > > whether we should fail on a configuration error or simply warn. It appears > > that > > we actual

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 13:50 -0400, Jeff King wrote: > On Fri, Jul 11, 2014 at 10:24:05AM -0700, Jacob Keller wrote: > > > Make the parsing of the --sort parameter more readable by having > > skip_prefix keep our pointer up to date. > > > > Authored-by: Jeff King > > I suspect Junio may just app

Re: [Bug] data loss with cyclic alternates

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 09:01 -0700, Junio C Hamano wrote: > Ephrim Khong writes: > > > git seems to have issues with alternates when cycles are present (repo > > A has B/objects as alternates, B has A/objects as alternates). > > Yeah, don't do that. A thinks "eh, the other guy must have it" and

Re: pitfall with empty commits during git rebase

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 12:15 +0200, Olaf Hering wrote: > There is an incorrect message when doing "git rebase -i remote/branch". > I have it only in german, see below. what happend is: > > #01 make changes on another host > #02 copy patchfile to localhost > #03 apply patchfile > #04 git commit -avs

Re: [PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 10:24:05AM -0700, Jacob Keller wrote: > Make the parsing of the --sort parameter more readable by having > skip_prefix keep our pointer up to date. > > Authored-by: Jeff King I suspect Junio may just apply this on the version of the commit he has upstream, so you may not

Re: [PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 10:24:07AM -0700, Jacob Keller wrote: > Updated to include changes due to Junio's feedback. This has not resolved > whether we should fail on a configuration error or simply warn. It appears > that > we actually seem to error out more than warn, so I am unsure what the cor

Re: git p4 diff-tree ambiguous argument error

2014-07-11 Thread Bill Door
More data points. I have reproduced the problem on $ git --version git version 1.8.5.2 (Apple Git-48) $ python --version Python 2.7.5 $ uname -a Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 However, it the command is used on a new empty

Re: [PATCH v3] http: Add Accept-Language header if possible

2014-07-11 Thread Jeff King
On Sat, Jul 12, 2014 at 01:52:53AM +0900, Yi EungJun wrote: > Add an Accept-Language header which indicates the user's preferred > languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. > > Examples: > LANGUAGE= -> "" > LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1" >

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

2014-07-11 Thread Junio C Hamano
Tanay Abhra writes: > diff --git a/config.c b/config.c > index ba882a1..aa58275 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-list.h" > > struct config_source { >

[PATCH 1/3] tag: use skip_prefix instead of magic numbers

2014-07-11 Thread Jacob Keller
Make the parsing of the --sort parameter more readable by having skip_prefix keep our pointer up to date. Authored-by: Jeff King Signed-off-by: Jacob Keller --- builtin/tag.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/builtin/tag.c b/builtin/tag.c index

[PATCH 2/3] tag: fix --sort tests to use cat<<-\EOF format

2014-07-11 Thread Jacob Keller
The --sort tests should use the better format for >expect to maintain indenting and ensure that no substitution is occurring. This makes parsing and understanding the tests a bit easier. Signed-off-by: Jacob Keller --- t/t7004-tag.sh | 40 1 file changed,

[PATCH 3/3 v5] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Jacob Keller
Add support for configuring default sort ordering for git tags. Command line option will override this configured value, using the exact same syntax. Cc: Jeff King Signed-off-by: Jacob Keller --- Updated to include changes due to Junio's feedback. This has not resolved whether we should fail on

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 08:04 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > + > > + if (strcmp(arg, "refname")) > > + die(_("unsupported sort specification %s"), arg); > > Hmm. I _thought_ we try to catch unsupported option value coming > from the command line and die but

Re: [PATCH 4/7] add object_as_type helper for casting objects

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 11:45:58AM +0100, Ramsay Jones wrote: > > @@ -1729,9 +1729,8 @@ static enum peel_status peel_object(const unsigned > > char *name, unsigned char *sh > > > > if (o->type == OBJ_NONE) { > > int type = sha1_object_info(name, NULL); > > - if (type <

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

2014-07-11 Thread Matthieu Moy
Tanay Abhra writes: > I had seen that there were checks for Syntax error or Non-existant files in > t1300-repo-config, for example, The code raising the syntax error is there, and tested. But the way the error code (eg. return -1 from git_config) is handled by your code is not. -- Matthieu Moy

[PATCH v3] http: Add Accept-Language header if possible

2014-07-11 Thread Yi EungJun
Add an Accept-Language header which indicates the user's preferred languages defined by $LANGUAGE, $LC_ALL, $LC_MESSAGES and $LANG. Examples: LANGUAGE= -> "" LANGUAGE=ko:en -> "Accept-Language: ko, en; q=0.9, *; q=0.1" LANGUAGE=ko LANG=en_US.UTF-8 -> "Accept-Language: ko, *; q=0.1" LANGUAG

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 08:04 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > Add support for configuring default sort ordering for git tags. Command > > line option will override this configured value, using the exact same > > syntax. > > > > Cc: Jeff King > > Signed-off-by: Jacob Kelle

Re: [PATCH] http: Add Accept-Language header if possible

2014-07-11 Thread Yi, EungJun
2014-07-12 1:24 GMT+09:00 Eric Sunshine : > On Fri, Jul 11, 2014 at 5:22 AM, Yi, EungJun wrote: >> 2014-07-09 6:52 GMT+09:00 Eric Sunshine : + grep "^Accept-Language: ko; q=1.000, en; q=0.999, \*; q=0.001" actual >>> >>> Do you want to \-escape the periods? (Or maybe use 'grep -F'

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

2014-07-11 Thread Tanay Abhra
On 7/11/2014 7:51 PM, Matthieu Moy wrote: > Hi, > > I had a closer look at error management (once more, sorry: I should have > done this earlier...), and it seems to me that: > > * Not all errors are managed properly > > * Most error cases are untested > > Among the cases I can think of: > >

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Junio C Hamano
"Keller, Jacob E" writes: > On Fri, 2014-07-11 at 08:04 -0700, Junio C Hamano wrote: > ... >> > +static int tag_sort = 0; >> >> Please do not initialize variables in bss segment to 0 by hand. >> >> If this variable is meant to take one of these *CMP_SORT values >> defined as macro later in this

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

2014-07-11 Thread Christian Couder
On Fri, Jul 11, 2014 at 4:22 PM, Junio C Hamano wrote: > Christian Couder writes: > >> On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano wrote: >> "Making sure A's parent is B" would be an idempotent operation, no? Why not just make sure A's parent is already B and report "Your wis

Re: [PATCH 2/2 v4] tag: support configuring --sort via .gitconfig

2014-07-11 Thread Keller, Jacob E
On Fri, 2014-07-11 at 08:04 -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > Add support for configuring default sort ordering for git tags. Command > > line option will override this configured value, using the exact same > > syntax. > > > > Cc: Jeff King > > Signed-off-by: Jacob Kelle

Re: [Bug] data loss with cyclic alternates

2014-07-11 Thread Junio C Hamano
Ephrim Khong writes: > git seems to have issues with alternates when cycles are present (repo > A has B/objects as alternates, B has A/objects as alternates). Yeah, don't do that. A thinks "eh, the other guy must have it" and B thinks the same. In general, do not prune or gc a repository other

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

2014-07-11 Thread Junio C Hamano
David Turner writes: > @@ -16,8 +16,34 @@ cmp_cache_tree () { > # We don't bother with actually checking the SHA1: > # test-dump-cache-tree already verifies that all existing data is > # correct. Is this statement now stale and needs to be removed? > -test_shallow_cache_tree () { > - pri

  1   2   >