Re: Aw: Re: git blame shows wrong "Not commited yet" entries

2012-09-01 Thread Martin von Zweigbergk
On Fri, Aug 31, 2012 at 10:58 AM, Junio C Hamano wrote: > > And "git blame $path" probably should expect $path is something that > appear in the tree of HEAD; apparently it does not. That probably makes sense. For anyone deciding to implement that, note that "git blame -C [-C [-C]] $path" should

[PATCH 2/9] Improve documentation and comments regarding directory traversal API

2012-09-01 Thread Adam Spiers
Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 9 +--- dir.c | 8 ++- dir.h | 26 +-- 3 files changed, 37 insertions(+), 6 deletions(-) diff -

[PATCH 1/9] Update directory listing API doc to match code

2012-09-01 Thread Adam Spiers
7c4c97c0ac turned the flags in struct dir_struct into a single bitfield variable, but forgot to update this document. Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Documentation/te

[PATCH 9/9] Add git-check-ignores

2012-09-01 Thread Adam Spiers
This works in a similar manner to git-check-attr. Some code was reused from add.c by refactoring out into pathspec.c. Thanks to Jeff King and Junio C Hamano for the idea: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 Signed-off-by: Adam Spiers --- .gitignore

[PATCH 0/9] new git check-ignore sub-command

2012-09-01 Thread Adam Spiers
I was browsing stackoverflow the other day and came across this question: http://stackoverflow.com/questions/12144633/which-gitignore-rule-is-ignoring-my-file/ A quick google revealed this thread from 2009: http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108815 wher

[PATCH 5/9] Refactor excluded and path_excluded

2012-09-01 Thread Adam Spiers
In a similar way to the previous commit, this extracts new helper functions excluded_1() and path_excluded_1() which return the last exclude_list element which matched, or NULL if no match was found. excluded() and path_excluded() become wrappers around these, and just return 0 or 1 depending on wh

[PATCH 4/9] Refactor excluded_from_list

2012-09-01 Thread Adam Spiers
The excluded function uses a new helper function called exclude_from_list_1() to perform the inner loop over all of the exclude patterns. The helper just tells us whether the path is included, excluded, or undecided. However, it may be useful to know _which_ pattern was triggered. So let's pass

[PATCH 8/9] Provide free_directory() for reclaiming dir_struct memory

2012-09-01 Thread Adam Spiers
Signed-off-by: Adam Spiers --- Documentation/technical/api-directory-listing.txt | 2 ++ dir.c | 23 +-- dir.h | 1 + 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/Docum

[PATCH 6/9] For each exclude pattern, store information about where it came from

2012-09-01 Thread Adam Spiers
For exclude patterns read in from files, the filename is stored together with the corresponding line number (counting starting at 1). For exclude patterns provided on the command line, the sequence number is negative, with counting starting at -1, so for example the 2nd pattern provided via --excl

[PATCH 7/9] Extract some useful pathspec handling code from builtin/add.c into a library

2012-09-01 Thread Adam Spiers
This is in preparation for reuse by a new git check-ignore command. Signed-off-by: Adam Spiers --- Makefile | 2 ++ builtin/add.c | 82 +++ pathspec.c| 87 +++ pathspec.h| 6

[PATCH 3/9] Rename cryptic 'which' variable to more consistent name

2012-09-01 Thread Adam Spiers
'el' is only *slightly* less cryptic, but is already used as the variable name for a struct exclude_list pointer in numerous other places, so this reduces the number of cryptic variable names in use by one :-) Signed-off-by: Adam Spiers --- dir.c | 10 +- dir.h | 4 ++-- 2 files changed

Suggested behavior when pulling .gitattributes

