Re: [PATCH] send-email: support NNTP

2013-04-25 Thread Łukasz Stelmach
It was <2013-04-25 czw 00:41>, when Junio C Hamano wrote: > Thomas Rast writes: > >> Łukasz Stelmach writes: >> >>> Enable sending patches to NNTP servers (Usenet, Gmane). >> >> I'm surprised Junio didn't mention this: your patch lacks the >> Signed-off-by. > > Heh, that was because I took the pa

Re: [PATCH 1/3] remote: add a test for extra arguments, according to docs

2013-04-25 Thread Thomas Rast
Junio C Hamano writes: > Thomas Rast writes: > >> +test_extra_arg () { >> +expect="success" >> +if test "z$1" = "z-f"; then >> +expect=failure >> +shift >> +fi >> +test_expect_$expect "extra args: $*" " >> +test_must_fail git remote $* bogus_ex

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Thomas Rast
Ramkumar Ramachandra writes: > Thomas Rast wrote: >> I personally think we have enough magic revision syntax to last at least >> another decade. If you propose to add some, please make a patch that we >> can cook in next for a few release cycles and then conduct a straw poll >> if people actuall

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Ramkumar Ramachandra
Okay, so the point I was trying to make is: The range version of $(git merge-base A B) B is B ^$(git merge-base A B), and not B --not $(git merge-base --all A B) [which is equivalent to B ^A or A..B]. Junio C Hamano wrote: > I dunno. The description you gave was insufficient for me to answer > t

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Ramkumar Ramachandra
Thomas Rast wrote: > I already hate half of the existing syntax, and I cannot remember using > ^! (except while investigating what 'git diff C^!' does and why not), > ^@, @{-N} (only the related 'git checkout -'), @{date} and @{relative}, > ^{}, :/foo, and ^{/foo}, *at all*. I'm actually totally i

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

2013-04-25 Thread Thomas Rast
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 would be smarter to see > if the approach was acceptable at all befo

Re: Itches with the current rev spec

2013-04-25 Thread Matthieu Moy
Ramkumar Ramachandra writes: > Hi, > > So, I have three serious itches that would be nice to address: > > 1. git reset --hard HEAD~1/ git show HEAD~1 is a very common idiom > that's unnecessarily cumbersome to type out. We can make the > part of ~ optional without being ambiguous: you might arg

Re: Itches with the current rev spec

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 3:22 AM, Matthieu Moy wrote: > Ramkumar Ramachandra writes: > >> Hi, >> >> So, I have three serious itches that would be nice to address: >> >> 1. git reset --hard HEAD~1/ git show HEAD~1 is a very common idiom >> that's unnecessarily cumbersome to type out. We can make t

Re: Itches with the current rev spec

2013-04-25 Thread Andreas Schwab
Ramkumar Ramachandra writes: > you might argue that ~ normally refers to a /home/, but who uses > numbers in place of usernames? ~ expands to the th element of the dir stack. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276

Re: Itches with the current rev spec

2013-04-25 Thread Ramkumar Ramachandra
Andreas Schwab wrote: > Ramkumar Ramachandra writes: > >> you might argue that ~ normally refers to a /home/, but who uses >> numbers in place of usernames? > > ~ expands to the th element of the dir stack. Oh, ouch. And this is bash. Have to think of something else. -- To unsubscribe from this

[PATCH v2] bash-prompt.sh: Show where rebase is at when interrupted by a merge conflict

2013-04-25 Thread Zoltan Klinger
When a rebase is interrupted by a merge conflict it could be useful to know how far a rebase has progressed and how many commits in total this rebase will apply. Teach the __git_ps1() command to display the number of commits so far applied and the total number of commits to be applied. Below is a

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote: > $ git diff rebase.autostash ^$(git merge-base rebase.autostash master) So, Thomas pointed out on IRC that there is one edge-case: a criss-cross merge. So, we can define A~B as B ^$(git-merge-base --closest-to=B A B). If both A and B are equidistant from the criss-cr

[PATCH] t5801: properly test the test shell

2013-04-25 Thread Michael J Gruber
fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a test which was meant to skip the test unless the test shell is bash. Unfortunately, it tests for the availability of bash only. But users can opt to use a different shell (using SHELL_PATH) for the tests even though bash is av

[PATCH] Fix segfault for insane ident line

2013-04-25 Thread Jiang Xin
Today when I push a long run repository, git complains: $ git push -u github master:doc-tech Counting objects: 5575, done. Delta compression using up to 8 threads. Compressing objects: 100% (2560/2560), done. remote: error: object b798e3ffca56af58c2a7728d75027212a558b6d3:invali

[PATCH] Fix segfault for insane ident line

2013-04-25 Thread Jiang Xin
An insane ident line (generated by old version of git or by hands such as git-hash-object) may cause segfault for `git log` and others commands. This is because the `split_ident_line` function save the result in ident_split, and the returned ident_split.date_begin, ident_split.date_end, ident_spli

Re: [PATCH] Fix segfault for insane ident line

2013-04-25 Thread Jiang Xin
Oops, Ignore this patch please, I found they were already fixed by the following commits of next branch. Maybe next time I should patch something in next branch. commit 9dbe7c3d7f4424cf0c27c2d4efabf72e58fa76b9 Author: René Scharfe Date: Wed Apr 17 20:33:35 2013 +0200 pretty: handle broken

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Johannes Sixt
Am 4/25/2013 12:09, schrieb Michael J Gruber: > fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a > test which was meant to skip the test unless the test shell is bash. > Unfortunately, it tests for the availability of bash only. But users can > opt to use a different shell (

Re: Itches with the current rev spec

2013-04-25 Thread Ramkumar Ramachandra
Felipe Contreras wrote: > Yeah, probably fine, but I would also like H~1. You can get that now using `git symbolic ref H HEAD`. I'm wondering if we can do better than hard-interpreting HEAD as H at the rev-parse level. -- To unsubscribe from this list: send the line "unsubscribe git" in the body

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Michael J Gruber
Johannes Sixt venit, vidit, dixit 25.04.2013 12:59: > Am 4/25/2013 12:09, schrieb Michael J Gruber: >> fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a >> test which was meant to skip the test unless the test shell is bash. >> Unfortunately, it tests for the availability of

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

2013-04-25 Thread Felipe Contreras
Hi, Here's a bunch of cleanups mostly to synchronize remote-bzr and remote-hg. One of these might conflict with a series already in pu, if so, the code here should be the prefered one. Felipe Contreras (9): remote-bzr: trivial cleanups remote-hg: remove extra check remote-bzr: fix bad stat

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

2013-04-25 Thread Felipe Contreras
Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-bzr | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) 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-remo

[PATCH 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 5481331..0b7c81f 100755 --- a/contrib/remot

[PATCH 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 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 84734c7..d6319d6 100755 ---

[PATCH 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 0b7c81f..99abda4 100755 --- a/contrib/r

[PATCH 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 7/9] remote-hg: use python urlparse

2013-04-25 Thread Felipe Contreras
It's simpler, and we don't need to depend on certain Mercurial versions. Also, now we don't update the URL if 'file://' is not present. Signed-off-by: Felipe Contreras --- contrib/remote-helpers/git-remote-hg | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contr

[PATCH 8/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 3d3b1c1..19668a9 10075

[PATCH 9/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 19668a9..8c316fe 100755 --- a

Re: [PATCH 0/5] Documentation/git-diff.txt improvements

2013-04-25 Thread Ramkumar Ramachandra
So, I decided to drop everything and just submit the first two parts. Until we can decide what to do about the '..' and '...' forms (new rev spec? overload existing rev spec to change the meaning? deprecate without a viable alternative?), let's leave them as it is. Nothing to resubmit. Junio: can

[PATCH] remote-bzr: use proper push method

2013-04-25 Thread Felipe Contreras
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 results of pushing the way we currently push are not really understood. Perhaps it

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Johannes Sixt
Am 4/25/2013 13:21, schrieb Michael J Gruber: > Johannes Sixt venit, vidit, dixit 25.04.2013 12:59: >> Am 4/25/2013 12:09, schrieb Michael J Gruber: >>> fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a >>> test which was meant to skip the test unless the test shell is bash.

[PATCH v2 1/1] templates: pre-push hook: check for missing GPG signatures

2013-04-25 Thread Sebastian Götte
Also added a missing colon that caused my bash 4.2.45(2)-release to complain about an empty if. Signed-off-by: Sebastian Götte --- templates/hooks--pre-push.sample | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/templates/hooks--pre-push.sample b/temp

[PATCH v2 0/1] templates: pre-push hook: check for missing GPG signatures

2013-04-25 Thread Sebastian Götte
On 04/24/2013 09:54 PM, Junio C Hamano wrote: > None of the above is part of a proper commit log message, is it? Fixed (I hope) >> Signed-off-by: Sebastian Götte >> diff --git a/templates/hooks--pre-push.sample >> b/templates/hooks--pre-push.sample >> old mode 100644 >> new mode 100755 > Why? Ac

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Torsten Bögershausen
On 25.04.13 12:09, Michael J Gruber wrote: > fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a > test which was meant to skip the test unless the test shell is bash. > Unfortunately, it tests for the availability of bash only. But users can > opt to use a different shell (usi

Re: [PATCH 5/7] rebase -i: return control to the caller, for housekeeping

2013-04-25 Thread Ramkumar Ramachandra
Martin von Zweigbergk wrote: > Normally one would break if unsuccessful. What would fail if this was > replaced by "do_next || break" and the above ".. && return 1" was ".. > && return". I assume that was your first attempt, but why did it not > work? Thanks. This was a major thinko on my part, b

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

2013-04-25 Thread Thomas Rast
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 results of pushing the way we > currentl

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

2013-04-25 Thread Junio C Hamano
Johannes Sixt writes: > From: Johannes Sixt > > Bash on Windows does not implement process substitution. > > Signed-off-by: Johannes Sixt > --- > ... > Here is a fix. It assumes that the list of refs after the import is > a superset of the refs before the import. (Can refs be deleted > via fast

Re: [PATCH 1/3] remote: add a test for extra arguments, according to docs

2013-04-25 Thread Junio C Hamano
Thomas Rast writes: > Junio C Hamano writes: > >> Thomas Rast writes: >> >>> +test_extra_arg () { >>> + expect="success" >>> + if test "z$1" = "z-f"; then >>> + expect=failure >>> + shift >>> + fi >>> + test_expect_$expect "extra args: $*" " >>> + test_must

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Junio C Hamano
Michael J Gruber writes: > fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a > test which was meant to skip the test unless the test shell is bash. > Unfortunately, it tests for the availability of bash only. True. > But users can > opt to use a different shell (using SHE

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Junio C Hamano
Johannes Sixt writes: > Am 4/25/2013 12:09, schrieb Michael J Gruber: >> fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a >> test which was meant to skip the test unless the test shell is bash. >> Unfortunately, it tests for the availability of bash only. But users can >>

Re: [RFC/PATCH] Make --full-history consider more merges

2013-04-25 Thread Kevin Bracey
On 25/04/2013 04:59, Junio C Hamano wrote: Junio C Hamano writes: So, given all that, revised patch below: I tried to squeeze the minimum test I sent $gmane/220919 to the test suite. I think the "do not use --parents option for this test" switch needs to be cleaned up a bit more, but it fail

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Junio C Hamano
Torsten Bögershausen writes: > Could we use the same logic as in t9903: > ... > . ./lib-bash.sh Please no. The test itself is not about something that checks how we behave under bash (which is what 9903 wants to see). The use of construct that is portable in t5801 is a pure and simple bug, and

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Junio C Hamano
Thomas Rast writes: > What's the problem with cooking it for a while? You can start using it > immediately. I'm just somewhat annoyed that the syntax is rapidly > converging to Perl-style line noise. Not quite, not quite, and a mild agreement. Adding an obscure feature that may not be useful

Re: [PATCH v2 0/1] templates: pre-push hook: check for missing GPG signatures

2013-04-25 Thread Junio C Hamano
Sebastian Götte writes: > On 04/24/2013 09:54 PM, Junio C Hamano wrote: >> None of the above is part of a proper commit log message, is it? > Fixed (I hope) Don't hope, instead do. ;-) The questions I asked were not requests to explain them to _me_ in a response like this. They were the examp

Re: [RFC/PATCH] Make --full-history consider more merges

2013-04-25 Thread Junio C Hamano
Kevin Bracey writes: > On 25/04/2013 04:59, Junio C Hamano wrote: >> Junio C Hamano writes: >> So, given all that, revised patch below: >> I tried to squeeze the minimum test I sent $gmane/220919 to the test >> suite. I think the "do not use --parents option for this test" >> switch needs

Re: [PATCH] send-email: support NNTP

2013-04-25 Thread Junio C Hamano
l.stelm...@samsung.com (Łukasz Stelmach) writes: > OK, I see. Good point. Where would you recommend me to put these modules > and how to name them? I mean I don't want to make to much mess here (; I would not recommend you to do any of the above now. As I said, the open-coded if/elsif cascade ve

Re: [PATCH v2] bash-prompt.sh: Show where rebase is at when interrupted by a merge conflict

2013-04-25 Thread Junio C Hamano
Zoltan Klinger writes: > When a rebase is interrupted by a merge conflict it could be useful to The command also stops when told to stop with "amend", etc. no? I would phrase this way "When a rebase stops (e.g. interrupted ...), it could be useful...". > This information can be already obtaine

Re: [BUG] Highly inconsistent diff UI

2013-04-25 Thread Ramkumar Ramachandra
Junio C Hamano wrote: > than ^!/^@ > which I agree were more-or-less "let's add a random cruft on a whim > without thinking things through" mistakes. I thought ^@ was invented for scripting, but can't imagine a usecase for ^!. -- To unsubscribe from this list: send the line "unsubscribe git" in th

Re: [PATCH] t5801: properly test the test shell

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > Michael J Gruber writes: > >> fc407f9 (Add new simplified git-remote-testgit, 2012-11-28) introduced a >> test which was meant to skip the test unless the test shell is bash. >> Unfortunately, it tests for the availability of bash only. > > True. > >> But users can >> op

Re: [PATCH] send-email: support NNTP

2013-04-25 Thread Junio C Hamano
Junio C Hamano writes: > l.stelm...@samsung.com (Łukasz Stelmach) writes: > >> OK, I see. Good point. Where would you recommend me to put these modules >> and how to name them? I mean I don't want to make to much mess here (; > > I would not recommend you to do any of the above now. As I said, t

Re: [RFC/PATCH] Make --full-history consider more merges

2013-04-25 Thread Kevin Bracey
On 25/04/2013 19:51, Junio C Hamano wrote: Kevin Bracey writes: Thanks for the test addition. Maybe we will be able to satisfy your greed in this series. There could be more worth doing here, and I think getting TREESAME precise is key. It is perfectly fine to do things one step at a time. L

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

2013-04-25 Thread Felipe Contreras
On Thu, Apr 25, 2013 at 9:57 AM, Junio C Hamano wrote: > Johannes Sixt writes: > >> From: Johannes Sixt >> >> Bash on Windows does not implement process substitution. >> >> Signed-off-by: Johannes Sixt >> --- >> ... >> Here is a fix. It assumes that the list of refs after the import is >> a sup

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

2013-04-25 Thread Thomas Rast
The existing obj_hash is really straightforward: it holds a struct object * and spills into the subsequent slots (linear probing), which is good enough because it doesn't need to support deletion. However, this arrangement has pretty bad cache locality in the case of collisions. Because the sha1

[PATCH] prune: introduce OPT_EXPIRY_DATE() and use it

2013-04-25 Thread Junio C Hamano
Earlier we added support for --expire=all (or --expire=now) that considers all crufts, regardless of their age, as eligible for garbage collection by turning command argument parsers that use approxidate() to use parse_expiry_date(), but "git prune" used a built-in parse-options facility OPT_DATE()

Re: [RFC/PATCH] Make --full-history consider more merges

2013-04-25 Thread Junio C Hamano
Kevin Bracey writes: > On 25/04/2013 19:51, Junio C Hamano wrote: >> Kevin Bracey writes: >> >>> Thanks for the test addition. Maybe we will be able to satisfy your >>> greed in this series. There could be more worth doing here, and I >>> think getting TREESAME precise is key. >> It is perfectly

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

2013-04-25 Thread Ramkumar Ramachandra
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-bzr > @@ -94,7 +94,7 @@ class Marks: > return self

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

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

[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

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

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

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

[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

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

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

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

[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

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

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 =

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

  1   2   >