Re: [PATCH 00/20] remote-bzr: massive changes

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 8:07 PM, Felipe Contreras wrote: I forgot to mention; these apply on top of the previous 'fixes and cleanups'. > Felipe Contreras (20): > remote-bzr: cleanup CustomTree > remote-bzr: delay blob fetching until the very end > remote-bzr: fix order of locking in Custom

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 6:11 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> You are missing my point, this is *ONE INSTANCE*. Show me another >> instance where a reviewer complained about the lack of a descriptive >> commit messages on *remote-helpers*. > > You are the one who is missi

Re: [PATCH v2 6/9] remote-bzr: store converted URL

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 7:58 PM, John Szakmeister wrote: > On Thu, Apr 25, 2013 at 8:08 PM, Felipe Contreras > wrote: >> Mercurial might convert the URL to something more appropriate, like an >> absolute path. Lets store that instead of the original URL, which won't >> work from a different worki

[PATCH 15/20] remote-bzr: add option to specify branches

2013-04-25 Thread Felipe Contreras
We might not want all the branches. And branch handling in bazaar is rather tricky, so it's safer to simply specify them. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/re

[PATCH 20/20] remote-bzr: export HEAD

2013-04-25 Thread Felipe Contreras
It probably doesn't make any difference, since we usually fetch along the 'master' branch, and when we don't probably the current transport-helper code doesn't work correctly. But if it did work correctly, this might be useful. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remo

[PATCH 18/20] remote-bzr: delay peer branch usage

2013-04-25 Thread Felipe Contreras
So it doesn't time out. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 5f1b9c0..7517645 100755 --- a/contrib/r

[PATCH 19/20] remote-bzr: access branches only when needed

2013-04-25 Thread Felipe Contreras
Bazaar doesn't seem to be tested for multiple usage of branches, so resources seem to be leaked all over. Let's try to minimize this by accessing the Branch objects only when needed. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 28 1 fi

[PATCH 17/20] remote-bzr: iterate revisions properly

2013-04-25 Thread Felipe Contreras
This way we don't need to store the list of all the revisions, which doesn't seem to be very memory efficient with bazaar's design, for whatever reason. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --gi

[PATCH 14/20] remote-bzr: add custom method to find branches

2013-04-25 Thread Felipe Contreras
The official method is incredibly inefficient and slow. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-rem

[PATCH 16/20] remote-bzr: improve progress reporting

2013-04-25 Thread Felipe Contreras
No need to manually count the revisions, and also, this would help to iterate more properly. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr

[PATCH 13/20] remote-bzr: improve author sanitazion

2013-04-25 Thread Felipe Contreras
So that we don't end up with '', and also synchronize it with the one from remote-hg. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/re

[PATCH 12/20] remote-bzr: split marks file

2013-04-25 Thread Felipe Contreras
This way all the remotes can share the same git objects, and the same marks. The information we want to store per remote is very small. The code transparently converts from one organization of marks, to the other. It's rather smooth and there shouldn't be any issues. Signed-off-by: Felipe Contrer

[PATCH 11/20] remote-bzr: add support for shared repo

2013-04-25 Thread Felipe Contreras
This way all the remotes share the same data, so adding multiple remotes, or renaming them doesn't create extra overhead. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/contrib/

[PATCH 10/20] remote-bzr: fix branch names

2013-04-25 Thread Felipe Contreras
When branches have '/' in their name (aka. sub-branches), bazaar seems to choke while creating the new directory. Also, git cannot have both 'foo' and 'foo/bar'. So let's replace slashes with a plus sign. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 1 + 1 file c

[PATCH 09/20] remote-bzr: add support for bzr repos

2013-04-25 Thread Felipe Contreras
In bazaar, a repository can contain multiple branches, and previously we were supporting only one branch at a time. Now we fetch them all. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 158 ++ 1 file changed, 102 insertions(+), 56 del

[PATCH 07/20] remote-bzr: fix partially pushed merge

2013-04-25 Thread Felipe Contreras
If part of the merge was already pushed, we don't have the blob_marks available, however, the commits are already stored in bazaar, so we can use the revision_tree to fetch the contents. We want to do this only when there's no other option. There's no easy way to test this. Signed-off-by: Felipe

[PATCH 08/20] remote-bzr: use branch variable when appropriate

2013-04-25 Thread Felipe Contreras
There should be no functional changes. Basically we want to reserve the 'repo' variable. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/contrib/remote-helpers/git-