2012-09-01 Thread Aleksandr Dubinsky
Hi, I ran into a problem with line endings that .gitattributes is supposed to fix. However, I ran into a headache with this not giving the desired result. This headache could have easily been avoided if: When pulling .gitattributes, git should parse the file and anything new in it should be acted

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Andreas Schwab
Enrico Weigelt writes: > * git-diff or git-format-patch or tig should not show differences > that are only whitespace changes (eg. differing linefeeds or > tabs vs. spaces, changed indentions, etc) --ignore-all-space Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint =

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Torsten Bögershausen
On 01.09.12 22:11, Enrico Weigelt wrote: > > > > Thanks folks, but that doesn't solve my problem. I'm looking for something > that's usable on command line or in scripts. > > Usecase a) > > * git-diff or git-format-patch or tig should not show differences > that are only whitespace changes (

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Enrico Weigelt
Thanks folks, but that doesn't solve my problem. I'm looking for something that's usable on command line or in scripts. Usecase a) * git-diff or git-format-patch or tig should not show differences that are only whitespace changes (eg. differing linefeeds or tabs vs. spaces, changed indenti

Re: [PATCH v4] Thunderbird: fix appp.sh format problems

2012-09-01 Thread Marco Stornelli
Il 01/09/2012 15:59, Johannes Sixt ha scritto: Am 01.09.2012 09:43, schrieb Marco Stornelli: Il 31/08/2012 23:35, Johannes Sixt ha scritto: Am 31.08.2012 16:09, schrieb Marco Stornelli: +CCS=`perl -e 'local $/=undef; open FILE, $ENV{'PATCHTMP'}; $text=; +close FILE; $addr = $1 if $text =~ /Cc:

[PATCH 6/6] test-lib.sh: Suppress the "passed all ..." message if no tests run

2012-09-01 Thread Ramsay Jones
If a test script issues a test_done without executing any tests, for example when using the 'skip_all' facility, the output looks something like this: $ ./t9159-git-svn-no-parent-mergeinfo.sh # passed all 0 test(s) 1..0 # SKIP skipping git svn tests, svn not found $ The "passed a

[PATCH 5/6] test-lib.sh: Add check for invalid use of 'skip_all' facility

2012-09-01 Thread Ramsay Jones
The 'skip_all' facility cannot be used after one or more tests have been executed using (for example) 'test_expect_success'. To do so results in invalid TAP output, which leads to 'prove' complaining of "Parse errors: No plan found in TAP output". Add a check for such invalid usage and abort the

[PATCH 4/6] test-lib.sh: Fix some shell coding style violations

2012-09-01 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- t/test-lib.sh | 60 +-- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/t/test-lib.sh b/t/test-lib.sh index 78c4286..56b028c 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -100,12 +100,12

[PATCH 3/6] t4016-*.sh: Skip all tests rather than each test

2012-09-01 Thread Ramsay Jones
Each test in this file is skipped if the TABS_IN_FILENAMES test prerequisite is set. Use the 'skip_all' facility at the head of the file to skip all of the tests instead. Signed-off-by: Ramsay Jones --- t/t4016-diff-quote.sh | 20 +--- 1 file changed, 9 insertions(+), 11 deletio

[PATCH 2/6] t3902-*.sh: Skip all tests rather than each test

2012-09-01 Thread Ramsay Jones
Each test in this file is skipped if the TABS_IN_FILENAMES test prerequisite is set. Use the 'skip_all' facility at the head of the file to skip all of the tests instead. Signed-off-by: Ramsay Jones --- t/t3902-quoted.sh | 31 +++ 1 file changed, 15 insertions(+), 16

[PATCH 1/6] t3300-*.sh: Fix a TAP parse error

2012-09-01 Thread Ramsay Jones
At present, running the t3300-*.sh test on cygwin looks like: $ cd t $ ./t3300-funny-names.sh ok 1 - setup # passed all 1 test(s) 1..1 # SKIP Your filesystem does not allow tabs in filenames $ Unfortunately, this is not valid TAP output, which prove notes as follows:

[PATCH 0/6] Fix Tap parse error etc.

2012-09-01 Thread Ramsay Jones
Hi Junio, I have several branches that I've been meaning to "finish up" for some time. Here, for example, I had intended to add some more patches to merge the TABS_IN_FILENAMES and FUNNYNAMES test prerequisites and then define a single "lazy" prerequisite in test-lib.sh. But I just haven't found t

[PATCH v2] test-regex: Add a test to check for a bug in the regex routines

2012-09-01 Thread Ramsay Jones
Signed-off-by: Ramsay Jones --- .gitignore | 1 + Makefile | 1 + t/t0070-fundamental.sh | 5 + test-regex.c | 20 4 files changed, 27 insertions(+) create mode 100644 test-regex.c diff --git a/.gitignore b/.gitignore index bb5c91

Re: Test failures in t4034

2012-09-01 Thread Ramsay Jones
Junio C Hamano wrote: > Ramsay Jones writes: > [snip] >> diff --git a/test-regex.c b/test-regex.c >> new file mode 100644 >> index 000..9259985 >> --- /dev/null >> +++ b/test-regex.c >> @@ -0,0 +1,35 @@ >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +static vo

Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?

2012-09-01 Thread Andreas Schwab
Ævar Arnfjörð Bjarmason writes: > I don't get what you mean, what committer info? GIT_COMMITTER_{NAME,EMAIL}. A tagger isn't really an author. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something com

Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?

2012-09-01 Thread Ævar Arnfjörð Bjarmason
On Sat, Sep 1, 2012 at 5:57 PM, Andreas Schwab wrote: > Ævar Arnfjörð Bjarmason writes: > >> git --no-pager show tag-name-1 | grep ^Author > > A tag doesn't have an author, it has a tagger. This shows the author of > the *commit*. I got the grep wrong, I meant that I expected the tagger to

Re: Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?

2012-09-01 Thread Andreas Schwab
Ævar Arnfjörð Bjarmason writes: > git --no-pager show tag-name-1 | grep ^Author A tag doesn't have an author, it has a tagger. This shows the author of the *commit*. > GIT_AUTHOR_NAME="Tag Test User" > GIT_AUTHOR_EMAIL="tagt...@example.com" git tag -a -m"another annotated > tag" tag-na

Should GIT_AUTHOR_{NAME,EMAIL} set the tagger name/email?

2012-09-01 Thread Ævar Arnfjörð Bjarmason
Maybe this is documented in some place I didn't spot, but I expected that when I set GIT_AUTHOR_{NAME,EMAIL} it would affect the operation of git-tag, but it doesn't seem to. When I create tags it seems to completely ignore those variables. Should it be doing that? Here's a test script demonstrati

[PATCH] submodule: use argv_array instead of hand-building arrays

2012-09-01 Thread Jens Lehmann
fetch_populated_submodules() allocates the full argv array it uses to recurse into the submodules from the number of given options plus the six argv values it is going to add. It then initializes it with those values which won't change during the iteration and copies the given options into it. Insi

Re: [PATCH 1/3] branch: introduce --set-upstream-to

2012-09-01 Thread Carlos Martín Nieto
Junio C Hamano writes: > Ralf Thielow writes: > >> On Fri, Aug 31, 2012 at 5:22 PM, Carlos Martín Nieto wrote: >>> Ralf Thielow writes: >>> On Thu, Aug 30, 2012 at 7:23 PM, Carlos Martín Nieto wrote: > behaviour. To work around this, introduce --set-upstream-to which > accepts a

Re: [PATCH 2/2] fetch: use argv_array instead of hand-building arrays

2012-09-01 Thread Jens Lehmann
Am 01.09.2012 13:27, schrieb Jeff King: > Fetch invokes itself recursively when recursing into > submodules or handling "fetch --multiple". In both cases, it > builds the child's command line by pushing options onto a > statically-sized array. In both cases, the array is > currently just big enough

Re: [PATCH v4] Thunderbird: fix appp.sh format problems

2012-09-01 Thread Johannes Sixt
Am 01.09.2012 09:43, schrieb Marco Stornelli: > Il 31/08/2012 23:35, Johannes Sixt ha scritto: >> Am 31.08.2012 16:09, schrieb Marco Stornelli: >>> +CCS=`perl -e 'local $/=undef; open FILE, $ENV{'PATCHTMP'}; >>> $text=; >>> +close FILE; $addr = $1 if $text =~ /Cc: (.*?(,\n .*?)*)\n/s; $addr >>> =~

