Re: [PATCH v4 1/2] status: introduce status.short to enable --short by default

2013-06-11 Thread Matthieu Moy
Junio C Hamano writes: > I'll queue this patch after tweaking the test part like this. I agree your version is better, thanks. Jorge: this means if you have to edit the patch further, you'll have to start with the version in Junio's pu. But hopefully you won't have to. -- Matthieu Moy http://

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-11 Thread Matthieu Moy
Jeff King writes: > I was thinking that you would be self-contained inside the > contrib/mw-to-git directory, and therefore you would have to teach your > code how to install the Git module, and you could not longer just "cp > git-remote-mediawiki" into the right place to install it. > > But I th

Re: [PATCH v4 29/31] git-remote-mediawiki: Add a .perlcriticrc file

2013-06-11 Thread Eric Sunshine
On Tue, Jun 11, 2013 at 6:18 PM, Célestin Matte wrote: > Such a file allows to configure perlcritic. > Here, it is used to prevent to remove many unwanted rules and configure one to s/to prevent// > remove unwanted warnings. > > Signed-off-by: Célestin Matte > Signed-off-by: Matthieu Moy > ---

Re: [PATCH v4 09/31] git-remote-mediawiki: Change the behaviour of a split

2013-06-11 Thread Eric Sunshine
On Tue, Jun 11, 2013 at 6:18 PM, Célestin Matte wrote: > A "split ' '" is turned into a "split / /", which changes its behaviour: the > old method matched a run of whitespaces (/\s*/), while the new one will match > a > single whitespace, which is what we want here. Indeed, in other contexts, I

