Re: [PATCH v6 00/32] Support multiple checkouts

2014-07-11 Thread Dennis Kaarsemaker
Tested-by: Dennis Kaarsemaker I've been using this branch for a little while now and have no breakages to report. Max Kirillov reported some bugs in the interaction with submodules which I plan to chase when I have some time unless someone beats me to it :) On wo, 2014-07-09 at 14:32 +0700, Nguy

Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-11 Thread Jeff King
On Fri, Jul 11, 2014 at 01:59:53AM +0100, Ramsay Jones wrote: > > The code you're touching here was trying to make sure that each commit > > gets a unique index, under the assumption that commits only get > > allocated via alloc_commit_node. But I think that assumption is wrong. > > We can also ge

[PATCH 0/7] ensure index is set for all OBJ_COMMIT objects variable

2014-07-11 Thread Jeff King
Here's a series to address the bug I mentioned earlier by catching the conversion of OBJ_NONE to OBJ_COMMIT in a central location and setting the index there. I've included your patch 1/2 unchanged in the beginning, as I build on top of it (and your patch 2/2 is no longer applicable). The rest is

[PATCH 1/7] alloc.c: remove the alloc_raw_commit_node() function

2014-07-11 Thread Jeff King
From: Ramsay Jones In order to encapsulate the setting of the unique commit index, commit 969eba63 ("commit: push commit_index update into alloc_commit_node", 10-06-2014) introduced a (logically private) intermediary allocator function. However, this function (alloc_raw_commit_node()) was declare

[PATCH 3/7] parse_object_buffer: do not set object type

2014-07-11 Thread Jeff King
The only way that "obj" can be non-NULL is if it came from one of the lookup_* functions. These functions always ensure that the object has the expected type (and return NULL otherwise), so there is no need for us to set the type. Signed-off-by: Jeff King --- object.c | 2 -- 1 file changed, 2 d

[PATCH 2/7] move setting of object->type to alloc_* functions

2014-07-11 Thread Jeff King
The "struct object" type implements basic object polymorphism. Individual instances are allocated as concrete types (or as a union type that can store any object), and a "struct object *" can be cast into its real type after examining its "type" enum. This means it is dangerous to have a type fie

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

2014-07-11 Thread Jeff King
When we call lookup_commit, lookup_tree, etc, the logic goes something like: 1. Look for an existing object struct. If we don't have one, allocate and return a new one. 2. Double check that any object we have is the expected type (and complain and return NULL otherwise). 3. Conve

[PATCH 5/7] alloc: factor out commit index

2014-07-11 Thread Jeff King
We keep a static counter to set the commit index on newly allocated objects. However, since we also need to set the index on any_objects which are converted to commits, let's make the counter available as a public function. While we're moving it, let's make sure the counter is allocated as an unsi

[PATCH 6/7] object_as_type: set commit index