[PATCH 5/4 v3] wincred: port to generic credential helper

2012-09-01 Thread Philipp A. Hartmann
From: "Philipp A. Hartmann" In addition to porting the helper to the generic API, this patch clears up all passwords from memory, which reduces the total amount to saved lines. This version will now pass t0303 if you do GIT_TEST_CREDENTIAL_HELPER=wincred \ ./t0303-credential-external.sh

[PATCH 3/2] argv-array: fix bogus cast when freeing array

2012-09-01 Thread Jeff King
On Sat, Sep 01, 2012 at 07:32:07AM -0400, Jeff King wrote: > Since the array struct stores a "const char **" argv member > (for compatibility with most of our argv-taking functions), > we have to cast away the const-ness when freeing its > elements. > > However, we used the wrong type when doing

Re: [PATCH] fetch --all: pass --tags/--no-tags through to each remote

2012-09-01 Thread Jeff King
Since the array struct stores a "const char **" argv member (for compatibility with most of our argv-taking functions), we have to cast away the const-ness when freeing its elements. However, we used the wrong type when doing so. It doesn't make a difference since free() take a void pointer anywa

[PATCH 2/2] fetch: use argv_array instead of hand-building arrays

2012-09-01 Thread Jeff King
Fetch invokes itself recursively when recursing into submodules or handling "fetch --multiple". In both cases, it builds the child's command line by pushing options onto a statically-sized array. In both cases, the array is currently just big enough to handle the largest possible case. However, thi