Re: [PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 7:13 PM, Johan Herland wrote: > This is a pure code movement of the machinery for copying notes to > rewritten objects. This code was located in builtin/notes.c for > historical reasons. In order to make it available to builtin/commit.c > it was declared in builtin.h. This

[PATCH 2/3] Move copy_note_for_rewrite + friends from builtin/notes.c to notes-utils.c

2013-06-11 Thread Johan Herland
This is a pure code movement of the machinery for copying notes to rewritten objects. This code was located in builtin/notes.c for historical reasons. In order to make it available to builtin/commit.c it was declared in builtin.h. This was more of an accident of history than a concious design, and

[PATCH 1/3] finish_copy_notes_for_rewrite(): Let caller provide commit message

2013-06-11 Thread Johan Herland
When copying notes for a rewritten object, the resulting notes commit would have the following hardcoded commit message: Notes added by 'git notes copy' This is obviously bogus when the notes rewriting is performed by 'git commit --amend'. Therefore, let the caller specify an appropriate notes

[PATCH 0/3] Refactor useful notes functions into notes-utils.[ch]

2013-06-11 Thread Johan Herland
> There is only one right solution. If a useful function is buried in > builtin/*.o as a historical accident (i.e. it started its life as a > helper for that particular command, and nobody else used it from > outside so far) and that makes it impossible to use the function > from outside builtin/*

[PATCH 3/3] Move create_notes_commit() from notes-merge.c into notes-utils.c

2013-06-11 Thread Johan Herland
create_notes_commit() is needed by both the notes-merge code, and by commit_notes() in notes-utils. Since it is generally useful, and not bound to the notes-merge machinery, we move it from (the more specific) notes-merge to (the more general) notes-utils. Signed-off-by: Johan Herland --- notes-

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread John Szakmeister
On Tue, Jun 11, 2013 at 3:46 PM, Philip Oakley wrote: > From: "Michael Haggerty" > Sent: Tuesday, June 11, 2013 7:52 PM > [...] > >> >> That's a very good point (and a good illustration, too). How do you >> like the new second and third sentences below? >> >> * When reviewing other peoples' code

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 1:43 PM, Michael Haggerty wrote: > On 06/11/2013 08:16 PM, Ramkumar Ramachandra wrote: >> This is an exercise. I can easily be more tactful (as evidenced by >> other threads), but I'm choosing not to be. I want you to focus on >> the argument, and not the tone. > > I stop

Re: What's cooking in git.git (Jun 2013, #04; Tue, 11)

2013-06-11 Thread Junio C Hamano
Felipe Contreras writes: > On Tue, Jun 11, 2013 at 5:34 PM, Junio C Hamano wrote: > >> * fc/remote-helpers-use-specified-python (2013-05-28) 4 commits >> - remote-helpers: add exec-path links >> - remote-helpers: allow direct test execution >> - remote-helpers: rename tests >> - remote-helpe

Re: What's cooking in git.git (Jun 2013, #04; Tue, 11)

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 5:34 PM, Junio C Hamano wrote: > * fc/remote-helpers-use-specified-python (2013-05-28) 4 commits > - remote-helpers: add exec-path links > - remote-helpers: allow direct test execution > - remote-helpers: rename tests > - remote-helpers: generate scripts > > I do not

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 3:55 PM, Junio C Hamano wrote: > Jeff King writes: > >> So there are no hard rules, and this is not a democracy[1]. For the most >> part the community runs itself in an open and collective fashion, and >> the dictator's job is easy; but ultimately, he or she is in charge o

[PATCH 2/2] [submodule] Replace perl-code with sh

2013-06-11 Thread Fredrik Gustafsson
This is a work built on http://thread.gmane.org/gmane.comp.version-control.git/198873/focus=198930 Basically git-submodule.sh needs to use something else than sh to handle newline in filenames (and therefore needs to use a language that accepts \0 in strings). However, since we're not there yet.

[PATCH 1/2] [submodule] handle multibyte characters in name

2013-06-11 Thread Fredrik Gustafsson
Bugg reported here: http://thread.gmane.org/gmane.comp.version-control.git/218922/focus=226791 Note that newline (\n) is still not supported and will not be until the sh-script is replaced by something in an other language. This however let us to use mostly all other strange characters. Signed-of

[PATCH 0/2] module_list enhancements

2013-06-11 Thread Fredrik Gustafsson
Cleanup and enhanced module_list (see patches for details). All new functionality is in the first patch, the second one deals only with cleanup. I would prefer if both got applied. Fredrik Gustafsson (2): [submodule] handle multibyte characters in name [submodule] Replace perl-code with sh

What's cooking in git.git (Jun 2013, #04; Tue, 11)

2013-06-11 Thread Junio C Hamano
Here are the topics that have been cooking. Commits prefixed with '-' are only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'. You can find the changes described here in the integration branches of the repositories listed at http://git-blame.blogspot.com/p/git-publi

Re: [PATCH v3 21/28] git-remote-mediawiki: Put long code into a subroutine

2013-06-11 Thread Célestin Matte
Oops, forgot to take this into account before sending v4 of my series of patch. I just noticed that, sorry... Le 11/06/2013 17:42, Junio C Hamano a écrit : > I am guessing that the new sub, parse_command, uses a local @cmd and > this is an attempt to avoid using the same name, but this renaming >

[PATCH v4 19/31] git-remote-mediawiki: Check return value of open

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 15ad19b..d95119f 100

[PATCH v4 10/31] git-remote-mediawiki: Change separator of some regexps

2013-06-11 Thread Célestin Matte
Use {}{} instead of /// when slashes are used inside the regexp so as not to escape it. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/mw-to-git/git-re

[PATCH v4 18/31] git-remote-mediawiki: Assign a variable as undef and make proper indentation

2013-06-11 Thread Célestin Matte
Explicitly assign local variable $/ as undef and make a proper one-instruction-by-line indentation Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/mw-to-g

[PATCH v4 04/31] git-remote-mediawiki: Always end a subroutine with a return

2013-06-11 Thread Célestin Matte
Follow Subroutines::RequireFinalReturn Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 18 ++ 1 file changed, 18 insertions(+) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-

[PATCH v3 0/4] log --author-date-order

2013-06-11 Thread Junio C Hamano
The first one is unchanged. The second one was redone with Peff's help, and the other two patches have been adjusted for it. Adding tests to t4202 and/or t6012 is left as an exercise to readers. Junio C Hamano (4): toposort: rename "lifo" field prio-queue: priority queue of pointers to struc

[PATCH v4 09/31] git-remote-mediawiki: Change the behaviour of a split

2013-06-11 Thread Célestin Matte
A "split ' '" is turned into a "split / /", which changes its behaviour: the old method matched a run of whitespaces (/\s*/), while the new one will match a single whitespace, which is what we want here. Indeed, in other contexts, changing split(' ') to split(/ /) could potentially be a regression,