2014-07-11 Thread Jeff King
The point of the "index" field of struct commit is that every allocated commit would have a uniquely allocated value. It is supposed to be an invariant that whenever object->type is set to OBJ_COMMIT, we have a unique index. Commit 969eba6 (commit: push commit_index update into alloc_commit_node,

[PATCH 7/7] diff-tree: avoid lookup_unknown_object

2014-07-11 Thread Jeff King
We generally want to avoid lookup_unknown_object, because it results in allocating more memory for the object than may be strictly necessary. In this case, it is used to check whether we have an already-parsed object before calling parse_object, to save us from reading the object from disk. Using

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

2014-07-11 Thread Christian Couder
On Thu, Jul 10, 2014 at 7:36 PM, Junio C Hamano wrote: > Junio C Hamano writes: > >>> >>> As the user might expect that a new replace ref was created on success >>> (0 exit code), and as we should at least warn if we would create a >>> commit that is the same as an existing one,... >> >> Why is i

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

2014-07-11 Thread Yi, EungJun
2014-07-09 19:40 GMT+09:00 Peter Krefting : > Yi EungJun: > > >> Example: >> LANGUAGE= -> "" >> LANGUAGE=ko -> "Accept-Language: ko; q=1.000, *; q=0.001" >> LANGUAGE=ko:en -> "Accept-Language: ko; q=1.000, en; q=0.999, *; q=0.001" > > > Avoid adding "q=1.000". It is redundant (the default for an

[Bug] data loss with cyclic alternates

2014-07-11 Thread Ephrim Khong
Hi, git seems to have issues with alternates when cycles are present (repo A has B/objects as alternates, B has A/objects as alternates). In such cases, gc and repack might delete objects that are present in only one of the alternates, leading to data loss. I understand that this is no big u

Re: [PATCH v3 2/2] alloc.c: remove the redundant commit_count variable

2014-07-11 Thread Ramsay Jones
On 11/07/14 09:32, Jeff King wrote: > On Fri, Jul 11, 2014 at 01:59:53AM +0100, Ramsay Jones wrote: > >>> The code you're touching here was trying to make sure that each commit >>> gets a unique index, under the assumption that commits only get >>> allocated via alloc_commit_node. But I think that

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

2014-07-11 Thread Yi, EungJun
2014-07-11 5:10 GMT+09:00 Jeff King : > On Wed, Jul 09, 2014 at 11:46:14AM +0100, Peter Krefting wrote: > >> Jeff King: >> >> >I did some digging, and I think the public API is setlocale with a NULL >> >parameter, like: >> > >> > printf("%s\n", setlocale(LC_MESSAGES, NULL)); >> > >> >That still wil

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

2014-07-11 Thread Yi EungJun
From: 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,

pitfall with empty commits during git rebase

2014-07-11 Thread Olaf Hering
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 # create commit#1 #05 sleep 123456 #06 make different changes on a

Re: [PATCH 0/7] ensure index is set for all OBJ_COMMIT objects variable

2014-07-11 Thread Ramsay Jones
On 11/07/14 09:41, Jeff King wrote: > Here's a series to address the bug I mentioned earlier by catching the > conversion of OBJ_NONE to OBJ_COMMIT in a central location and setting > the index there. > > I've included your patch 1/2 unchanged in the beginning, as I build on > top of it (and your

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

2014-07-11 Thread Ramsay Jones
On 11/07/14 09:48, Jeff King wrote: [snip] > diff --git a/object.c b/object.c > index 472aa8d..b2319f6 100644 > --- a/object.c > +++ b/object.c > @@ -158,6 +158,23 @@ void *create_object(const unsigned char *sha1, void *o) > return obj; > } > > +void *object_as_type(struct object *obj, e

git pull crash

2014-07-11 Thread Ronald Bos
Hi all, I am running git on Windows 8.1 (with all the latest updates installed), and it consequently crashes when I run "git pull" in my cloned working copy. I attached a screen shot of the message window (it is in Dutch...) This is my git version: $ git --version git version 1.9.4.msysgit.0

Congratulations

2014-07-11 Thread Qatar Charity
wrote to: Dear Beneficiary, This is to inform you that you have been awarded the sum of (USD$1,200,000.00) as charity donations/aid from the Qatar Foundation, held on 7th of July 2014 in Qatar. Reply for more information via e-mail: qatarharit...@gmail.com Yours Sincerely, Sheikh Saad Al Muhan

Re: git pull crash

2014-07-11 Thread Torsten Bögershausen
On 2014-07-11 12.49, Ronald Bos wrote: > Hi all, > > I am running git on Windows 8.1 (with all the latest updates installed), and > it consequently crashes when I run "git pull" in my cloned working copy. > > I attached a screen shot of the message window (it is in Dutch...) > > This is my git

Re: [PATCH RFC v2 07/19] rebase -i: The replay of root commits is not shown with --verbose

2014-07-11 Thread Fabian Ruch
Hi Chris, you're the original author of the code touched by this patch. Is the second -q option really a simple copy-and-paste of the first or am I overlooking something here? I'd like to confirm this as, in retrospect, I feel a bit uncertain about the hasty claim in the log message. Kind regards

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

2014-07-11 Thread Matthieu Moy
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: * Syntax error when parsing the file * Non-existant file * Unread

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

2014-07-11 Thread Junio C Hamano
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 wish has been granted" to the user? > > ... and here you say we sho

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

2014-07-11 Thread Matthieu Moy
Tanay Abhra writes: > diff --git a/test-config.c b/test-config.c > new file mode 100644 > index 000..dc313c2 > --- /dev/null > +++ b/test-config.c > +int main(int argc, char **argv) > +{ > + int i, val; > + const char *v; > + const struct string_list *strptr; > + struct confi

[PATCH 2/2] Better tests for error cases

2014-07-11 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- Consider squashing this into PATCH 2/2 Probably not sufficient. t/t1308-config-set.sh | 22 ++ test-config.c | 8 ++-- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/t/t1308-config-set.sh b/t/t1308-config-set.sh i

[fixup PATCH 1/2] Call configset_clear

2014-07-11 Thread Matthieu Moy
Signed-off-by: Matthieu Moy --- Consider squashing this into PATCH 2/2. test-config.c | 42 +++--- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/test-config.c b/test-config.c index dc313c2..07b61ef 100644 --- a/test-config.c +++ b/test-config

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

2014-07-11 Thread Junio C Hamano
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 Keller > --- > - v4 > * base on top of suggested change by Jeff King to use s

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

2014-07-11 Thread Junio C Hamano
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 >> --- >> t/t0090-cache-tree.sh | 26 +++--- >> 1 file chang

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

2014-07-11 Thread Junio C Hamano
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 comparison, necessary? Do > they ever begin with "invalid"? If they eve

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

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

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

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

[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

[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

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

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: 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 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: [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: 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: [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: [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: [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 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 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 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: 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 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: [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 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] 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/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 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: 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 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: [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

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

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

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

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

[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

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,

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

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

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

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

  1   2   >