[PATCH 0/3] Using commit slab to replace indegree

2013-04-14 Thread Junio C Hamano
The first one is Jeff's here is what I have now technology demonstration. The second attempts to iron out one kink in it, and then the third one introduces a macro to allow other code to replicate exactly the same code structure to support their uses. Jeff King (1): commit: allow associating

[PATCH 1/3] commit: allow associating auxiliary info on-demand

2013-04-14 Thread Junio C Hamano
From: Jeff King p...@peff.net The indegree field in the commit object is only used while sorting a list of commits in topological order, and wasting memory otherwise. We would prefer to shrink the size of individual commit objects, which we may have to hold thousands of in-core. We could eject

[PATCH 2/3] commit-slab: avoid large realloc

2013-04-14 Thread Junio C Hamano
Instead of using a single slab and keep reallocating it as we find that we need to deal with commits with larger values of commit-index, make a slab an array of many slab_pieces. Each access may need two levels of indirections, but we only need to reallocate the first level array of pointers when

[PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Junio C Hamano
Introduce a header file to define a macro that can define the struct type, initializer, accessor and cleanup functions to manage a commit slab. Update the indegree topological sort facility using it. To associate 32 flag bits with each commit, you can write: define_commit_slab(flag32,

Re: [PATCH 2/2] transport-helper: update remote helper namespace

2013-04-14 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: Why wasn't this patch merged to 'pu'? To my knowledge nobody raised any real concerns. There are many reasons not to queue _everything_ ever posted to the list on 'pu', and they are almost always not a deliberate rejection. The maintainer

Re: [PATCH 1/2] transport-helper: report errors properly

2013-04-14 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: On Sat, Apr 13, 2013 at 1:00 AM, Jeff King p...@peff.net wrote: On Sat, Apr 13, 2013 at 12:42:29AM -0500, Felipe Contreras wrote: To me, the reality is obvious: my patch didn't require such a big commit message, the short version was fine,

Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-14 Thread Junio C Hamano
Thanks. I'll queue with the following API fix-up on this, with obvious adjustments necessary for the later ones. * read_blob_data_from_index() is descriptive enough. If you read a blob from the index, you would ask for it with a path; there is no other sensible key to do so. * A function

Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-14 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: diff --git a/attr.c b/attr.c index a668a63..46bde57 100644 --- a/attr.c +++ b/attr.c @@ -387,7 +387,7 @@ static struct attr_stack *read_attr_from_index(const char *path, int macro_ok) char *buf, *sp; int lineno = 0; - buf =

cvsps: bad usage: invalid argument --norc

2013-04-14 Thread Ilya Basin
Hi esr. In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. Please give the option back and write something in the man page like: This option has no effect; it is present for compatibility -- To unsubscribe from this list: send the line unsubscribe git in the body of a

Re: [RFC/PATCH] push: introduce implicit push

2013-04-14 Thread Jakub Narębski
W dniu 14.04.2013 06:42, Junio C Hamano pisze: I personally think it is much more sellable to use an even simpler rule than what Jeff suggested, to make git push -- refspec go to the remote.pushdefault (falling back to remote.default that is origin), without even paying attention

Re: cvsps: bad usage: invalid argument --norc

2013-04-14 Thread Ilya Basin
IB Hi esr. IB In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. IB Please give the option back and write something in the man page like: IB This option has no effect; it is present for compatibility Looks like the tool is completely different. I think I'll have to

Re: [PATCH 1/3] pull: prefer invoking git command over git-command

2013-04-14 Thread Philip Oakley
From: Ramkumar Ramachandra artag...@gmail.com Sent: Saturday, April 13, 2013 10:15 PM 14e5d40c (pull: Fix parsing of -Xoption, 2010-01-17) added the lines containing git-push and git-merge, even though the prevelant style s /git-push/git rebase/The fix is to a git-rebase not git-push

Re: cvsps: bad usage: invalid argument --norc

2013-04-14 Thread John Keeping
On Sun, Apr 14, 2013 at 12:48:00PM +0400, Ilya Basin wrote: IB Hi esr. IB In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. IB Please give the option back and write something in the man page like: IB This option has no effect; it is present for compatibility Looks

Re: git instaweb - share all project files

2013-04-14 Thread Jakub Narębski
W dniu 10.04.2013 19:03, Jakub Narębski pisze: W dniu 07.04.2013 05:02, Trenton D. Adams pisze: On that first page that shows up, it shows the .git folder. It would be kind of nice if it shared out both the git repo and the actual current project files. I frequently have stuff I'd like to

[PATCH 0/3] Handle signed tags with 'export' remote helpers

2013-04-14 Thread John Keeping
On Sun, Apr 07, 2013 at 05:02:48PM -0700, Sverre Rabbelier wrote: On Sun, Apr 7, 2013 at 2:46 PM, Jonathan Nieder jrnie...@gmail.com wrote: The remote helper infrastructure is certainly being unhelpful here. I wonder if transport-helper should just pass --signed-tag=strip and be done with

[PATCH 1/3] fast-export: add --signed-tags=warn-strip mode

2013-04-14 Thread John Keeping
This issues a warning while stripping signatures from signed tags, which allows us to use it as default behaviour for remote helpers which cannot specify how to handle signed tags. Signed-off-by: John Keeping j...@keeping.me.uk --- Documentation/git-fast-export.txt | 10 ++

[PATCH 2/3] transport-helper: pass --signed-tags=warn-strip to fast-export

2013-04-14 Thread John Keeping
Currently, attempting to push a signed tag to a remote helper which uses fast-export results in the remote helper failing because the default fast-export action for signed tags is abort. This is not helpful for users because there is no way to pass additional arguments to fast-export here, either

[PATCH 3/3] transport-helper: add 'signed-tags' capability

2013-04-14 Thread John Keeping
This allows a remote helper using the 'export' protocol to specify that it supports signed tags, changing the handing from 'warn-strip' to 'verbatim'. Signed-off-by: John Keeping j...@keeping.me.uk --- Documentation/gitremote-helpers.txt | 4 git-remote-testgit | 1 +

State of CVS-to-git conversion tools (Was: Re: cvsps: bad usage: invalid argument --norc)

2013-04-14 Thread Eric S. Raymond
Ilya Basin basini...@gmail.com: IB Hi esr. IB In cvsps 3.10 the flag --norc was removed. It broke 'git cvsimport'. IB Please give the option back and write something in the man page like: IB This option has no effect; it is present for compatibility Looks like the tool is completely

Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
Hi, I'm just wondering why it was decided to work like this. IMHO it's quite inconvenient that git config outputs nothing for any unset (but known) variable. Usually when I query a variable I'm not so much interested in whether it is at all (explicitly) set to some value or not, but what

Getting Automatic merge failed although all conflicts were resolved using previous resolution

2013-04-14 Thread Sebastian Schuberth
Hi, I just realized Git merge still outputs Automatic merge failed; fix conflicts and then commit the result. although all of my conflicts were resolved using a previously recorded resolution. I think it's OK for Git to not just do the merge commit in that case to sort of force a review

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Andrew Ardill
On 14 April 2013 22:34, Sebastian Schuberth sschube...@gmail.com wrote: Usually when I query a variable I'm not so much interested in whether it is at all (explicitly) set to some value or not, but what value is currently in use. With your change in place, how do you know if the config item

[PATCH 00/33] Various cleanups around reference packing and peeling

2013-04-14 Thread Michael Haggerty
The highlight of this patch series are that (1) peeled references are not lost from the packed-refs file when a packed reference is deleted and (2) there is more code sharing between the code used by git packed-refs and the code used by repack_without_ref() for deleting a packed reference. Along

[PATCH 02/33] refs: document the fields of struct ref_value

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 12 1 file changed, 12 insertions(+) diff --git a/refs.c b/refs.c index 30b4bf7..1df1ccd 100644 --- a/refs.c +++ b/refs.c @@ -109,7 +109,19 @@ struct ref_entry; * (ref_entry-flag REF_DIR) is zero. */ struct

[PATCH 01/33] refs: document flags constants REF_*

2013-04-14 Thread Michael Haggerty
Document the bits that can appear in the flags parameter passed to an each_ref_function and/or in the ref_entry::flag field. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 12 +++- refs.h | 13 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git

[PATCH 08/33] peel_ref(): use function get_packed_ref()

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index de5dc7d..cf017a5 100644 --- a/refs.c +++ b/refs.c @@ -1282,10 +1282,9 @@ int peel_ref(const char *refname, unsigned char *sha1)

[PATCH 12/33] peel_object(): give more specific information in return value

2013-04-14 Thread Michael Haggerty
Instead of just returning a success/failure bit, return an enumeration value that explains the reason for any failure. This will come in handy shortly. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 32 1 file changed, 24 insertions(+), 8

[PATCH 14/33] refs: extract a function peel_entry()

2013-04-14 Thread Michael Haggerty
Peel the entry, and as a side effect store the peeled value in the entry. Use this function from two places in peel_ref(); a third caller will be added soon. Please note that this change can lead to ref_entries for unpacked refs being peeled. This has no practical benefit but is harmless.

[PATCH 15/33] refs: change the internal reference-iteration API

2013-04-14 Thread Michael Haggerty
Establish an internal API for iterating over references, which gives the callback functions direct access to the ref_entry structure describing the reference. (Do not change the iteration API that is exposed outside of the module.) Define a new internal callback signature int

[PATCH 17/33] repack_without_ref(): silence errors for dangling packed refs

2013-04-14 Thread Michael Haggerty
Stop emitting an error message for dangling packed references found when deleting another packed reference. See the previous commit for a longer explanation of the issue. Change repack_without_ref_fn() to silently ignore dangling packed references. Signed-off-by: Michael Haggerty

[PATCH 19/33] refs: change how packed refs are deleted

2013-04-14 Thread Michael Haggerty
Add a function remove_ref(), which removes a single entry from a reference cache. Use this function to reimplement repack_without_ref(). The old version iterated over all refs, packing all of them except for the one to be deleted, then discarded the entire packed reference cache. The new

[PATCH 20/33] t3211: demonstrate loss of peeled refs if a packed ref is deleted

2013-04-14 Thread Michael Haggerty
Add a test that demonstrates that the peeled values recorded in packed-refs are lost if a packed ref is deleted. (The code in repack_without_ref() doesn't even attempt to write peeled refs.) This will be fixed in a moment. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu ---

[PATCH 21/33] repack_without_ref(): write peeled refs in the rewritten file

2013-04-14 Thread Michael Haggerty
When a reference that existed in the packed-refs file is deleted, the packed-refs file must be rewritten. Previously, the file was rewritten without any peeled refs, even if the file contained peeled refs when it was read. This was not a bug, because the packed-refs file header didn't claim that

[PATCH 22/33] refs: extract a function write_packed_entry()

2013-04-14 Thread Michael Haggerty
Extract the I/O code from the business logic in repack_ref_fn(). Later there will be another caller for this function. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 40 +++- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git

[PATCH 25/33] pack_one_ref(): rename path parameter to refname

2013-04-14 Thread Michael Haggerty
Make this function conform to the naming convention established in 65385ef7d4 for the rest of the refs.c file. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index 6c7f92c..16c237c

[PATCH 04/33] refs: document how current_ref is used

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 9 + 1 file changed, 9 insertions(+) diff --git a/refs.c b/refs.c index f503ec4..88ff153 100644 --- a/refs.c +++ b/refs.c @@ -528,6 +528,15 @@ static void sort_ref_dir(struct ref_dir *dir) /* Include broken references in

[PATCH 06/33] do_for_each_ref_in_dirs(): remove dead code

2013-04-14 Thread Michael Haggerty
There is no way to drop out of the while loop. This code has been dead since 432ad41e. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/refs.c b/refs.c index 7cbf228..9f508dd 100644 --- a/refs.c +++ b/refs.c @@ -666,13

[PATCH 07/33] get_packed_ref(): return a ref_entry

2013-04-14 Thread Michael Haggerty
Instead of copying the reference's SHA1 into a caller-supplied variable, just return the ref_entry itself (or NULL if there is no such entry). This change will allow the function to be used from elsewhere. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 20 +---

[PATCH 23/33] pack-refs: rename handle_one_ref() to pack_one_ref()

2013-04-14 Thread Michael Haggerty
This code is about to be moved, so name the function more distinctively. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- pack-refs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pack-refs.c b/pack-refs.c index 4461f71..d840055 100644 --- a/pack-refs.c +++

[PATCH 26/33] refs: use same lock_file object for both ref-packing functions

2013-04-14 Thread Michael Haggerty
Use a single struct lock_file for both pack_refs() and repack_without_ref(). Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 16c237c..e0411c5 100644 --- a/refs.c +++ b/refs.c @@

[PATCH 28/33] refs: inline function do_not_prune()

2013-04-14 Thread Michael Haggerty
Function do_not_prune() was redundantly checking REF_ISSYMREF, which was already tested at the top of pack_one_ref(), so remove that check. And the rest was trivial, so inline the function. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 11 ++- 1 file changed, 2

[PATCH 30/33] pack_one_ref(): use write_packed_entry() to do the writing

2013-04-14 Thread Michael Haggerty
Change pack_refs() to work with a file descriptor instead of a FILE* (making the file-locking code less awkward) and use write_packed_entry() to do the writing. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- Please checked that I am using the file-locking API correctly; I'm not that

[PATCH 32/33] refs: change do_for_each_*() functions to take ref_cache arguments

2013-04-14 Thread Michael Haggerty
Change the callers convert submodule names into ref_cache pointers. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/refs.c b/refs.c index 361a28f..cfcb42f 100644 --- a/refs.c +++

[PATCH 33/33] refs: handle the main ref_cache specially

2013-04-14 Thread Michael Haggerty
Hold the ref_cache instance for the main repository in a dedicated, statically-allocated instance to avoid the need for a function call and a linked-list traversal when it is needed. Suggested by: Heiko Voigt hvo...@hvoigt.net Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 60

[PATCH 29/33] pack_one_ref(): use function peel_entry()

2013-04-14 Thread Michael Haggerty
Change pack_one_ref() to call peel_entry() rather than using its own code for peeling references. Aside from sharing code, this lets it take advantage of the optimization introduced by 6c4a060d7d. Please note that we *could* use any peeled values that happen to already be stored in the

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
On Sun, Apr 14, 2013 at 2:47 PM, Andrew Ardill andrew.ard...@gmail.com wrote: On 14 April 2013 22:34, Sebastian Schuberth sschube...@gmail.com wrote: Usually when I query a variable I'm not so much interested in whether it is at all (explicitly) set to some value or not, but what value is

[PATCH 18/33] search_ref_dir(): return an index rather than a pointer

2013-04-14 Thread Michael Haggerty
Change search_ref_dir() to return the index of the sought entry (or -1 on error) rather than a pointer to the entry. This will make it more natural to use the function for removing an entry from the list. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 30

[PATCH 13/33] peel_ref(): fix return value for non-peelable, not-current reference

2013-04-14 Thread Michael Haggerty
The old version was inconsistent: when a reference was REF_KNOWS_PEELED but with a null peeled value, it returned non-zero for the current reference but zero for other references. Change the behavior for non-current references to match that of current_ref, which is what callers expect. Document

[PATCH 11/33] refs: extract function peel_object()

2013-04-14 Thread Michael Haggerty
It is a nice, logical unit of work, and putting it in a function removes the need to use a goto in peel_ref(). Soon it will also have other uses. The algorithm is unchanged. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 50 ++

[PATCH 05/33] refs: define constant PEELED_LINE_LENGTH

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/refs.c b/refs.c index 88ff153..7cbf228 100644 --- a/refs.c +++ b/refs.c @@ -805,6 +805,9 @@ void invalidate_ref_cache(const char *submodule)

[PATCH 09/33] repack_without_ref(): use function get_packed_ref()

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/refs.c b/refs.c index cf017a5..c523978 100644 --- a/refs.c +++ b/refs.c @@ -1818,9 +1818,11 @@ static int repack_without_ref(const char *refname) {

[PATCH 03/33] refs: document do_for_each_ref() and do_one_ref()

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index 1df1ccd..f503ec4 100644 --- a/refs.c +++ b/refs.c @@ -525,10 +525,14 @@ static void sort_ref_dir(struct ref_dir *dir)

[PATCH 10/33] refs: extract a function ref_resolves_to_object()

2013-04-14 Thread Michael Haggerty
It is a nice unit of work and soon will be needed from multiple locations. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 28 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/refs.c b/refs.c index c523978..dfc8600 100644 --- a/refs.c

[PATCH 24/33] pack-refs: merge code from pack-refs.{c,h} into refs.{c,h}

2013-04-14 Thread Michael Haggerty
pack-refs.c doesn't contain much code, and the code it does contain is closely related to reference handling. Moreover, there is some duplication between pack_refs() and repack_without_ref(). Therefore, merge pack-refs.c into refs.c and pack-refs.h into refs.h. The code duplication will be

[PATCH 16/33] t3210: test for spurious error messages for dangling packed refs

2013-04-14 Thread Michael Haggerty
A packed reference can be overridden by a loose reference, in which case the packed reference is obsolete and is never used. The object pointed to by such a reference can be garbage collected. Since d66da478f2, this could lead to the emission of a spurious error message: error:

[PATCH 27/33] pack_refs(): change to use do_for_each_entry()

2013-04-14 Thread Michael Haggerty
pack_refs() was not using any of the extra features of for_each_ref(), so change it to use do_for_each_entry(). This also gives it access to the ref_entry and in particular its peeled field, which will be taken advantage of in the next commit. Signed-off-by: Michael Haggerty mhag...@alum.mit.edu

[PATCH 31/33] pack_one_ref(): do some cheap tests before a more expensive one

2013-04-14 Thread Michael Haggerty
Signed-off-by: Michael Haggerty mhag...@alum.mit.edu --- refs.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/refs.c b/refs.c index 923d34f..361a28f 100644 --- a/refs.c +++ b/refs.c @@ -2005,16 +2005,15 @@ static int pack_one_ref(struct ref_entry *entry, void

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Andrew Ardill
On 14 April 2013 22:56, Sebastian Schuberth sschube...@gmail.com wrote: The closest thing I can see for doing this is git config --list, but perhaps there should be a flag to check if a config item is set? Yet more command line options? Well, there's probably no way around that in order to

Re: [RFC/PATCH] push: introduce implicit push

2013-04-14 Thread Ramkumar Ramachandra
Junio C Hamano wrote: [...] In any case, dispelling a misplaced blame on matching is not the main point of this message. I _thought_ matching was a good scapegoat to blame current user expectations on. However, it's okay if you think that we're misplacing the blame. As long as we can agree

[RFC/PATCH 0/2] Test the Git version string

2013-04-14 Thread Philip Oakley
In $gmane/217004 I was noted that the git version string is used in the wild for confirming which git version is in use. This patch series seeks to add tests for the version string format and document it. The key questions to be answered are: * should the test be inside t, or somewhere else?

[RFC/PATCH 2/2] Doc: State the exact git version string

2013-04-14 Thread Philip Oakley
Provide the regular expression that matches the 'git --version' strings. Scripts in the wild, including 'git gui', check the git version. Signed-off-by: Philip Oakley philipoak...@iee.org --- Should the string be described by a regular expression? How to format the regular expression for

[RFC/PATCH 1/2] test git version string

2013-04-14 Thread Philip Oakley
The git version string is used in the wild, and in git gui, for capability checking purposes. Test the string format and version X.Y.Z number. The version string shall be: * a single line * less that 80 characters * start with `git version ` * with a following numeric X.Y.Z version. The

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Jakub Narębski
Sebastian Schuberth wrote: Hi, I'm just wondering why it was decided to work like this. IMHO it's quite inconvenient that git config outputs nothing for any unset (but known) variable. Usually when I query a variable I'm not so much interested in whether it is at all (explicitly) set to

Re: [PATCH 1/3] commit: allow associating auxiliary info on-demand

2013-04-14 Thread Jeff King
On Sat, Apr 13, 2013 at 11:04:47PM -0700, Junio C Hamano wrote: From: Jeff King p...@peff.net The indegree field in the commit object is only used while sorting a list of commits in topological order, and wasting memory otherwise. We would prefer to shrink the size of individual commit

Re: [PATCH 2/3] commit-slab: avoid large realloc

2013-04-14 Thread Jeff King
On Sat, Apr 13, 2013 at 11:04:48PM -0700, Junio C Hamano wrote: Instead of using a single slab and keep reallocating it as we find that we need to deal with commits with larger values of commit-index, make a slab an array of many slab_pieces. Each access may need two levels of indirections,

Re: [PATCH 2/2] transport-helper: update remote helper namespace

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 12:13 AM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: Why wasn't this patch merged to 'pu'? To my knowledge nobody raised any real concerns. There are many reasons not to queue _everything_ ever posted to the list on

Re: [PATCH 1/2] transport-helper: report errors properly

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 12:23 AM, Junio C Hamano gits...@pobox.com wrote: Double may only be showing that we do not have enough trusted maintainers; ideally I would like it to have Triple or more. A double or triple review raises *a single* standard higher, but having more than one standard is

[PATCH] t/test-lib.sh: fix TRASH_DIRECTORY handling

2013-04-14 Thread John Keeping
After the location of $TRASH_DIRECTORY is adjusted by $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the trash directory and cd into it. This means that when $TEST_OUTPUT_DIRECTORY is not . and an absolute --root has not been specified, we do not remove the trash directory

Re: [PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Jeff King
On Sat, Apr 13, 2013 at 11:04:49PM -0700, Junio C Hamano wrote: Suppose you want to give one bit per existing ref and paint commits down to find which refs are descendants of each commit. You find that you have 320 refs only at runtime. The code can declare a commit slab struct flagbits

Re: [PATCH 2/2] transport-helper: update remote helper namespace

2013-04-14 Thread Junio C Hamano
Felipe Contreras felipe.contre...@gmail.com writes: On Sun, Apr 14, 2013 at 12:13 AM, Junio C Hamano gits...@pobox.com wrote: Felipe Contreras felipe.contre...@gmail.com writes: Why wasn't this patch merged to 'pu'? To my knowledge nobody raised any real concerns. There are many reasons

Re: [PATCH 2/3] commit-slab: avoid large realloc

2013-04-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sat, Apr 13, 2013 at 11:04:48PM -0700, Junio C Hamano wrote: Instead of using a single slab and keep reallocating it as we find that we need to deal with commits with larger values of commit-index, make a slab an array of many slab_pieces. Each access may

Re: [PATCH] submodule foreach: Added in --post-order=command and adjusted code per Jens Lehmann's suggestions

2013-04-14 Thread Jens Lehmann
Am 13.04.2013 06:04, schrieb eacousineau: Signed-off-by: eacousineau eacousin...@gmail.com --- I see what you meant by the extra variables, so I've fixed that so the original flags aren't needed with recursion. Thanks, the code is looking much better now and you nicely described the changes

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 10:47:31PM +1000, Andrew Ardill wrote: More to the point, I can easily imagine many scripts relying on git config returning a value to indicate that a config item has been set. Your proposed change would break all those. For that reason, it might be nicer to introduce

Re: [PATCH 2/2] transport-helper: update remote helper namespace

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 11:45:10AM -0700, Junio C Hamano wrote: Just rerolling with what _you_ think is an appropriate level of explanation (either or both in log and in-code) and see what happens would probably be the best way to proceed, I think, at this point. Either you hear It still is

Re: Why does git config output nothing instead of the default value for unset variables?

2013-04-14 Thread Sebastian Schuberth
On Sun, Apr 14, 2013 at 8:56 PM, Jeff King p...@peff.net wrote: More to the point, I can easily imagine many scripts relying on git config returning a value to indicate that a config item has been set. Your proposed change would break all those. For that reason, it might be nicer to introduce

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Thomas Rast
Felipe Contreras felipe.contre...@gmail.com writes: It's hard to see them among so much output otherwise. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- builtin/branch.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git

Re: [PATCH 2/3] commit-slab: avoid large realloc

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 11:51:40AM -0700, Junio C Hamano wrote: I don't know if shrinking the size of the realloc is all that big a deal. We are doubling, so the allocation cost is already amortized constant time. I was more disturbed about copying the actual bytes. One of the

Re: [RFC/PATCH 0/2] Test the Git version string

2013-04-14 Thread Junio C Hamano
Philip Oakley philipoak...@iee.org writes: This patch series seeks to add tests for the version string format and document it. The key questions to be answered are: * should the test be inside t, or somewhere else? * should the version string be limited to one line, 80 characters? One

Re: [PATCH] t/test-lib.sh: fix TRASH_DIRECTORY handling

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 05:34:56PM +0100, John Keeping wrote: After the location of $TRASH_DIRECTORY is adjusted by $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the trash directory and cd into it. This means that when $TEST_OUTPUT_DIRECTORY is not . and an absolute

Re: [PATCH] t/test-lib.sh: fix TRASH_DIRECTORY handling

2013-04-14 Thread Thomas Rast
Jeff King p...@peff.net writes: On Sun, Apr 14, 2013 at 05:34:56PM +0100, John Keeping wrote: After the location of $TRASH_DIRECTORY is adjusted by $TEST_OUTPUT_DIRECTORY, we go on to use the $test variable to make the trash directory and cd into it. This means that when

Ensimag students projects, version 2013

2013-04-14 Thread Matthieu Moy
Hi, Like the years before, I'm going to offer my students a 1 month project (end of May - end of June) where they can contribute to a free software, in particular Git. Students are free to pick the feature they want, but I maintain a list of small project ideas on the wiki to help them:

Re: [PATCH v2 1/3] Add public function read_blob_data_from_index_path()

2013-04-14 Thread Lukas Fleischer
On Sat, Apr 13, 2013 at 10:49:36PM -0700, Junio C Hamano wrote: Thanks. I'll queue with the following API fix-up on this, with obvious adjustments necessary for the later ones. * read_blob_data_from_index() is descriptive enough. If you read a blob from the index, you would ask for it

Re: [RFC/PATCH 0/2] Test the Git version string

2013-04-14 Thread Philip Oakley
From: Junio C Hamano gits...@pobox.com Sent: Sunday, April 14, 2013 8:22 PM Philip Oakley philipoak...@iee.org writes: This patch series seeks to add tests for the version string format and document it. The key questions to be answered are: * should the test be inside t, or somewhere

[PATCH] rebase-am: fix regression with new cover-letter config

2013-04-14 Thread Felipe Contreras
If you have a cover-letter configuration set to anything other than 'false', 'git format-patch' might generate a cover letter, and 'git am' doesn't seem to like that. Ideally 'git am' should skip the cover-letter, but for now lets just fix the regression. Signed-off-by: Felipe Contreras

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Duy Nguyen
On Sun, Apr 14, 2013 at 11:46 AM, Felipe Contreras felipe.contre...@gmail.com wrote: + char fancy[80]; - if (show_upstream_ref) + if (show_upstream_ref) { ref = shorten_unambiguous_ref(branch-merge[0]-dst, 0); + if

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 5:31 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Apr 14, 2013 at 11:46 AM, Felipe Contreras felipe.contre...@gmail.com wrote: + char fancy[80]; - if (show_upstream_ref) + if (show_upstream_ref) { ref =

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Adam Spiers
On Sat, Apr 13, 2013 at 09:09:33AM +1000, Duy Nguyen wrote: On Sat, Apr 13, 2013 at 1:03 AM, Adam Spiers g...@adamspiers.org wrote: -static int check_ignore(const char *prefix, const char **pathspec) +static int check_ignore(int argc, const char **argv, const char *prefix) { struct

[PATCH v2] branch: colour upstream branches

2013-04-14 Thread Felipe Contreras
Otherwise when using 'git branch -vv' it's hard to see them among so much output. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- Documentation/config.txt | 3 ++- builtin/branch.c | 35 +++ 2 files changed, 29 insertions(+), 9 deletions(-)

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Duy Nguyen
On Mon, Apr 15, 2013 at 9:22 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 5:31 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Apr 14, 2013 at 11:46 AM, Felipe Contreras felipe.contre...@gmail.com wrote: + char fancy[80]; - if (show_upstream_ref)

Re: [PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-04-14 Thread Duy Nguyen
On Mon, Apr 15, 2013 at 9:25 AM, Adam Spiers g...@adamspiers.org wrote: The introduction of argc also makes it possible to invoke check_ignore() with arguments which are not self-consistent. This is the same problem with main() How could main() be invoked with argc inconsistent with argv?

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 6:46 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:22 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 5:31 PM, Duy Nguyen pclo...@gmail.com wrote: On Sun, Apr 14, 2013 at 11:46 AM, Felipe Contreras

Re: [PATCH v2] branch: colour upstream branches

2013-04-14 Thread Jeff King
On Sun, Apr 14, 2013 at 06:38:27PM -0500, Felipe Contreras wrote: + if (want_color(branch_use_color)) + snprintf(fancy, sizeof(fancy), %s%s%s, + branch_get_color(BRANCH_COLOR_UPSTREAM), +

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Duy Nguyen
On Mon, Apr 15, 2013 at 9:54 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 6:46 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:22 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 5:31 PM, Duy Nguyen

Re: Fwd: Re: git send-pack: protocol error: bad band #50

2013-04-14 Thread Jeff King
On Sat, Apr 13, 2013 at 12:03:15PM +0100, João Joyce wrote: I have tried to remove and recreate my git folder and remove some files to get more logs. Here they are: Your output looks quite odd. packet: push capabilities^{}\0 report-status

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 7:55 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:54 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 6:46 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:22 AM, Felipe Contreras

Re: [RFC/PATCH] clone: introduce clone.submoduleGitDir to relocate $GITDIR

2013-04-14 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: This configuration variable comes into effect when 'git clone' is invoked inside an existing git repository's worktree. When set, instead of cloning the given repository as-is, it relocates the gitdir of the repository to the path specified by

Re: [PATCH 2/3] commit-slab: avoid large realloc

2013-04-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: Yes, but isn't that a constant: (512*1024-32) / sizeof(struct commit_slab_piece) Leaving it as such lets the compiler optimize better, and is safe from anybody changing it at runtime. But I think the answer to my question is yes, that would be the best

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Duy Nguyen
On Mon, Apr 15, 2013 at 11:24 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 7:55 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:54 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 6:46 PM, Duy Nguyen

Re: [PATCH 3/3] commit-slab: introduce a macro to define a slab for new type

2013-04-14 Thread Junio C Hamano
Jeff King p...@peff.net writes: On Sat, Apr 13, 2013 at 11:04:49PM -0700, Junio C Hamano wrote: Suppose you want to give one bit per existing ref and paint commits down to find which refs are descendants of each commit. You find that you have 320 refs only at runtime. The code can declare

Re: [PATCH] branch: colour upstream branches

2013-04-14 Thread Felipe Contreras
On Sun, Apr 14, 2013 at 8:31 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 11:24 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Sun, Apr 14, 2013 at 7:55 PM, Duy Nguyen pclo...@gmail.com wrote: On Mon, Apr 15, 2013 at 9:54 AM, Felipe Contreras

  1   2   >