[PATCH 06/20] remote-bzr: fixes for branch diverge

2013-04-25 Thread Felipe Contreras
If the branches diverge we want to reset the pointer to where the remote actually is. Since we can access remote branches just as easily as local ones, let's do so. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[PATCH 05/20] remote-bzr: add support to push merges

2013-04-25 Thread Felipe Contreras
In order to do that, we need to store the marks of every file, so that they can be fetched when needed. Unfortunately we can't tell bazaar that nothing changed, we need to send the data so that it can figure it out by itself. And since it will be requesting a bunch of information by the file_id, i

[PATCH 03/20] remote-bzr: fix order of locking in CustomTree

2013-04-25 Thread Felipe Contreras
It doesn't seem to make any difference, but revision_tree() requires a lock. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bz

[PATCH 04/20] remote-bzr: always try to update the worktree

2013-04-25 Thread Felipe Contreras
And fail properly when we can't. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index b428244..eb91d28 100755 --- a/c

[PATCH 02/20] remote-bzr: delay blob fetching until the very end

2013-04-25 Thread Felipe Contreras
Might be more efficient, but the real reason to use the marks will be revealed in upcoming patches. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contr

[PATCH 01/20] remote-bzr: cleanup CustomTree

2013-04-25 Thread Felipe Contreras
This code was not used at all. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index c19ed0e..7452a57 100755 --- a/c

[PATCH 00/20] remote-bzr: massive changes

2013-04-25 Thread Felipe Contreras
Hi, After being contacted by the emacs developers and others who are stuck with Bazaar, which at this point seems to be utterly abandoned, I realized the current implementation is too crude. Bazaar branches are very simplistic, and our support for them is the same; we need to create one remote pe

Re: [PATCH v2 7/9] remote-bzr: tell bazaar to be quiet

2013-04-25 Thread John Szakmeister
On Thu, Apr 25, 2013 at 8:08 PM, Felipe Contreras wrote: > Otherwise we get notification, progress bars, and what not. > > Signed-off-by: Felipe Contreras > --- > contrib/remote-helpers/git-remote-bzr | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/contrib/remote-helpers/git-remote-b

Re: [PATCH v2 6/9] remote-bzr: store converted URL

2013-04-25 Thread John Szakmeister
On Thu, Apr 25, 2013 at 8:08 PM, Felipe Contreras wrote: > Mercurial might convert the URL to something more appropriate, like an > absolute path. Lets store that instead of the original URL, which won't > work from a different working directory if it's relative. > > Signed-off-by: Felipe Contrera

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > Maybe the warning should happen after add_file_to_index() has run, > letting git compare the old and new index entries for that path? Yeah, new and deleted cases we do not have to worry about, so a no-op add_file_to_index() is the only case we have to be careful. There

[PATCH v2 9/9] remote-bzr: use proper push method

2013-04-25 Thread Felipe Contreras
Do not just randomly synchronize the revisions with no checks at all. I don't have any evidence that there's anything wrong with the current code, which Bazaar seems to use, but for different purposes. Let's use the logic Bazaar UI uses to avoid surprises. Also, add a non-ff check. Signed-off-by

[PATCH v2 8/9] remote-bzr: strip extra newline

2013-04-25 Thread Felipe Contreras
It's added by fast-export, the user didn't type it. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 4 1 file changed, 4 insertions(+) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 8617e25..9f56297 100755 --- a

[PATCH v2 6/9] remote-bzr: store converted URL

2013-04-25 Thread Felipe Contreras
Mercurial might convert the URL to something more appropriate, like an absolute path. Lets store that instead of the original URL, which won't work from a different working directory if it's relative. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 13 - 1

[PATCH v2 7/9] remote-bzr: tell bazaar to be quiet

2013-04-25 Thread Felipe Contreras
Otherwise we get notification, progress bars, and what not. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index dda2932..8617e25 10075

[PATCH v2 5/9] remote-hg: use hashlib instead of hg sha1 util

2013-04-25 Thread Felipe Contreras
To be in sync with remote-bzr. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 80b3606..06920f2 100755 --- a/contrib

[PATCH v2 4/9] remote-bzr: add support to push URLs

2013-04-25 Thread Felipe Contreras
Just like in remote-hg. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 16 +--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr index 7b6584e..f1d6d5e 100755 ---

[PATCH v2 3/9] remote-bzr: fix bad state issue