[PATCH v4 23/31] git-remote-mediawiki: Brace file handles for print for more clarity

2013-06-11 Thread Célestin Matte
This follows the following rule: InputOutput::RequireBracedFileHandleWithPrint (Severity: 1) The `print' and `printf' functions have a unique syntax that supports an optional file handle argument. Conway suggests wrapping this argument in braces to make it visually stand out from the ot

[PATCH v4 11/31] git-remote-mediawiki: Change style in a regexp

2013-06-11 Thread Célestin Matte
In this regexp, ' |\n' is used, whereas its equivalent '[ \n]', which is clearer, is used elsewhere. Make the style coherent. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 3/4] sort-in-topological-order: use prio-queue

2013-06-11 Thread Junio C Hamano
Use the prio-queue data structure to implement a priority queue of commits sorted by committer date, when handling --date-order. The structure can also be used as a simple LIFO stack, which is a good match for --topo-order processing. Signed-off-by: Junio C Hamano --- commit.c | 75

[PATCH v4 20/31] git-remote-mediawiki: remove import of unused open2

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |1 - 1 file changed, 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index d95119f..7acbec8 100755 --- a/contrib/m

[PATCH v4 14/31] git-remote-mediawiki: Change the name of a variable

2013-06-11 Thread Célestin Matte
Local variable $url has the same name as a global variable. Changing the name of the local variable prevents future possible misunderstanding. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |6 +++--- 1 file changed, 3 insertions(+)

[PATCH v4 17/31] git-remote-mediawiki: Rename a variable ($last) which has the name of a keyword

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index ef9e60a..0610d

[PATCH v4 01/31] git-remote-mediawiki: Make a regexp clearer

2013-06-11 Thread Célestin Matte
Perl's split function takes a regex pattern argument. You can also feed it an expression, which is then compiled into a regex at runtime. It therefore works to pass your pattern via single quotes, but it is much less obvious to a reader that the argument is meant to be a regex, not a static string.

[PATCH v4 21/31] git-remote-mediawiki: Put long code into a subroutine

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 50 +-- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl

[PATCH v4 06/31] git-remote-mediawiki: Change syntax of map calls

2013-06-11 Thread Célestin Matte
Put first parameter of map inside a block, for better readability. Follow BuiltinFunctions::RequireBlockMap Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --gi

[PATCH v4 16/31] git-remote-mediawiki: Remove unused variable $entry

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |1 - 1 file changed, 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 6024791..ef9e60a 100755 --- a/contrib/m

[PATCH v4 15/31] git-remote-mediawiki: Turn double-negated expressions into simple expressions

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 63d1530..60247

[PATCH v4 13/31] git-remote-mediawiki: Add newline in the end of die() error messages

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl

[PATCH v4 02/31] git-remote-mediawiki: Move "use warnings;" before any instruction

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index a7bb397..863ecc9 100

[PATCH v4 07/31] git-remote-mediawiki: Rewrite unclear line of instructions

2013-06-11 Thread Célestin Matte
Subroutines' parameters should be assigned to variable before doing anything else Besides, existing instruction affected a variable inside a "if", which break Git's coding style Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |3 ++-

[PATCH v4 05/31] git-remote-mediawiki: Move a variable declaration at the top of the code

2013-06-11 Thread Célestin Matte
%basetimestamps declaration was lost in the middle of subroutines Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b

[PATCH v4 08/31] git-remote-mediawiki: Remove useless regexp modifier (m)

