[RFC] i18n.pathencoding

2012-09-01 Thread Torsten Bögershausen
Allow path names to be encoded in UTF-8 in the repository and checkout out as e.g. ISO-8859-1 in the working tree. Introduce a config variable i18n.pathEncoding. If empty, no re-encoding of path names is done. Add t3911 to test encoding back and forth The re-encoding is done in

Re: Grafting Alternate History

2012-09-01 Thread Andreas Schwab
d...@cray.com writes: For example, let's say we take a local copy of the private repository. I would like to somehow create an empty branch in that local copy and then populate it with the history of the public repository. I would like to be able to specify a git diff-like command on the

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 were

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=FILE; +close FILE; $addr = $1 if $text =~ /Cc: (.*?(,\n .*?)*)\n/s; $addr =~ s/\n//g; +print $addr;'` The quoting is broken in this

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 marco.storne...@gmail.com 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

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

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)

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

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

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

[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 so. It

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

2012-09-01 Thread Philipp A. Hartmann
From: Philipp A. Hartmann p...@qo.cx 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 \

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=FILE; +close FILE; $addr = $1 if $text =~ /Cc: (.*?(,\n .*?)*)\n/s; $addr =~ s/\n//g;

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 to

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

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

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

2012-09-01 Thread Andreas Schwab
Ævar Arnfjörð Bjarmason ava...@gmail.com 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 -manother annotated tag

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 sch...@linux-m68k.org wrote: Ævar Arnfjörð Bjarmason ava...@gmail.com 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

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

2012-09-01 Thread Andreas Schwab
Ævar Arnfjörð Bjarmason ava...@gmail.com 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

Re: Test failures in t4034

2012-09-01 Thread Ramsay Jones
Junio C Hamano wrote: Ramsay Jones ram...@ramsay1.demon.co.uk 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 stdlib.h +#include stdio.h +#include stdarg.h +#include

[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 ram...@ramsay1.demon.co.uk --- .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

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

[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 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 ram...@ramsay1.demon.co.uk --- t/t3902-quoted.sh | 31 +++ 1 file

[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 ram...@ramsay1.demon.co.uk --- t/t4016-diff-quote.sh | 20 +--- 1 file changed,

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

2012-09-01 Thread Ramsay Jones
Signed-off-by: Ramsay Jones ram...@ramsay1.demon.co.uk --- 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 +++

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

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=FILE; +close FILE; $addr = $1 if $text =~

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Enrico Weigelt
snip 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

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Torsten Bögershausen
On 01.09.12 22:11, Enrico Weigelt wrote: snip 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.

Re: diff/merge tool that ignores whitespace changes

2012-09-01 Thread Andreas Schwab
Enrico Weigelt enrico.weig...@vnc.biz 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

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

[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 g...@adamspiers.org --- dir.c | 10 +- dir.h | 4

[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 g...@adamspiers.org --- Makefile | 2 ++ builtin/add.c | 82 +++ pathspec.c| 87 +++

[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

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

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

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

[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

[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 g...@adamspiers.org

[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 g...@adamspiers.org --- Documentation/technical/api-directory-listing.txt | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff

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 gits...@pobox.com 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]]