2013-04-25 Thread Felipe Contreras
Carried from remote-hg. The problem reportedly happened after doing a push that fails, the abort causes the state of remote-hg to go bad, this happens because remote-hg's marks are not stored, but 'git fast-export' marks are. Ensure that the marks are _always_ stored. Signed-off-by: Felipe Contr

[PATCH v2 2/9] remote-hg: remove extra check

2013-04-25 Thread Felipe Contreras
Not needed since we use xrange ourselves. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 4 1 file changed, 4 deletions(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index cfa96c1..80b3606 100755 --- a/contrib/remot

[PATCH v2 1/9] remote-helpers: trivial cleanups

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- Do I have to say it? If code is removed, it's because it's not used. contrib/remote-helpers/git-remote-bzr | 7 --- contrib/remote-helpers/git-remote-hg | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/remote-helpers/git-rem

[PATCH v2 0/9] remote-helpers: fixes and cleanups

2013-04-25 Thread Felipe Contreras
Hi, Same as before, minus one fix. This time they are based on 'next' so there shouldn't be any conflicts. Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg. Felipe Contreras (9): remote-helpers: trivial cleanups remote-hg: remove extra check remote-bzr: fix bad sta

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Jonathan Nieder
Junio C Hamano wrote: >> Jonathan Nieder writes: >>> Do you mean files that were touched but have no content change, or >>> something more subtle? [...] > Ahh, I haven't run anything under the debugger yet, but I think I > know what is going on. > > Don't we limit our "update-index --refresh" equ

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Jonathan Nieder writes: > >> Junio C Hamano wrote: >> >>> At the point of calling warn_pathless_add(), it seems that we are >>> triggering this for paths that are not necessarily modified when run >>> with "add -n -u". >> >> Do you mean files that were touched but have n

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > Junio C Hamano wrote: > >> At the point of calling warn_pathless_add(), it seems that we are >> triggering this for paths that are not necessarily modified when run >> with "add -n -u". > > Do you mean files that were touched but have no content change, or > something mo

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Junio C Hamano
Jonathan Nieder writes: > Ramkumar Ramachandra wrote: > >> I thought ^@ was invented for scripting, but can't imagine a usecase for ^!. > > I use "git diff $commit^!" from time to time to get the diff between a > merge and its first parent. > > For comparison, I haven't found ^@ or "git log $comm

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Jonathan Nieder
Junio C Hamano wrote: > At the point of calling warn_pathless_add(), it seems that we are > triggering this for paths that are not necessarily modified when run > with "add -n -u". Do you mean files that were touched but have no content change, or something more subtle? -- To unsubscribe from thi

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Jonathan Nieder
Ramkumar Ramachandra wrote: > I thought ^@ was invented for scripting, but can't imagine a usecase for ^!. I use "git diff $commit^!" from time to time to get the diff between a merge and its first parent. For comparison, I haven't found ^@ or "git log $commit^!" useful. The commit introducing

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > One thing I noticed about Jonathan's warn_pathless_add() thing is > that even though it knows for which path we would behave differently > between the current version and Git 2.0, the warning message does > not say which path outside the current directory would be added i

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: > You are missing my point, this is *ONE INSTANCE*. Show me another > instance where a reviewer complained about the lack of a descriptive > commit messages on *remote-helpers*. You are the one who is missing the point. My message was about your patches to _any_ part of

Re: [PATCH 0/2] "git add -A/--no-all" finishing touches

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Applying Jonathan's idea on top of the early part that has graduated > to 'master', here is to add "--ignore-removal" (which is a more > natural way to say "--no-all") and use it in the warning message. > > Junio C Hamano (2): > git add: --ignore-removal is a better nam

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 5:01 PM, Junio C Hamano wrote: > Having said that, I am more worried about wasting everybody's time > (and this includes your time) with the impedance mismatch between > you and the rest of us. > > Our standard for explaining the change (either in the log or in the > comme

Re: [PATCH] remote-bzr: use proper push method

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: > My gut feeling is that we should do it the way the Bazaar UI does it, > I don't have any evidence that there's anything wrong with the current > code, which Bazaar seems to but have, but for different purposes which > are hard to explain. I would rather avoid surprises.

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: >> Three random points. >> >> * For this particular patch [1/9], especially because this would >>land close to the corresponding remote-hg fixes (e.g. "has_key is >>deprecated"), I think it is sufficient to say "port fixes from >>corresponding remote-hg patch

Re: [PATCH] remote-bzr: use proper push method

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 4:41 PM, Felipe Contreras wrote: > On Thu, Apr 25, 2013 at 4:11 PM, Junio C Hamano wrote: >> Thomas Rast writes: >> >>> Felipe Contreras writes: >>> Not just randomly synchronize the revisions with no checks at all. This is the way bazaar's UI does it. >>>

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 4:37 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> On Thu, Apr 25, 2013 at 3:30 PM, Thomas Rast wrote: >>> Felipe Contreras writes: >>> But I do not care that much really. The patch is good either way, if you don't like it, you go ahead and fix it,

Re: [PATCH] remote-bzr: use proper push method

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 4:11 PM, Junio C Hamano wrote: > Thomas Rast writes: > >> Felipe Contreras writes: >> >>> Not just randomly synchronize the revisions with no checks at all. This >>> is the way bazaar's UI does it. >>> >>> Also, add a non-ff check. >>> >>> Signed-off-by: Felipe Contreras

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: > On Thu, Apr 25, 2013 at 3:30 PM, Thomas Rast wrote: >> Felipe Contreras writes: >> >>> But I do not care that much really. The patch is good either way, if >>> you don't like it, you go ahead and fix it, because I won't. I have >>> 174 remote-helper related patches in

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 3:36 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> But I do not care that much really. The patch is good either way, if >> you don't like it, you go ahead and fix it, because I won't. I have >> 174 remote-helper related patches in my queue, and nobody benefits

Re: [PATCH] inotify to minimize stat() calls

2013-04-25 Thread Duy Nguyen
On Fri, Apr 26, 2013 at 2:44 AM, Robert Zeh wrote: >> Can you just replace lstat/stat with cached_lstat/stat inside >> git-compat-util.h and not touch all files at once? I think you may >> need to deal with paths outside working directory. But because you're >> using lookup table, that should be n

Re: [PATCH] Hold an 'unsigned long' chunk of the sha1 in obj_hash

2013-04-25 Thread Duy Nguyen
On Fri, Apr 26, 2013 at 1:04 AM, Thomas Rast wrote: > So we take a slightly different approach, and trade some memory for > better cache locality. Namely, we change the hash table slots to > contain > > struct object *obj; > unsigned long sha1prefix; > > We use this new 'sha1prefix' field to

Re: [PATCH] remote-bzr: use proper push method

2013-04-25 Thread Junio C Hamano
Thomas Rast writes: > Felipe Contreras writes: > >> Not just randomly synchronize the revisions with no checks at all. This >> is the way bazaar's UI does it. >> >> Also, add a non-ff check. >> >> Signed-off-by: Felipe Contreras >> --- >> >> This patch should probably go to maint, as the result

Re: [PATCH] Hold an 'unsigned long' chunk of the sha1 in obj_hash

2013-04-25 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> So we take a slightly different approach, and trade some memory for >> better cache locality. > > Interesting. It feels somewhat bait-and-switch to reveal that the > above "some" turns out to be "double" later, but the resulting code > does not

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 3:30 PM, Thomas Rast wrote: > Felipe Contreras writes: > >> But I do not care that much really. The patch is good either way, if >> you don't like it, you go ahead and fix it, because I won't. I have >> 174 remote-helper related patches in my queue, and nobody benefits >>

Re: [PATCH] t9501: Do not use export X=Y

2013-04-25 Thread Junio C Hamano
Torsten Bögershausen writes: > Spilt lines like export X=Y into 2 lines: > X=Y > export X That can be read from the patch text. If you are going to spend three lines, please describe why it has to be split; that would help educate developers new to the codebase. Thanks. > Signed-off-by: Torst

Re: [PATCH] check-non-portable-shell: Check for non portable grep usage

2013-04-25 Thread Junio C Hamano
Torsten Bögershausen writes: > The make test-lint could check for some common non portable > grep usage: > > The + as a qualifier is not a "basic regular expression". > Some grep understand \+, but in general egrep should be used. > > The \t can not be used to find an ASCII TAB, neither > can \s

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: > But I do not care that much really. The patch is good either way, if > you don't like it, you go ahead and fix it, because I won't. I have > 174 remote-helper related patches in my queue, and nobody benefits > from rambling about a one liner that is obviously correct, n

Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 3:06 PM, Junio C Hamano wrote: > Felipe Contreras writes: > >> On Thu, Apr 25, 2013 at 1:25 PM, Junio C Hamano wrote: >>> Felipe Contreras writes: >>> >> ... >> + git for-each-ref --format='%(refname) %(objectname)' | >> + while read r

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Thomas Rast
Felipe Contreras writes: > But I do not care that much really. The patch is good either way, if > you don't like it, you go ahead and fix it, because I won't. I have > 174 remote-helper related patches in my queue, and nobody benefits > from rambling about a one liner that is obviously correct, n

Re: [PATCH] Hold an 'unsigned long' chunk of the sha1 in obj_hash

2013-04-25 Thread Junio C Hamano
Thomas Rast writes: > So we take a slightly different approach, and trade some memory for > better cache locality. Interesting. It feels somewhat bait-and-switch to reveal that the above "some" turns out to be "double" later, but the resulting code does not look too bad, and the numbers do not

Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: > On Thu, Apr 25, 2013 at 1:25 PM, Junio C Hamano wrote: >> Felipe Contreras writes: >> > ... > + git for-each-ref --format='%(refname) %(objectname)' | > + while read ref a > do > - test $a =

[PATCH v4 11/11] contrib: related: add support for mailmap

2013-04-25 Thread Felipe Contreras
This seems to be the way git tools do it. Suggested-by: Duy Nguyen Signed-off-by: Felipe Contreras --- contrib/related/git-related | 36 1 file changed, 36 insertions(+) diff --git a/contrib/related/git-related b/contrib/related/git-related index f85e924..b

[PATCH v4 10/11] contrib: related: group persons with same email

2013-04-25 Thread Felipe Contreras
We still need the name of the person, so it might make sense to have a Person object to simplify the code. Later. Suggested-by: Duy Nguyen Signed-off-by: Felipe Contreras --- contrib/related/git-related | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/rela

[PATCH v4 08/11] contrib: related: support multiple roles

2013-04-25 Thread Felipe Contreras
Currently only the roles of 'author' and 'signer' and handler, but now there's also 'reviewer' and 'acker'. Signed-off-by: Felipe Contreras --- contrib/related/git-related | 29 - 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/contrib/related/git-relat

[PATCH v4 09/11] contrib: related: sort by participation

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/related/git-related | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/contrib/related/git-related b/contrib/related/git-related index cf6818e..4e9b916 100755 --- a/contrib/related/git-related +++ b/contrib/related/git-related @@

[PATCH v4 07/11] contrib: related: fix parsing of rev-list args

2013-04-25 Thread Felipe Contreras
For example '-1'. Signed-off-by: Felipe Contreras --- contrib/related/git-related | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/related/git-related b/contrib/related/git-related index 2f38ee1..e8603be 100755 --- a/contrib/related/git-related +++ b/contrib/r

[PATCH v4 05/11] contrib: related: add option to parse from committish

2013-04-25 Thread Felipe Contreras
For example master..feature-a. Signed-off-by: Felipe Contreras --- contrib/related/git-related | 36 ++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/contrib/related/git-related b/contrib/related/git-related index 6eed4bc..0015b3c 100755 --- a/c

[PATCH v4 06/11] contrib: related: parse committish like format-patch

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/related/git-related | 14 ++ 1 file changed, 14 insertions(+) diff --git a/contrib/related/git-related b/contrib/related/git-related index 0015b3c..2f38ee1 100755 --- a/contrib/related/git-related +++ b/contrib/related/git-related @@ -126,6

[PATCH v4 04/11] contrib: related: add option to show commits

2013-04-25 Thread Felipe Contreras
Instead of showing the authors and signers, show the commits themselves. Signed-off-by: Felipe Contreras --- contrib/related/git-related | 18 ++ 1 file changed, 18 insertions(+) diff --git a/contrib/related/git-related b/contrib/related/git-related index 90ec3aa..6eed4bc 100755

[PATCH v4 03/11] contrib: related: add support for multiple patches

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/related/git-related | 34 ++ 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/contrib/related/git-related b/contrib/related/git-related index 702836a..90ec3aa 100755 --- a/contrib/related/git-related +++ b/

[PATCH v4 02/11] contrib: related: add option parsing

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/related/git-related | 17 + 1 file changed, 17 insertions(+) diff --git a/contrib/related/git-related b/contrib/related/git-related index 2d47efa..702836a 100755 --- a/contrib/related/git-related +++ b/contrib/related/git-related @@ -1,

[PATCH v4 01/11] Add new git-related helper to contrib

2013-04-25 Thread Felipe Contreras
This script find people that might be interested in a patch, by going back through the history for each single hunk modified, and finding people that reviewed, acknowledge, signed, or authored the code the patch is modifying. It does this by running 'git blame' incrementally on each hunk, and then

[PATCH v4 00/11] Add new git-related helper to contrib

2013-04-25 Thread Felipe Contreras
Hi, Previously known as git-cc-cmd, I've renamed it git-related (tentatively). I removed support for aliases, as I don't think it's very useful, and I've added support for mailmap, which I think covers similar use-cases. This script allows you to get a list of relevant persons to Cc when sending

Re: [PATCH] inotify to minimize stat() calls

2013-04-25 Thread Thomas Rast
Robert Zeh writes: > On Thu, Apr 25, 2013 at 3:18 AM, Thomas Rast wrote: >> >> I don't get this bit. The lstat() are run over all files listed in the >> index. So shouldn't your daemon watch exactly those (or rather, all >> dirnames of such files)? > I believe that fill_directory is handling w

Re: [PATCH] inotify to minimize stat() calls

2013-04-25 Thread Robert Zeh
On Wed, Apr 24, 2013 at 4:32 PM, Duy Nguyen wrote: > On Thu, Apr 25, 2013 at 3:20 AM, Robert Zeh > wrote: >> Here is a patch that creates a daemon that tracks file >> state with inotify, writes it out to a file upon request, >> and changes most of the calls to stat to use said cache. >> >> It ha

[PATCH 3/3] pretty: remove intermediate strbufs from pp_user_info()

2013-04-25 Thread René Scharfe
Use namebuf/namelen and mailbuf/maillen directly instead of copying their contents into strbufs first. Signed-off-by: Rene Scharfe --- pretty.c | 29 + 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/pretty.c b/pretty.c index 6861997..9e43154 100644 ---

[PATCH 2/3] pretty: simplify output line length calculation in pp_user_info()

2013-04-25 Thread René Scharfe
Keep namelen unchanged and don't use it to hold a value that we're not interested in anyway -- we can use maillen and the constant part directly instead. This simplifies the code slightly and prepares for the next patch that makes use of the original value of namelen. Signed-off-by: Rene Scharfe

[PATCH 1/3] pretty: simplify input line length calculation in pp_user_info()

2013-04-25 Thread René Scharfe
Instead of searching for LF and NUL with two strchr() calls use a single strchrnul() call. We don't need to check if the returned pointer is NULL because either we'll find the NUL at the end of line, or the caller forgot to NUL-terminate the string and we'll overrun the buffer in any case. Also w

Re: [PATCH] inotify to minimize stat() calls

2013-04-25 Thread Robert Zeh
On Thu, Apr 25, 2013 at 3:18 AM, Thomas Rast wrote: > > Robert Zeh writes: > > > Here is a patch that creates a daemon that tracks file > > state with inotify, writes it out to a file upon request, > > and changes most of the calls to stat to use said cache. > > > > It has bugs, but I figured it

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 2:29 PM, Stefano Lattarini wrote: > On 04/25/2013 08:19 PM, Ramkumar Ramachandra wrote: >>> @@ -521,7 +521,7 @@ def c_style_unescape(string): >>> return string >>> >>> def parse_commit(parser): >>> -global marks, blob_marks, bmarks, parsed_refs >>> +global ma

Re: [PATCH 5/9] remote-hg: use hashlib instead of hg sha1 util

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 1:25 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> To be in sync with remote-bzr. > > Huh? Why do you have to be in sync with remote-bzr? Are you sharing > code between remote-hg and remote-bzr? We don't have to. >> @@ -830,7 +831,7 @@ def main(args): >>

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Stefano Lattarini
On 04/25/2013 08:19 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> diff --git a/contrib/remote-helpers/git-remote-bzr >> b/contrib/remote-helpers/git-remote-bzr >> index aa7bc97..82bf7c7 100755 >> --- a/contrib/remote-helpers/git-remote-bzr >> +++ b/contrib/remote-helpers/git-remote-

Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 1:25 PM, Junio C Hamano wrote: > Felipe Contreras writes: > ... + git for-each-ref --format='%(refname) %(objectname)' | + while read ref a do - test $a == $b && continue +

Re: [PATCH 2/9] remote-hg: remove extra check

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 1:23 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> diff --git a/contrib/remote-helpers/git-remote-hg >> b/contrib/remote-helpers/git-remote-hg >> index 5481331..0b7c81f 100755 >> --- a/contrib/remote-helpers/git-remote-hg >> +++ b/contrib/remote-helpers/git-

Re: [PATCH 1/9] remote-bzr: trivial cleanups

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 1:19 PM, Ramkumar Ramachandra wrote: > Felipe Contreras wrote: >> diff --git a/contrib/remote-helpers/git-remote-bzr >> b/contrib/remote-helpers/git-remote-bzr >> index aa7bc97..82bf7c7 100755 >> --- a/contrib/remote-helpers/git-remote-bzr >> +++ b/contrib/remote-helpers/g

Re: Itches with the current rev spec

2013-04-25 Thread Phil Hord
On Thu, Apr 25, 2013 at 1:07 AM, Ramkumar Ramachandra wrote: > 2. git rebase -i master fails unless I've rebased my branch on top of > master. I always wished I could do the equivalent of 'git rebase -i > master..', but I can't. In what way does it fail? It seems to work ok for me. Do you mea

[PATCH] t9501: Do not use export X=Y

2013-04-25 Thread Torsten Bögershausen
Spilt lines like export X=Y into 2 lines: X=Y export X Signed-off-by: Torsten Bögershausen --- t/t9501-gitweb-standalone-http-status.sh | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-

[PATCH] t9501: Use PERL_PATH instead of perl

2013-04-25 Thread Torsten Bögershausen
The prerequisite checker for DATE_PARSER should use "$PERL_PATH" instead of perl Signed-off-by: Torsten Bögershausen --- t/t9501-gitweb-standalone-http-status.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-sta

[PATCH] check-non-portable-shell: export X=Y usage

2013-04-25 Thread Torsten Bögershausen
The make test-lint could check for lines like export X=Y This is bash syntax and should be written in 2 lines: X=Y export X Signed-off-by: Torsten Bögershausen --- t/check-non-portable-shell.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/check-non-portable-shell.pl b

[PATCH] test-lint-shell-syntax: Allow bash syntax in bash tests

2013-04-25 Thread Torsten Bögershausen
t/check-non-portable-sh.pl checks for bash only syntax like test $a == $b This is wrong when bash is used. Switch to bash mode and skip this test Signed-off-by: Torsten Bögershausen --- t/check-non-portable-shell.pl | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/t/che

[PATCH] check-non-portable-shell: Check for non portable grep usage

2013-04-25 Thread Torsten Bögershausen
The make test-lint could check for some common non portable grep usage: The + as a qualifier is not a "basic regular expression". Some grep understand \+, but in general egrep should be used. The \t can not be used to find an ASCII TAB, neither can \s be used to find a whitespace Signed-off-by:

[PATCH] check-non-portable-shell: echo -e is not portable

2013-04-25 Thread Torsten Bögershausen
Depending on the implementation, the echo command may support options like -n -e -E or no options at all. The only portable usage of echo is without any options, which means that no parameter may start with a hyphen. check-non-portable-shell.pl checks if echo -n is used. Improve it to reject any

Re: [PATCH 5/9] remote-hg: use hashlib instead of hg sha1 util

2013-04-25 Thread Ramkumar Ramachandra
Felipe Contreras wrote: > To be in sync with remote-bzr. Huh? Why do you have to be in sync with remote-bzr? Are you sharing code between remote-hg and remote-bzr? > @@ -830,7 +831,7 @@ def main(args): > > if alias[4:] == url: > is_tmp = True > -alias = util.sha1(alias).he

Re: [PATCH] git-remote-testgit: avoid process substitution

2013-04-25 Thread Junio C Hamano
Felipe Contreras writes: >>> ... >>> + git for-each-ref --format='%(refname) %(objectname)' | >>> + while read ref a >>> do >>> - test $a == $b && continue >>> + case "$before" in >>> + *"$ref $a"*)

Re: [PATCH 2/9] remote-hg: remove extra check

2013-04-25 Thread Ramkumar Ramachandra
Felipe Contreras wrote: > diff --git a/contrib/remote-helpers/git-remote-hg > b/contrib/remote-helpers/git-remote-hg > index 5481331..0b7c81f 100755 > --- a/contrib/remote-helpers/git-remote-hg > +++ b/contrib/remote-helpers/git-remote-hg > @@ -332,10 +332,6 @@ def export_ref(repo, name, kind, hea

  1   2   >