2013-06-11 Thread Célestin Matte
m// and // is used randomly. It is better to use the m modifier only when needed, e.g., when the regexp uses another separator than //. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |6 +++--- 1 file changed, 3 insertions(+), 3 del

[PATCH v4 31/31] git-remote-mediawiki: Make error message more precise

2013-06-11 Thread Célestin Matte
In subroutine parse_command, error messages were not correct. For the "import" function, having too much or incorrect arguments displayed both "invalid arguments", while it displayed "too many arguments" for the "option" functions under the same conditions. Separate the two error messages in both c

[PATCH v4 25/31] git-remote-mediawiki: Don't use quotes for empty strings

2013-06-11 Thread Célestin Matte
Empty strings are replaced by an $EMPTY constant. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/co

[PATCH v3 4/4] log: --author-date-order

2013-06-11 Thread Junio C Hamano
Sometimes people would want to view the commits in parallel histories in the order of author dates, not committer dates. Teach "topo-order" sort machinery to do so, using a commit-info slab to record the author dates of each commit, and prio-queue to sort them. Signed-off-by: Junio C Hamano ---

[PATCH v4 03/31] git-remote-mediawiki: Replace :utf8 by :encoding(UTF-8)

2013-06-11 Thread Célestin Matte
Follow perlcritic's InputOutput::RequireEncodingWithUTF8Layer policy Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl

[PATCH v4 28/31] git-remote-mediawiki: Clearly rewrite double dereference

2013-06-11 Thread Célestin Matte
@$var structures are re-written in the following way: @{$var} It makes them more readable. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/mw-to-git/g

[PATCH v4 12/31] git-remote-mediawiki: Change style in a regexp

2013-06-11 Thread Célestin Matte
Change '[\n]' to '\n': brackets are useless here. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git

[PATCH v4 30/31] git-remote-mediawiki: add a perlcritic rule in Makefile

