Re: Re: File path not escaped in warning message

2012-08-05 Thread jbialobr
There is nothing said in the manual, that core.quotepath affects only header. But it is not the point. You don't know which part of git output will be consumed by machine. Warning message is addressed to human, but it can be consumed by program in the same way as all other messages and output da

Re: [PATCH/RFC v2 09/16] Read index-v5

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > +static struct directory_entry *read_directories_v5(unsigned int *dir_offset, > + unsigned int *dir_table_offset, > + void *mmap, > + int mmap_size) > +{ > + int i, ondisk_directory_s

Re: Did we break receive-pack recently?

2012-08-05 Thread Brandon Casey
On Sun, Aug 5, 2012 at 6:37 PM, Brandon Casey wrote: > On Sat, Aug 4, 2012 at 6:55 PM, Junio C Hamano wrote: >> I just saw this: >> >> $ git push ko >> ko: Counting objects: 332, done. >> Delta compression using up to 4 threads. >> Compressing objects: 100% (110/110), done. >>

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
Excerpts from Tay Ray Chuan's message of Sun Aug 05 21:56:55 -0400 2012: > > I've also briefly dabbled with getting Solaris to simply use the > > HAVE_DEV_TTY code path but the terminal echo stuff hasn't worked > > nicely for me just yet. (It reads the password with nothing > > echoed but then di

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
Excerpts from Junio C Hamano's message of Sun Aug 05 21:59:48 -0400 2012: > Wouldn't > > #if solaris > #define getpass getpassphrase > #endif > > without anything else be more than sufficient? Yes, it would, but I was hoping to make it more explicit that the function getpass

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Junio C Hamano
Ben Walton writes: > diff --git a/compat/terminal.h b/compat/terminal.h > index 97db7cd..8d7b3f9 100644 > --- a/compat/terminal.h > +++ b/compat/terminal.h > @@ -3,4 +3,13 @@ > > char *git_terminal_prompt(const char *prompt, int echo); > > +/* getpass() returns at most 8 characters on solari

Re: [PATCH/RFC v2 15/16] update-index.c: add a force-rewrite option

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > Add a force-rewrite option to update-index, which allows the user > to rewrite the index, even if there are no changes. This can be used > to do performance tests of both the reader and the writer. > > Signed-off-by: Thomas Gummerer > --- > builtin/update-index.c |

Re: [PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Tay Ray Chuan
On Mon, Aug 6, 2012 at 7:17 AM, Ben Walton wrote: > I've also briefly dabbled with getting Solaris to simply use the > HAVE_DEV_TTY code path but the terminal echo stuff hasn't worked > nicely for me just yet. (It reads the password with nothing echoed > but then displays the string after reading

Re: [PATCH/RFC v2 10/16] Read resolve-undo data

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > Make git read the resolve-undo data from the index. > > Since the resolve-undo data is joined with the conflicts in > the ondisk format of the index file version 5, conflicts and > resolved data is read at the same time, and the resolve-undo > data is then converted to t

Re: [PATCH/RFC v2 08/16] Make in-memory format aware of stat_crc

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > + stat_crc = crc32(stat_crc, (Bytef*)&stat, 4); > + stat = htonl(ce->ce_ino); > + stat_crc = crc32(stat_crc, (Bytef*)&stat, 4); > + stat = htonl(ce->ce_size); > + stat_crc = crc32(stat_crc, (Bytef*)&stat, 4); > + stat = htonl(ce->ce_dev); > +

Re: [PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > The new git racy code uses the mtime of cache-entries to smudge > a racy clean entry, and loads the work, of checking the file-system -ECANTPARSE. > if the entry has really changed, off to the reader. This interferes > with this test, because the entry is racily smudge

Re: Did we break receive-pack recently?

2012-08-05 Thread Brandon Casey
On Sat, Aug 4, 2012 at 6:55 PM, Junio C Hamano wrote: > I just saw this: > > $ git push ko > ko: Counting objects: 332, done. > Delta compression using up to 4 threads. > Compressing objects: 100% (110/110), done. > Writing objects: 100% (130/130), 32.27 KiB, done. > Total

Re: [PATCH/RFC v2 05/16] t2104: Don't fail for index versions other than [23]

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > t2104 currently checks for the exact index version 2 or 3, > depending if there is a skip-worktree flag or not. Other > index versions do not use extended flags and thus cannot > be tested for version changes. > > Make this test update the index to version 2 at the begin

Re: [PATCH/RFC v2 04/16] Modify write functions to prepare for other index formats

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > -static int ce_write(git_SHA_CTX *context, int fd, void *data, unsigned int > len) > +static int ce_write_v2(git_SHA_CTX *context, int fd, void *data, unsigned > int len) > { Mild NAK to name this function with any hint that it is for v2 only. The type of "data" is n

Re: [PATCH] merge-recursive: separate message for common ancestors

2012-08-05 Thread Jiang Xin
2012/8/6 Junio C Hamano : > Ralf Thielow writes: > >> It would be nicer for translators to have two messages. >> In the end it's just a separation for singular and plural as it's >> done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)). > > OK, so there was no hidden message beh

Re: [PATCH/RFC v2 01/16] Modify cache_header to prepare for other index formats

2012-08-05 Thread Junio C Hamano
Thomas Gummerer writes: > diff --git a/read-cache.c b/read-cache.c > index 2f8159f..5d61d92 100644 > --- a/read-cache.c > +++ b/read-cache.c > @@ -1433,7 +1446,7 @@ int read_index_from(struct index_state *istate, const > char *path) > > errno = EINVAL; > mmap_size = xsize_t(st.st_s

Re: [PATCH v3 2/2] allow recovery from command name typos

2012-08-05 Thread Junio C Hamano
Tay Ray Chuan writes: > If suggestions are available (based on Levenshtein distance) and if the > terminal isatty(), present a prompt to the user to select one of the > computed suggestions. > > In the case where there is a single suggestion, present the prompt > "[Y/n]", such that "" (ie. the de

[PATCH] Avoid crippled getpass function on Solaris

2012-08-05 Thread Ben Walton
On Solaris getpass() returns at most 8 characters which cripples the credential reading for accounts using longer passwords. The alternate function getpassphrase() was introduced in SunOS 5.6 and will return up to 256 characters. Ensure that git_terminal_prompt uses the more able function when bu

[PATCH/RFC v2 02/16] Modify read functions to prepare for other index formats

2012-08-05 Thread Thomas Gummerer
Modify the read_index_from function, splitting it up into one function that stays the same for every index format, doing the basic operations such as verifying the header, and a function which is specific for each index version, which does the real reading of the index. Signed-off-by: Thomas Gumme

[PATCH/RFC v2 16/16] p0002-index.sh: add perf test for the index formats

2012-08-05 Thread Thomas Gummerer
From: Thomas Rast Add a performance test for index version [23]/4/5 by using git update-index --force-rewrite, thus testing both the reader and the writer speed of all index formats. Signed-off-by: Thomas Rast Signed-off-by: Thomas Gummerer --- t/perf/p0002-index.sh | 33 +++

[PATCH/RFC v2 15/16] update-index.c: add a force-rewrite option

2012-08-05 Thread Thomas Gummerer
Add a force-rewrite option to update-index, which allows the user to rewrite the index, even if there are no changes. This can be used to do performance tests of both the reader and the writer. Signed-off-by: Thomas Gummerer --- builtin/update-index.c |5 - 1 file changed, 4 insertions(+

[PATCH/RFC v2 14/16] Write resolve-undo data for index-v5

2012-08-05 Thread Thomas Gummerer
Write the resolve undo data to the ondisk format, by joining the data in the resolve-undo string-list with the already existing conflicts that were compiled before, when searching the directories and add them to the corresponding directory entries. Helped-by: Thomas Rast Signed-off-by: Thomas Gum

[PATCH/RFC v2 13/16] Write index-v5 cache-tree data

2012-08-05 Thread Thomas Gummerer
Write the cache-tree data for the index version 5 file format. The in-memory cache-tree data is converted to the ondisk format, by adding it to the directory entries, that were compiled from the cache-entries in the step before. Signed-off-by: Thomas Gummerer --- cache-tree.c | 52

[PATCH/RFC v2 11/16] Read cache-tree in index-v5

2012-08-05 Thread Thomas Gummerer
Since the cache-tree data is saved as part of the directory data, we already read it at the beginning of the index. The cache-tree is only converted from this directory data. The cache-tree data is arranged in a tree, with the children sorted by pathlen at each node, while the ondisk format is sor

[PATCH/RFC v2 12/16] Write index-v5

2012-08-05 Thread Thomas Gummerer
Write the index version 5 file format to disk. This version doesn't write the cache-tree data and resolve-undo data to the file. The main work is done when filtering out the directories from the current in-memory format, where in the same turn also the conflicts and the file data is calculated. H

[PATCH/RFC v2 10/16] Read resolve-undo data

2012-08-05 Thread Thomas Gummerer
Make git read the resolve-undo data from the index. Since the resolve-undo data is joined with the conflicts in the ondisk format of the index file version 5, conflicts and resolved data is read at the same time, and the resolve-undo data is then converted to the in-memory format. Helped-by: Thom

[PATCH/RFC v2 09/16] Read index-v5

2012-08-05 Thread Thomas Gummerer
Make git read the index file version 5 without complaining. This version of the reader doesn't read neither the cache-tree nor the resolve undo data, but doesn't choke on an index that includes such data. Helped-by: Thomas Rast Signed-off-by: Thomas Gummerer --- cache.h | 72 +++ re

[PATCH/RFC v2 08/16] Make in-memory format aware of stat_crc

2012-08-05 Thread Thomas Gummerer
Make the in-memory format aware of the stat_crc used by index-v5. It is simply ignored by index version prior to v5. Signed-off-by: Thomas Gummerer --- cache.h |1 + read-cache.c | 27 +++ 2 files changed, 28 insertions(+) diff --git a/cache.h b/cache.h index

[PATCH/RFC v2 06/16] t3700: sleep for 1 second, to avoid interfering with the racy code

2012-08-05 Thread Thomas Gummerer
The new git racy code uses the mtime of cache-entries to smudge a racy clean entry, and loads the work, of checking the file-system if the entry has really changed, off to the reader. This interferes with this test, because the entry is racily smudged and thus has mtime 0. We wait 1 second to avoid

[PATCH/RFC v2 07/16] Add documentation of the index-v5 file format

2012-08-05 Thread Thomas Gummerer
Add a documentation of the index file format version 5 to Documentation/technical. Helped-by: Michael Haggerty Helped-by: Junio C Hamano Helped-by: Thomas Rast Helped-by: Nguyen Thai Ngoc Duy Helped-by: Robin Rosenberg Signed-off-by: Thomas Gummerer --- Documentation/technical/index-file-fo

[PATCH/RFC v2 05/16] t2104: Don't fail for index versions other than [23]

2012-08-05 Thread Thomas Gummerer
t2104 currently checks for the exact index version 2 or 3, depending if there is a skip-worktree flag or not. Other index versions do not use extended flags and thus cannot be tested for version changes. Make this test update the index to version 2 at the beginning of the test. Testing the skip-wo

[PATCH/RFC v2 04/16] Modify write functions to prepare for other index formats

2012-08-05 Thread Thomas Gummerer
Modify the write_index function to add the possibility to add other index formats, that are written in a different way. Also mark all functions, which shall only be used with v2-v4 as v2 functions. Signed-off-by: Thomas Gummerer --- read-cache.c | 43 ---

[PATCH/RFC v2 03/16] Modify match_stat_basic to prepare for other index formats

2012-08-05 Thread Thomas Gummerer
Modify match_stat_basic, into one function that handles the general case, which is the same for all index formats, and a function that handles the specific parts for each index file version. Signed-off-by: Thomas Gummerer --- read-cache.c | 71 +-

[PATCH/RFC v2 01/16] Modify cache_header to prepare for other index formats

2012-08-05 Thread Thomas Gummerer
Modify the cache_header such that other index file formats can be added and reusing the common part of each index format. The signature and version have to be present in every version of the index file format, to check if it can be read by a specific version of git, while other entries (eg. number

[PATCH/RFC v2 0/16] Introduce index file format version 5

2012-08-05 Thread Thomas Gummerer
Fist again apologies for those who were not credited in the first version of this series. The first version of the series was here: $gmane/202752. Changes since the last version: This series now applies to the latest master. [PATCH/RFC v2 01/16] Modify cache_header to prepare for other index fo

Re: Localization: Timestamps get wrong if using different locales

2012-08-05 Thread Junio C Hamano
Christoph Miebach writes: > Running this commands locally (german locale) lead to some wrong dates > for the patches upstream. > > git format-patch -o patches origin What does "git show -s --pretty=fuller HEAD" give you at this point? This is to check what kind of timestamps are stored in the or

Re: [PATCH v3 1/2] add interface for /dev/tty interaction

2012-08-05 Thread Junio C Hamano
Tay Ray Chuan writes: > Factor out the opening and closing of /dev/tty from > git_terminal_prompt(), so that callers may first test if a controlling > terminal is available before proceeding with prompting proper. > > When HAVE_DEV_TTY is not defined, terminal_open() falls back to checking > tty-

Re: [PATCH] merge-recursive: add hint for translators in handle_change_delete()

2012-08-05 Thread Junio C Hamano
Ralf Thielow writes: > The outputs in handle_change_delete() contain a lot of placeholders. > This could end up in confusion to translators since two parts of them > are translated separately. Add a hint for translators that they can > easily understand it without study the code. > > Signed-off-b

Re: File path not escaped in warning message

2012-08-05 Thread Junio C Hamano
Janusz Białobrzewski writes: > Here is output from linux: > > [janusz@mikrus JavaCommon]$ git config --add core.quotepath false > [janusz@mikrus JavaCommon]$ git diff --unified=3 -- "1ą.txt" > warning: LF will be replaced by CRLF in 1.txt. > The file will have its original line endings in your w

Re: [PATCH] merge-recursive: separate message for common ancestors

2012-08-05 Thread Junio C Hamano
Ralf Thielow writes: > It would be nicer for translators to have two messages. > In the end it's just a separation for singular and plural as it's > done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)). OK, so there was no hidden message behind "At least for better translatio

Re: Bringing a bit more sanity to $GIT_DIR/objects/info/alternates?

2012-08-05 Thread Junio C Hamano
Michael Haggerty writes: > I have some other crazy ideas for making the concept even more powerful: Sorry, but the "a bit more sanity" topic is not interested in making the concept powerful at all. This is about making it usable with ease without the user having to worry about "oh, I was about

Re: [PATCH] merge-recursive: separate message for common ancestors

2012-08-05 Thread Ralf Thielow
It would be nicer for translators to have two messages. In the end it's just a separation for singular and plural as it's done in diff.c (e.g. Q_(" %d file changed", " %d files changed", files)). On Sun, Aug 5, 2012 at 8:44 PM, Junio C Hamano wrote: > Ralf Thielow writes: > >> The function "merg

[PATCH v3 2/2] allow recovery from command name typos

2012-08-05 Thread Tay Ray Chuan
If suggestions are available (based on Levenshtein distance) and if the terminal isatty(), present a prompt to the user to select one of the computed suggestions. In the case where there is a single suggestion, present the prompt "[Y/n]", such that "" (ie. the default), "y" and "Y" as input leads

[PATCH v3 1/2] add interface for /dev/tty interaction

2012-08-05 Thread Tay Ray Chuan
Factor out the opening and closing of /dev/tty from git_terminal_prompt(), so that callers may first test if a controlling terminal is available before proceeding with prompting proper. When HAVE_DEV_TTY is not defined, terminal_open() falls back to checking tty-ness of stdin and stderr, as getpas

[PATCH v3 0/2] allow recovery from command name typos

2012-08-05 Thread Tay Ray Chuan
As discussed in the previous iteration, testing for prompt-availabilty has been reworked (patch #2). This is done with the aid of patch #1, which extracts the opening of /dev/tty from git_terminal_prompt() into a terminal_open(). Its return value indicates if a terminal is available for prompting.

Re: [PATCH] merge-recursive: separate message for common ancestors

2012-08-05 Thread Junio C Hamano
Ralf Thielow writes: > The function "merge_recursive" prints the count of common > ancestors as "found %u common ancestor(s):". At least for > better translation, we should use a singular and a plural > form of this message. > > Signed-off-by: Ralf Thielow > --- Thanks. In your "At least" abov

Re: PROPFIND 405 with git-http-backend and Smart HTTP

2012-08-05 Thread Drew Northup
On Mon, Jul 30, 2012 at 5:39 PM, Bo98 wrote: > > Shawn Pearce wrote >> Maybe you forgot to enable ExecCGI? >> > Whoops, completely forgot about that, but, assuming I did it right, it still > doesn't seem to work. > > Here's what I did: > > > Options +ExecCGI > Allow From All > Are a

[PATCH] merge-recursive: separate message for common ancestors

2012-08-05 Thread Ralf Thielow
The function "merge_recursive" prints the count of common ancestors as "found %u common ancestor(s):". At least for better translation, we should use a singular and a plural form of this message. Signed-off-by: Ralf Thielow --- merge-recursive.c | 5 - 1 file changed, 4 insertions(+), 1 dele

[PATCH] merge-recursive: add hint for translators in handle_change_delete()

2012-08-05 Thread Ralf Thielow
The outputs in handle_change_delete() contain a lot of placeholders. This could end up in confusion to translators since two parts of them are translated separately. Add a hint for translators that they can easily understand it without study the code. Signed-off-by: Ralf Thielow --- This patch is

Re: File path not escaped in warning message

2012-08-05 Thread Janusz Białobrzewski
Here is output from linux: [janusz@mikrus JavaCommon]$ git config --add core.quotepath false [janusz@mikrus JavaCommon]$ git diff --unified=3 -- "1ą.txt" warning: LF will be replaced by CRLF in 1.txt. The file will have its original line endings in your working directory. diff --git a/1.txt b/1.

Re: Bringing a bit more sanity to $GIT_DIR/objects/info/alternates?

2012-08-05 Thread Michael Haggerty
On 08/05/2012 06:56 AM, Junio C Hamano wrote: The "alternates" mechanism [...] The UI for this mechanism however has some room for improvement, and we may want to start improving it for the next release after the upcoming Git 1.7.12 (or even Git 2.0 if the change is a large one that may be backwa

Localization: Timestamps get wrong if using different locales

2012-08-05 Thread Christoph Miebach
Hello! Running this commands locally (german locale) lead to some wrong dates for the patches upstream. git format-patch -o patches origin git send-email --compose --no-chain-reply-to --to s...@address.com --suppress-cc=author patches/0001-l10n-Turkish-update.patch The local Date: Sat, 4

[RFCv2] l10n: de.po: translate 76 new messages

2012-08-05 Thread Ralf Thielow
Translate 76 new messages came from git.pot update in 3b6137f (l10n: Update git.pot (76 new, 4 removed messages)). Signed-off-by: Ralf Thielow Signed-off-by: Thomas Rast --- po/de.po | 216 ++- 1 file changed, 115 insertions(+), 101 de

[PATCH] Fix '\ No newline...' annotation in rewrite diffs

2012-08-05 Thread Adam Butcher
When a file that ends with an incomplete line is expressed as a complete rewrite with the -B option, git diff incorrectly appends the incomplete line indicator "\ No newline at end of file" after such a line, rather than writing it on a line of its own (the output codepath for normal output without