[PATCH 1/2] argv-array: add pop function

2012-09-01 Thread Jeff King
Sometimes we build a set of similar command lines, differing only in the final arguments (e.g., "fetch --multiple"). To use argv_array for this, you have to either push the same set of elements repeatedly, or break the abstraction by manually manipulating the array's internal members. Instead, let

Re: [PATCH] fetch --all: pass --tags/--no-tags through to each remote

2012-09-01 Thread Jeff King
On Sat, Sep 01, 2012 at 12:25:33AM -0400, Dan Johnson wrote: > diff --git a/builtin/fetch.c b/builtin/fetch.c > index bb9a074..c6bcbdc 100644 > --- a/builtin/fetch.c > +++ b/builtin/fetch.c > @@ -857,6 +857,10 @@ static void add_options_to_argv(int *argc, const char > **argv) > argv

RE: [PATCH 1/2] Support for setitimer() on platforms lacking it

2012-09-01 Thread Joachim Schmitz
> From: Joachim Schmitz [mailto:j...@schmitz-digital.de] > Sent: Thursday, August 30, 2012 7:23 PM > To: 'Junio C Hamano' > Cc: 'git@vger.kernel.org' > Subject: RE: [PATCH 1/2] Support for setitimer() on platforms lacking it > > > From: Junio C Hamano [mailto:gits...@pobox.com] > > Sent: Thursday,

[PATCH v5] Thunderbird: fix appp.sh format problems

2012-09-01 Thread Marco Stornelli
The current script has got the following problems: 1) It doesn't work if the language used by Thunderbird is not English; 2) The field To: filled by format-patch is not evaluated; 3) The field Cc: is loaded from Cc used in the commit message instead of using the Cc field filled by format-patch in

Re: [PATCH v4] Thunderbird: fix appp.sh format problems

2012-09-01 Thread Marco Stornelli
Il 31/08/2012 19:08, Junio C Hamano ha scritto: Marco Stornelli writes: The current script has got the following problems: 1) It doesn't work if the language used by Thunderbird is not english; 2) The field To: filled by format-patch is not evaluated; 3) The field Cc: is loaded from Cc used i

Re: [PATCH v4] Thunderbird: fix appp.sh format problems

2012-09-01 Thread Marco Stornelli
Il 31/08/2012 23:35, Johannes Sixt ha scritto: Am 31.08.2012 16:09, schrieb Marco Stornelli: +CCS=`perl -e 'local $/=undef; open FILE, $ENV{'PATCHTMP'}; $text=; +close FILE; $addr = $1 if $text =~ /Cc: (.*?(,\n .*?)*)\n/s; $addr =~ s/\n//g; +print $addr;'` The quoting is broken in this line (s

Re: What's cooking in git.git (Aug 2012, #10; Fri, 31)

2012-09-01 Thread Michael Haggerty
On 08/31/2012 11:32 PM, Junio C Hamano wrote: > [...] > * mh/fetch-filter-refs (2012-08-26) 17 commits > - filter_refs(): simplify logic > - fetch_pack(): free matching heads > - cmd_fetch_pack(): simplify computation of return value > - fetch-pack: report missing refs even if no existing refs