2013-06-11 Thread Célestin Matte
Option "-2" launches perlcritic with level 2. Levels go from 5 (most pertinent) to 1. Rules of level 1 are mostly a question of style, and are therefore ignored. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/Makefile |5 - 1 file changed, 4 insertions(+

[PATCH v3 2/4] prio-queue: priority queue of pointers to structs

2013-06-11 Thread Junio C Hamano
Traditionally we used a singly linked list of commits to hold a set of in-flight commits while traversing history. The most typical use of the list is to add commits that are newly discovered to it, keep the list sorted by commit timestamp, pick up the newest one from the list, and keep digging.

[PATCH v4 27/31] git-remote-mediawiki: Fix a typo ("mediwiki" instead of "mediawiki")

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 89b2120..6b6adf2 1

[PATCH v4 24/31] git-remote-mediawiki: Replace "unless" statements with negated "if" statements

2013-06-11 Thread Célestin Matte
Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl index 5174080..4

[PATCH v4 29/31] git-remote-mediawiki: Add a .perlcriticrc file

2013-06-11 Thread Célestin Matte
Such a file allows to configure perlcritic. Here, it is used to prevent to remove many unwanted rules and configure one to remove unwanted warnings. Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/.perlcriticrc | 28 1 file changed,

[PATCH v4 22/31] git-remote-mediawiki: Modify strings for a better coding-style

2013-06-11 Thread Célestin Matte
- strings which don't need interpolation are single-quoted for more clarity and slight gain of performance - interpolation is preferred over concatenation in many cases, for more clarity - variables are always used with the ${} operator inside strings - strings including double-quotes are written w

[PATCH v3 1/4] toposort: rename "lifo" field

2013-06-11 Thread Junio C Hamano
The primary invariant of sort_in_topological_order() is that a parent commit is not emitted until all children of it are. When traversing a forked history like this with "git log C E": ABC \ DE we ensure that A is emitted after all of B, C, D, and E are done, B has to

[PATCH v4 26/31] git-remote-mediawiki: Put non-trivial numeric values in constants.

2013-06-11 Thread Célestin Matte
Non-trivial numeric values (e.g., different from 0, 1 and 2) are placed in constants at the top of the code to be easily modifiable and to make more sense Signed-off-by: Célestin Matte Signed-off-by: Matthieu Moy --- contrib/mw-to-git/git-remote-mediawiki.perl | 20 ++-- 1 fil

[PATCH v4 00/31] git-remote-mediawiki: Follow perlcritic's recommandations

2013-06-11 Thread Célestin Matte
New (and hopefully last version) of my series of patches to follow perlcritic's recommandations Changes with v3: - Remove whitespace in [18/28] - Typo in [09/28] - Better line split in [22/28] - A part of the file @@ -610,9 +610,9 @@ had escaped patches [22/31] and [23/31] for some reason. This i

Re: [PATCH v3 07/28] git-remote-mediawiki: Rewrite unclear line of instructions

2013-06-11 Thread Junio C Hamano
Célestin Matte writes: > Le 11/06/2013 20:09, Junio C Hamano a écrit : >> Matthieu Moy writes: >> my ($namespace) = @_; my $namespace = shift; My impression has been that both are equally common, >>> >>> The second is the most common in git-remote-mediawiki (but I d

[PATCH 11/12] for_each_ref: load all loose refs before packed refs

2013-06-11 Thread Michael Haggerty
From: Jeff King If we are iterating through the refs using for_each_ref (or any of its sister functions), we can get into a race condition with a simultaneous "pack-refs --prune" that looks like this: 0. We have a large number of loose refs, and a few packed refs. refs/heads/z/foo is loos

[PATCH 07/12] packed_ref_cache: increment refcount when locked

2013-06-11 Thread Michael Haggerty
Increment the packed_ref_cache reference count while it is locked to prevent its being freed. Signed-off-by: Michael Haggerty --- refs.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/refs.c b/refs.c index d8e8ce2..92c8e97 100644 --- a/refs.c +++ b/refs.c @@ -816,7 +8

[PATCH 04/12] refs: implement simple transactions for the packed-refs file

2013-06-11 Thread Michael Haggerty
Handle simple transactions for the packed-refs file at the packed_ref_cache level via new functions lock_packed_refs(), commit_packed_refs(), and rollback_packed_refs(). Only allow the packed ref cache to be modified (via add_packed_ref()) while the packed refs file is locked. Change clone to add

[PATCH 09/12] add a stat_validity struct

2013-06-11 Thread Michael Haggerty
It can sometimes be useful to know whether a path in the filesystem has been updated without going to the work of opening and re-reading its content. We trust the stat() information on disk already to handle index updates, and we can use the same trick here. This patch introduces a "stat_validity"

[PATCH 06/12] do_for_each_entry(): increment the packed refs cache refcount

2013-06-11 Thread Michael Haggerty
This function calls a user-supplied callback function which could do something that causes the packed refs cache to be invalidated. So acquire a reference count on the data structure to prevent our copy from being freed while we are iterating over it. Signed-off-by: Michael Haggerty --- refs.c

[PATCH 02/12] pack_refs(): split creation of packed refs and entry writing

2013-06-11 Thread Michael Haggerty
Split pack_refs() into multiple passes: * Iterate over loose refs. For each one that can be turned into a packed ref, create a corresponding entry in the packed refs cache. * Write the packed refs to the packed-refs file. This change isolates the mutation of the packed-refs file to a single p

[PATCH 08/12] Extract a struct stat_data from cache_entry

2013-06-11 Thread Michael Haggerty
Add public functions fill_stat_data() and match_stat_data() to work with it. This infrastructure will later be used to check the validity of other types of file. Signed-off-by: Michael Haggerty --- I'm not too familiar with this part of the code, so please make sure that I've put the dividing li

[PATCH 10/12] get_packed_ref_cache: reload packed-refs file when it changes

2013-06-11 Thread Michael Haggerty
From: Jeff King Once we read the packed-refs file into memory, we cache it to save work on future ref lookups. However, our cache may be out of date with respect to what is on disk if another process is simultaneously packing the refs. Normally it is acceptable for us to be a little out of date,

[PATCH 12/12] refs: do not invalidate the packed-refs cache unnecessarily

2013-06-11 Thread Michael Haggerty
Now that we keep track of the packed-refs file metadata, we can detect when the packed-refs file has been modified since we last read it, and we do so automatically every time that get_packed_ref_cache() is called. So there is no need to invalidate the cache automatically when lock_packed_refs() i

[PATCH 00/12] Fix some reference-related races

2013-06-11 Thread Michael Haggerty
*This patch series must be built on top of mh/reflife.* This patch series fixes some races reading loose and packed refs. Most of the problems, and some of the solutions, were pointed out by Jeff King [1] but some other work was necessary to prevent his fixes from causing problems elsewhere. The

[PATCH 01/12] repack_without_ref(): split list curation and entry writing

2013-06-11 Thread Michael Haggerty
Split repack_without_ref() into multiple passes: * collect the list of refnames that should be deleted from packed_refs * delete those refnames from the cache * write the remainder to the packed-refs file The purpose of this change is to make the "write the remainder" part reusable. Signed-off

[PATCH 05/12] refs: manage lifetime of packed refs cache via reference counting

2013-06-11 Thread Michael Haggerty
In struct packed_ref_cache, keep a count of the number of users of the data structure. Only free the packed ref cache when the reference count goes to zero rather than when the packed ref cache is cleared. This mechanism will be used to prevent the cache data structure from being freed while it is

[PATCH 03/12] refs: wrap the packed refs cache in a level of indirection

2013-06-11 Thread Michael Haggerty
As we know, we can solve any problem in this manner. In this case, the problem is to avoid freeing a packed refs cache while somebody is using it. So add a level of indirection as a prelude to reference-counting the packed refs cache. Signed-off-by: Michael Haggerty --- refs.c | 32 +++

Re: [PATCH v4 1/2] status: introduce status.short to enable --short by default

2013-06-11 Thread Junio C Hamano
jorge-juan.garcia-gar...@ensimag.imag.fr writes: > diff --git a/t/t7508-status.sh b/t/t7508-status.sh > index e2ffdac..3c0818b 100755 > --- a/t/t7508-status.sh > +++ b/t/t7508-status.sh > @@ -1335,4 +1335,39 @@ test_expect_failure '.git/config ignore=all suppresses > submodule summary' ' >

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-11 Thread Jeff King
On Tue, Jun 11, 2013 at 11:31:31PM +0200, Benoît Person wrote: > I've implemented this one for now but after a real-life meeting with > Matthieu Moy we discussed the possibility to build a GitMediawiki.pm > module. It seems more "clean" than the concatenation of perl scripts. > Plus, it would forc

Re: [PATCH/RFC] git-remote-mediawiki: new tool to preview local changes without pushing

2013-06-11 Thread Benoît Person
The V2 is on the launchpad but I am still struggling with the code factoring between git-mw.perl and git-remote-mediawiki.perl :/ . On 9 June 2013 08:08, Jeff King wrote: > > You could make a Git::MediaWiki.pm module, but installing that would > significantly complicate the build procedure, and p

Re: [PATCH 0/4] Fix a race condition when reading loose refs

2013-06-11 Thread Junio C Hamano
I've read the series while on a bus and found all of them sensible. I do share the worry of retry storm you expressed in the last one, and I agree that giving up after N times is a reasonable way out, when it becomes necessary. Thanks. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Junio C Hamano
Jeff King writes: > So there are no hard rules, and this is not a democracy[1]. For the most > part the community runs itself in an open and collective fashion, and > the dictator's job is easy; but ultimately, he or she is in charge of > what gets applied and what doesn't. Rules like "break ties

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Jeff King
On Tue, Jun 11, 2013 at 10:00:56AM -0700, Junio C Hamano wrote: > > * Accept reviewers' comments gratefully and take them very seriously. > > Show that you appreciate the help by giving the reviewer the benefit of > > the doubt. If, after careful consideration, you find that you cannot > > agree

[PATCH] instaweb: make the perl path configurable

2013-06-11 Thread Charles McGarvey
It is convenient for the user to be able to customize the path to perl if they do not want to use the system perl. This may be the case, for example, if the user wants to use the plackup httpd but its extra dependencies are not installed in the system perl; they can set the perl path to a perl tha

Re: [PATCH v3 07/28] git-remote-mediawiki: Rewrite unclear line of instructions

2013-06-11 Thread Célestin Matte
Le 11/06/2013 20:09, Junio C Hamano a écrit : > Matthieu Moy writes: > >>> my ($namespace) = @_; >>> my $namespace = shift; >>> >>> My impression has been that both are equally common, >> >> The second is the most common in git-remote-mediawiki (but I don't have >> any preference nor kn

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 2:59 PM, Junio C Hamano wrote: > Linus Torvalds writes: > >> This whole thread has been one long argument about totally pointless >> things that wouldn't improve anything one way or the other. It's >> bikeshedding of the worst kind. Just let it go. > > The proposal to move

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Junio C Hamano
Linus Torvalds writes: > This whole thread has been one long argument about totally pointless > things that wouldn't improve anything one way or the other. It's > bikeshedding of the worst kind. Just let it go. The proposal to move sequencer.c to builtins/sequencer.c and then adding a filter in

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Brandon Casey
On Tue, Jun 11, 2013 at 7:40 AM, Michael Haggerty wrote: > At the risk of being > presumptuous myself, I suggest that you show a copy of your email to > somebody whom you know and respect in the real world, somebody who is > not immersed in the Git community meltdown. For example, somebody like

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread John Keeping
On Wed, Jun 12, 2013 at 12:16:28AM +0530, Ramkumar Ramachandra wrote: > John Keeping wrote: > > Ugh, why this roundabout-passive-past tone? Use imperative tone > > like this: > > > > ... > > > > vs. > > > > We normally use the imperative in commit messages, perhaps like > >

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 2:24 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> On Tue, Jun 11, 2013 at 1:17 PM, Junio C Hamano wrote: >>> Felipe Contreras writes: >>> Moreover, if you are going to argue that we shouldn't be closing the door, then why not link ./builtin/*.o to

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Philip Oakley
From: "Michael Haggerty" Sent: Tuesday, June 11, 2013 7:52 PM [...] That's a very good point (and a good illustration, too). How do you like the new second and third sentences below? * When reviewing other peoples' code, be tactful and constructive. Remember that submitting patches for public

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 2:06 PM, Junio C Hamano wrote: > Ramkumar Ramachandra writes: >> I'm sorry, but the problem has no solution then. >> >> The "problem" we are dealing with is irrational and/or out-of-tone >> emails. Unless you possess some mind-control mechanism that will get >> all contr

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 1:29 PM, John Keeping wrote: > I realise that we shouldn't take offence to review comments, but we are > all human and it is sometimes hard not to take things personally. > > In the examples above, the first makes it feel like the submitter is > fighting to get a patch inc

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Junio C Hamano
Felipe Contreras writes: > On Tue, Jun 11, 2013 at 1:17 PM, Junio C Hamano wrote: >> Felipe Contreras writes: >> >>> Moreover, if you are going to argue that we shouldn't be closing the >>> door, then why not link ./builtin/*.o to libgit.a? >> >> Huh? It does not make any sense. builtin/*.o f

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread John Keeping
On Tue, Jun 11, 2013 at 08:52:05PM +0200, Michael Haggerty wrote: > That's a very good point (and a good illustration, too). How do you > like the new second and third sentences below? > > * When reviewing other peoples' code, be tactful and constructive. > Remember that submitting patches for pu

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 1:14 PM, Linus Torvalds wrote: > On Tue, Jun 11, 2013 at 11:06 AM, Felipe Contreras > wrote: >> >> Moreover, if you are going to argue that we shouldn't be closing the >> door [...] > > Felipe, you saying "if you are going to argue ..." to anybody else is > kind of ironic.

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Junio C Hamano
Ramkumar Ramachandra writes: > Michael Haggerty wrote: >> I stopped reading your email here. I've read enough tactless emails >> over the last few days, but to be asked to read an email that was >> *intentionally* written tactlessly is too detrimental to my quality of life. > > I'm sorry, but th

Re: [PATCH] build: get rid of the notion of a git library

2013-06-11 Thread Felipe Contreras
On Tue, Jun 11, 2013 at 1:17 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> Moreover, if you are going to argue that we shouldn't be closing the >> door, then why not link ./builtin/*.o to libgit.a? > > Huh? It does not make any sense. builtin/*.o files have cmd_foo() > that are expe

Re: rebase --autosquash does not handle fixup! of fixup!

2013-06-11 Thread Thomas Rast
Andrew Pimlott writes: > git rebase -i --autosquash does not handle a fixup! of a fixup!, such as > the history: > > aaa fix nasty bug > ... > bbb fixup! fix nasty bug > ... > ccc fixup! fixup! fix nasty bug > > --autosquash produces: > > pick aaa fix nasty

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Ramkumar Ramachandra
Michael Haggerty wrote: > I stopped reading your email here. I've read enough tactless emails > over the last few days, but to be asked to read an email that was > *intentionally* written tactlessly is too detrimental to my quality of life. I'm sorry, but the problem has no solution then. The "p

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Michael Haggerty
On 06/11/2013 08:29 PM, John Keeping wrote: > On Tue, Jun 11, 2013 at 10:00:56AM -0700, Junio C Hamano wrote: >> Michael Haggerty writes: >>> * When reviewing other peoples' code, be tactful and constructive. Set >>> high expectations, but do what you can to help the submitter achieve >>> them.

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Ramkumar Ramachandra
John Keeping wrote: > Ugh, why this roundabout-passive-past tone? Use imperative tone > like this: > > ... > > vs. > > We normally use the imperative in commit messages, perhaps like > this? > > ... > > As my mother would say, "politeness costs nothing" ;-) The rev

Re: Tracking vendor release with Git

2013-06-11 Thread Philip Oakley
From: "Yann Droneaud" Sent: Tuesday, June 11, 2013 6:06 PM Hi, I'm trying to setup a workflow to track vendor releases (upstream). Each new release are provided as an archive of source code, data, documentation, etc. For each vendor releases, fixes need to be applied before making them availab

Re: [PATCH] Documentation/CommunityGuidelines

2013-06-11 Thread Michael Haggerty
On 06/11/2013 08:16 PM, Ramkumar Ramachandra wrote: > This is an exercise. I can easily be more tactful (as evidenced by > other threads), but I'm choosing not to be. I want you to focus on > the argument, and not the tone. I stopped reading your email here. I've read enough tactless emails ove

rebase --autosquash does not handle fixup! of fixup!

2013-06-11 Thread Andrew Pimlott
git rebase -i --autosquash does not handle a fixup! of a fixup!, such as the history: aaa fix nasty bug ... bbb fixup! fix nasty bug ... ccc fixup! fixup! fix nasty bug --autosquash produces: pick aaa fix nasty bug fixup bbb fixup! fix nasty bug

Re: Exact format of tree objets

2013-06-11 Thread Junio C Hamano
Chico Sokol writes: > Is there any official documentation of tree objets format? Are tree > objects encoded specially in some way? How can I parse the inflated > contents of a tree object? > > We're suspecting that there is some kind of special format or > encoding, because the command "git cat-f

Re: Exact format of tree objets

2013-06-11 Thread Ilari Liusvaara
On Tue, Jun 11, 2013 at 01:25:14PM -0300, Chico Sokol wrote: > Is there any official documentation of tree objets format? Are tree > objects encoded specially in some way? How can I parse the inflated > contents of a tree object? Tree object consists of entries, each concatenation of: - Octal mode

  1   2   >