[PATCH v1 00/45] nd/parse-pathspec and :(glob) pathspec magic

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Probably not much to say. A big portion of this series is the conversion to struct pathspec, which enables more use of pathspec magic. :(glob) magic is added to verify that the conversion makes sense. Andrew Wong (1): setup.c: check that the pathspec magic ends with ) Nguyễn Thái Ngọc Duy

[PATCH v1 01/45] setup.c: check that the pathspec magic ends with )

2013-03-15 Thread Nguyễn Thái Ngọc Duy
From: Andrew Wong andrew.k...@gmail.com The previous code did not diagnose an incorrectly spelled :(top as an error. Signed-off-by: Andrew Wong andrew.k...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- setup.c | 5 +++-- 1

[PATCH v1 02/45] clean: remove unused variable seen

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clean.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index 04e396b..f955a40 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -155,7 +155,6 @@ int

[PATCH v1 03/45] Move struct pathspec and related functions to pathspec.[ch]

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archive.c | 1 + builtin/grep.c | 1 + builtin/ls-files.c | 1 + builtin/ls-tree.c | 1 + builtin/update-index.c | 1 + cache.h| 22 +--- diff.h | 1 + dir.c

[PATCH v1 04/45] pathspec: i18n-ize error strings in pathspec parsing code

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- pathspec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pathspec.c b/pathspec.c index aa3e4d0..94d64d2 100644 --- a/pathspec.c +++ b/pathspec.c @@ -166,11 +166,11 @@ static const char *prefix_pathspec(const

[PATCH v1 05/45] pathspec: add copy_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The function is made to use with free_pathspec() because a simple struct assignment is not enough (free_pathspec wants to free items pointer). Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/mv.c | 13 +++-- pathspec.c | 8 pathspec.h | 1 + 3 files

[PATCH v1 06/45] Add parse_pathspec() that converts cmdline args to struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Currently to fill a struct pathspec, we do: const char **paths; paths = get_pathspec(prefix, argv); ... init_pathspec(pathspec, paths); paths can only carry bare strings, which loses information from command line arguments such as pathspec magic or the prefix part's length for each

[PATCH v1 07/45] parse_pathspec: save original pathspec for reporting

2013-03-15 Thread Nguyễn Thái Ngọc Duy
We usually use pathspec_item's match field for pathspec error reporting. However match (or raw) does not show the magic part, which will play more important role later on. Preserve exact user input for reporting. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- dir.c | 1 +

[PATCH v1 08/45] parse_pathspec: add PATHSPEC_PREFER_{CWD,FULL}

2013-03-15 Thread Nguyễn Thái Ngọc Duy
We have two ways of dealing with empty pathspec: 1. limit it to current prefix 2. match the entire working directory Some commands go with #1, some #2. get_pathspec() and parse_pathspec() only support #1. Make parse_pathspec() reject empty pathspec by default. #1 and #2 can be specified via new

[PATCH v1 09/45] Convert some get_pathspec() calls to parse_pathspec()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
These call sites follow the pattern: paths = get_pathspec(prefix, argv); init_pathspec(pathspec, paths); which can be converted into a single parse_pathspec() call. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/grep.c | 6 +++--- builtin/ls-tree.c | 10

[PATCH v1 10/45] parse_pathspec: a special flag for max_depth feature

2013-03-15 Thread Nguyễn Thái Ngọc Duy
match_pathspec_depth() and tree_entry_interesting() check max_depth field in order to support git grep --max-depth. The feature activation is tied to recursive field, which led to some unwated activation, e.g. 5c8eeb8 (diff-index: enable recursive pathspec matching in unpack_trees - 2012-01-15).

[PATCH v1 11/45] parse_pathspec: support stripping submodule trailing slashes

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This flag is equivalent to builtin/ls-files.c:strip_trailing_slashes() and is intended to replace that function when ls-files is converted to use parse_pathspec. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- pathspec.c | 9 + pathspec.h | 1 + 2 files changed, 10

[PATCH v1 12/45] parse_pathspec: support stripping/checking submodule paths

2013-03-15 Thread Nguyễn Thái Ngọc Duy
PATHSPEC_SYMLINK_LEADING_PATH and _STRIP_SUBMODULE_SLASH_EXPENSIVE are respectively the alternate implementation of pathspec.c:die_if_path_beyond_symlink() and pathspec.c:check_path_for_gitlink(). They are intended to replace those functions when builtin/add.c and builtin/check-ignore.c are

[PATCH v1 13/45] parse_pathspec: support prefixing original patterns

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This makes 'original' suitable for passing to an external command because all pathspec magic is left in place, provided that the external command understands pathspec. The prefixing is needed because we usually launch a subcommand at worktree's top directory and the subcommand can no longer

[PATCH v1 14/45] Guard against new pathspec magic in pathspec matching code

2013-03-15 Thread Nguyễn Thái Ngọc Duy
GUARD_PATHSPEC() marks pathspec-sensitive code (basically anything in 'struct pathspec' except fields nr and original). GUARD_PATHSPEC() is not supposed to fail. The steps for a new pathspec magic or optimization would be: - update parse_pathspec, add extra information to struct pathspec -

[PATCH v1 15/45] clean: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/clean.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index f955a40..fdd4980 100644 --- a/builtin/clean.c +++ b/builtin/clean.c @@ -13,6 +13,7 @@ #include

[PATCH v1 16/45] commit: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index 3348aa1..ba6731b 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -277,17 +277,17 @@

[PATCH v1 17/45] status: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 9 + wt-status.c | 18 -- wt-status.h | 2 +- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index ba6731b..d8e6b28 100644 ---

[PATCH v1 18/45] rerere: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rerere.c | 8 +--- rerere.c | 9 + rerere.h | 4 +++- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/builtin/rerere.c b/builtin/rerere.c index dc1708e..4e51add 100644 ---

[PATCH v1 19/45] checkout: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index a9c1b5a..8dc5f51 100644 --- a/builtin/checkout.c +++

[PATCH v1 20/45] rm: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/rm.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/rm.c b/builtin/rm.c index dabfcf6..eb1b745 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -10,6 +10,7 @@ #include

[PATCH v1 21/45] ls-files: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/ls-files.c | 46 +- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 752570b..bd64829 100644 --- a/builtin/ls-files.c +++

[PATCH v1 22/45] archive: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- archive.c | 19 +++ archive.h | 4 +++- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/archive.c b/archive.c index 72c6b0f..95cd174 100644 --- a/archive.c +++ b/archive.c @@ -5,7 +5,6 @@ #include

[PATCH v1 23/45] check-ignore: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
check-ignore (at least the test suite) seems to rely on the pattern order. PATHSPEC_KEEP_ORDER is introduced to explictly express this. The lack of PATHSPEC_MAXDEPTH_VALID is sufficient because it's the only flag that reorders pathspecs, but it's less obvious that way. Signed-off-by: Nguyễn Thái

[PATCH v1 24/45] add: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 100 +- pathspec.c| 43 - 2 files changed, 43 insertions(+), 100 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index

[PATCH v1 25/45] reset: convert to use parse_pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/reset.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 6032131..da7282e 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -171,7 +171,10

[PATCH v1 26/45] Convert read_cache_preload() to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- builtin/commit.c | 4 ++-- builtin/diff-files.c | 2 +- builtin/diff-index.c | 2 +- builtin/diff.c | 4 ++-- cache.h | 2 +- preload-index.c | 20 +++- 7

[PATCH v1 27/45] Convert run_add_interactive to use struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This passes the pathspec, more or less unmodified, to git-add--interactive. The command itself does not process pathspec. It simply passes the pathspec to other builtin commands. So if all those commands support pathspec, we're good. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH v1 28/45] Convert unmerge_cache to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- rerere.c | 2 +- resolve-undo.c | 4 ++-- resolve-undo.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index 2ddff95..ba5a5c0

[PATCH v1 29/45] checkout: convert read_tree_some to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 9 +++-- tree.c | 4 ++-- tree.h | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/builtin/checkout.c b/builtin/checkout.c index ba5a5c0..132bfe6 100644 ---

[PATCH v1 30/45] Convert report_path_error to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/checkout.c | 2 +- builtin/commit.c | 14 ++ builtin/ls-files.c | 19 +++ cache.h| 2 +- 4 files changed, 19 insertions(+), 18 deletions(-) diff --git a/builtin/checkout.c

[PATCH v1 31/45] Convert refresh_index to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c| 15 +++ builtin/commit.c | 2 +- builtin/rm.c | 2 +- cache.h | 2 +- read-cache.c | 5 +++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/builtin/add.c

[PATCH v1 32/45] Convert {read,fill}_directory to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 2 +- builtin/clean.c| 2 +- builtin/grep.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 16 +++- dir.h | 4 ++-- wt-status.c| 4 ++-- 7 files changed, 19

[PATCH v1 33/45] Convert add_files_to_cache to take struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c| 8 +--- builtin/commit.c | 2 +- cache.h | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index 7b9e50c..70bfc05 100644 --- a/builtin/add.c +++

[PATCH v1 34/45] Convert common_prefix() to use struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The code now takes advantage of nowildcard_len field. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/commit.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 31 +++ dir.h | 2 +- 4 files changed, 18 insertions(+), 19

[PATCH v1 36/45] Remove init_pathspec() in favor of parse_pathspec()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
While at there, move free_pathspec() to pathspec.c Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/blame.c| 8 +--- builtin/log.c | 2 +- builtin/ls-files.c | 11 +-- diff-lib.c | 2 +- dir.c | 58

[PATCH v1 37/45] Remove match_pathspec() in favor of match_pathspec_depth()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
match_pathspec_depth was created to replace match_pathspec (see 61cf282 (pathspec: add match_pathspec_depth() - 2010-12-15). It took more than two years, but the replacement finally happens :-) Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/add.c | 30 +++---

[PATCH v1 38/45] tree-diff: remove the use of pathspec's raw[] in follow-rename codepath

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Put a checkpoint to guard unsupported pathspec features in future. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- tree-diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tree-diff.c b/tree-diff.c index e1145c6..21a50d8 100644 --- a/tree-diff.c +++

[PATCH v1 39/45] parse_pathspec: make sure the prefix part is wildcard-free

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Prepending prefix to pathspec is a trick to workaround the fact that commands can be executed in a subdirectory, but all git commands run at worktree's root. The prefix part should always be treated as literal string. Make it so. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- cache.h

[PATCH v1 40/45] parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The prefix length is passed from one command to another via the new magic 'prefix'. The magic is for parse_pathspec's internal use only, not visible to parse_pathspec's callers. Prefix length is not preserved across commands when --literal-pathspecs is specified (no magic is allowed, including

[PATCH v1 41/45] Kill limit_pathspec_to_literal() as it's only used by parse_pathspec()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- dir.c | 8 pathspec.c | 8 ++-- pathspec.h | 2 -- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/dir.c b/dir.c index 9627d7e..4f5a2c9 100644 --- a/dir.c +++ b/dir.c @@ -1523,14 +1523,6 @@ int

[PATCH v1 42/45] pathspec: support :(literal) syntax for noglob pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/glossary-content.txt | 4 builtin/add.c | 2 +- builtin/diff.c | 2 +- dir.c | 15 --- pathspec.c | 11

[PATCH v1 43/45] pathspec: make --literal-pathspecs disable pathspec magic

2013-03-15 Thread Nguyễn Thái Ngọc Duy
--literal-pathspecs and its equivalent environment variable are probably used for scripting. In that setting, pathspec magic may be unwanted. Disabling globbing in individual pathspec can be done via :(literal) magic. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH v1 44/45] pathspec: support :(glob) syntax

2013-03-15 Thread Nguyễn Thái Ngọc Duy
:(glob)path differs from plain pathspec that it uses wildmatch with WM_PATHNAME while the other uses fnmatch without FNM_PATHNAME. The difference lies in how '*' (and '**') is processed. With the introduction of :(glob) and :(literal) and their global options --[no]glob-pathspecs, the user can:

[PATCH v1 45/45] Rename field raw to _raw in struct pathspec

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This patch is essentially no-op. It helps catching new use of this field though. This field is introduced as an intermediate step for the pathspec conversion and will be removed eventually. At this stage no more access sites should be introduced. Signed-off-by: Nguyễn Thái Ngọc Duy

SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Kristof Mattei
We're having issues with the version of SSH included in git version 1.8.1.msysgit.1 (Git-1.8.1.2-preview20130201.exe) The included version of SSH is from 2007: C:\Program Files (x86)\Git\bin - Oldssh -V OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 Updating the OpenSSH component (downloaded with

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Daniel Stenberg
On Thu, 14 Mar 2013, Junio C Hamano wrote: As to ALL vs DEFAULT, given that its manual page is riddled with a scary warning: This function must be called at least once within a program (a program is all the code that shares a memory space) before the program calls any other function

Re: Bug: git web--browse doesn't recognise browser on OS X

2013-03-15 Thread Christian Couder
Hi, On Thu, Mar 14, 2013 at 12:39 PM, Timo Sand timo.j.s...@gmail.com wrote: Hi I tried to open a website by runnin 'git web--browse http://google.com' and it replied 'No known browser available'. First git web--browse is a plumbing shell script to display documentation on a web browser when

[BUG?] google code http auth weirdness

2013-03-15 Thread Jeff King
I tried pushing to a repository at Google Code for the first time today, and I encountered some weird behavior with respect to asking for credentials. If I use the url https://code.google.com/r/repo/;, everything works; I get prompted for my username/password. But if I instead use the url

building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
Hello list, Greetings !!! I'm building a git repo on a dedicated server; hence need some kind guidelines from you. [1] the server will have different git repo with branches [2] there will be a web-based GUI which must be flexible to show just a specific branch of a repo based on user

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2013 at 10:05 PM, Junio C Hamano gits...@pobox.com wrote: to speed up by stopping displaying untracked files does not look like giving a balanced suggestion. It is increasing the risk of forgetting about newly created files the user may want to add, but the risk is not

Re: building git ; need suggestion

2013-03-15 Thread Fredrik Gustafsson
On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: [1] the server will have different git repo with branches [2] there will be a web-based GUI which must be flexible to show just a specific branch of a repo based on user authentication [3] the web-based GUI should also have the

Re: building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
forgot to mention: a code review system like gerrit is also helpful, but don't know if gerrit has such fine control mechanism. On 15-Mar-2013, at 5:54 PM, Joydeep Bakshi joydeep.bak...@infoservices.in wrote: Hello list, Greetings !!! I'm building a git repo

Re: building git ; need suggestion

2013-03-15 Thread Joydeep Bakshi
On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson iv...@iveqy.com wrote: On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: [1] the server will have different git repo with branches [2] there will be a web-based GUI which must be flexible to show just a specific branch of a repo

Re: building git ; need suggestion

2013-03-15 Thread Magnus Bäck
On Friday, March 15, 2013 at 08:52 EDT, Joydeep Bakshi joydeep.bak...@infoservices.in wrote: On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson iv...@iveqy.com wrote: gitolite have a more fine ACL. Check it out. However it doesn't really meet your needs with web-interface (and I'm not

Re: building git ; need suggestion

2013-03-15 Thread Konstantin Khomoutov
On Fri, 15 Mar 2013 13:44:15 +0100 Fredrik Gustafsson iv...@iveqy.com wrote: [...] The webgui that's most populair is cgit and git-web. They don't do ACL afaik. gitweb passes around branch names using a specific parameter in the GET queries it operates on, like

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 03/15/2013 01:30 PM, Duy Nguyen wrote: On Thu, Mar 14, 2013 at 10:05 PM, Junio C Hamanogits...@pobox.com wrote: to speed up by stopping displaying untracked files does not look like giving a balanced suggestion. It is increasing the risk of forgetting about newly created files the user may

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Ramkumar Ramachandra
Torsten Bögershausen wrote: [PATCH] git status: Document that git status -uno is faster Yes. I like this patch. In some repostories users expere that git status command takes long time. The command spends some time searching the file system for untracked files. Document that searching for

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Junio C Hamano
Daniel Stenberg dan...@haxx.se writes: (speaking from a libcurl perspective) As for how ALL vs DEFAULT will act or differ in the future, I suspect that we will end up having them being the same (even when we add bits) as we've encouraged ALL in the documentation like this for quite some

Re: [PATCH/RFC] http_init: only initialize SSL for https

2013-03-15 Thread Daniel Stenberg
On Fri, 15 Mar 2013, Junio C Hamano wrote: As for how ALL vs DEFAULT will act or differ in the future, I suspect that we will end up having them being the same (even when we add bits) as we've encouraged ALL in the documentation like this for quite some time. Thanks, then we should stick to

Re: [RFC/PATCH] Documentation/technical/api-fswatch.txt: start with outline

2013-03-15 Thread Pete Wyckoff
gits...@pobox.com wrote on Wed, 13 Mar 2013 12:38 -0700: Karsten Blees karsten.bl...@gmail.com writes: However, AFAIK inotify doesn't work recursively, so the daemon would at least have to track the directory structure to be able to register / unregister inotify handlers as directories

Re: Tag peeling peculiarities

2013-03-15 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: What is stored in ref_value.peeled? Is it the peeled version of ref_value.sha1, or is it the peeled version of the associated refname? Because they are not necessarily the same thing: an entry in the packed ref_cache *might* be overridden by a

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: [PATCH] git status: Document that git status -uno is faster In some repostories users expere that git status command takes long time. expere??? Certainly you did not mean expect. observe, experience, or see, perhaps? The command spends some time

Re: SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Konstantin Khomoutov
On Fri, 15 Mar 2013 11:05:11 +0100 Kristof Mattei kris...@kristofmattei.be wrote: We're having issues with the version of SSH included in git version 1.8.1.msysgit.1 (Git-1.8.1.2-preview20130201.exe) The included version of SSH is from 2007: C:\Program Files (x86)\Git\bin - Oldssh -V

Re: building git ; need suggestion

2013-03-15 Thread Paul Campbell
On Fri, Mar 15, 2013 at 12:52 PM, Joydeep Bakshi joydeep.bak...@infoservices.in wrote: On 15-Mar-2013, at 6:14 PM, Fredrik Gustafsson iv...@iveqy.com wrote: On Fri, Mar 15, 2013 at 05:54:05PM +0530, Joydeep Bakshi wrote: [1] the server will have different git repo with branches [2] there

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 03/15/2013 05:53 PM, Junio C Hamano wrote: Torsten Bögershausentbo...@web.de writes: [PATCH] git status: Document that git status -uno is faster In some repostories users expere that git status command takes long time. expere??? Certainly you did not mean expect. observe, experience,

Re: [PATCH v1 00/45] nd/parse-pathspec and :(glob) pathspec magic

2013-03-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: Probably not much to say. A big portion of this series is the conversion to struct pathspec, which enables more use of pathspec magic. :(glob) magic is added to verify that the conversion makes sense. I haven't read any of these patches, but

Re: [PATCH v1 22/45] archive: convert to use parse_pathspec

2013-03-15 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: @@ -232,11 +228,18 @@ static int path_exists(struct tree *tree, const char *path) static void parse_pathspec_arg(const char **pathspec, struct archiver_args *ar_args) { - ar_args-pathspec = pathspec = get_pathspec(,

git branch: multiple --merged and --no-merged options?

2013-03-15 Thread Jed Brown
I find myself frequently running commands like this $ comm -12 (git branch --no-merged master) (git branch --merged next) when checking for graduation candidates. Of course I first tried $ git branch --no-merged master --merged next but this is equivalent to $ git branch --merged next

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: Thanks, I like that much better than mine (and expere is probably a word not yet invented) OK, then how about redoing Duy's patch like this on top? I've moved the timing collection from the caller to callee, and I think the result is more readable.

Re: SSH version on Git 1.8.1.2 for Windows is outdated.

2013-03-15 Thread Joshua Jensen
- Original Message - From: Konstantin Khomoutov Date: 3/15/2013 11:03 AM On Fri, 15 Mar 2013 11:05:11 +0100 Kristof Mattei kris...@kristofmattei.be wrote: C:\Program Files (x86)\Git\binssh -V OpenSSH_6.1p1, OpenSSL 1.0.1e 11 Feb 2013 Is there any way you can incorporate this update in

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Torsten Bögershausen
On 15.03.13 21:06, Junio C Hamano wrote: Torsten Bögershausen tbo...@web.de writes: Thanks, I like that much better than mine (and expere is probably a word not yet invented) OK, then how about redoing Duy's patch like this on top? I've moved the timing collection from the caller to

Re: [PATCH v1 10/45] parse_pathspec: a special flag for max_depth feature

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: match_pathspec_depth() and tree_entry_interesting() check max_depth field in order to support git grep --max-depth. The feature activation is tied to recursive field, which led to some unwated s/unwated/unwanted/

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Junio C Hamano
Torsten Bögershausen tbo...@web.de writes: Thanks, that looks good to me: # It took 2.58 seconds to enumerate untracked files. # Consider the -u option for a possible speed-up? But: If I follow the advice as is given and use git status -u, the result is the same. Yeah, that was taken

Re: [PATCH v1 40/45] parse_pathspec: preserve prefix length via PATHSPEC_PREFIX_ORIGIN

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: Prefix length is not preserved across commands when --literal-pathspecs is specified (no magic is allowed, including 'prefix'). That's OK because we all paths are literal. No magic, no special treatment s/we all/we

Re: [PATCH v1 44/45] pathspec: support :(glob) syntax

2013-03-15 Thread Eric Sunshine
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: +GIT_GLOB_PATHSPECS:: + Setting this variable to `1` will cause git to treat all + pathspecs as glob patterns (aka glob magic). Per recent git - Git normalization, probably: s/git/Git/ +

[PATCH] archive-zip: use deflateInit2() to ask for raw compressed data

2013-03-15 Thread René Scharfe
We use the function git_deflate_init() -- which wraps the zlib function deflateInit() -- to initialize compression of ZIP file entries. This results in compressed data prefixed with a two-bytes long header and followed by a four-bytes trailer. ZIP file entries consist of ZIP headers and raw

regression in multi-threaded git-pack-index

2013-03-15 Thread Stefan Zager
We have uncovered a regression in this commit: b8a2486f1524947f232f657e9f2ebf44e3e7a243 The symptom is that 'git fetch' dies with: error: index-pack died of signal 10 fatal: index-pack failed I have only been able to reproduce it on a Mac thus far; will try ubuntu next. We can make it go

Re: [PATCH v1 22/45] archive: convert to use parse_pathspec

2013-03-15 Thread Duy Nguyen
On Sat, Mar 16, 2013 at 12:56 AM, Junio C Hamano gits...@pobox.com wrote: Nguyễn Thái Ngọc Duy pclo...@gmail.com writes: @@ -232,11 +228,18 @@ static int path_exists(struct tree *tree, const char *path) static void parse_pathspec_arg(const char **pathspec, struct

[PATCH] index-pack: fix buffer overflow caused by translations

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The translation of completed with %d local objects is put in a 48-byte buffer, which may be enough for English but not true for any translations. Convert it to use strbuf (i.e. no hard limit on translation length). Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- My bad, I should have

Re: git svn error Not a valid object name

2013-03-15 Thread Eric Wong
Adam Retter a...@exist-db.org wrote: Our public SourceForge Subversion repository is here: http://svn.code.sf.net/p/exist/code/trunk/eXist It's asking me for a username/password... We cloned that to the local server using rsync and are attempting to migrate to git using the following

Re: [PATCH] status: hint the user about -uno if read_directory takes too long

2013-03-15 Thread Duy Nguyen
On Thu, Mar 14, 2013 at 5:22 PM, Duy Nguyen pclo...@gmail.com wrote: On Wed, Mar 13, 2013 at 11:16 PM, Junio C Hamano gits...@pobox.com wrote: The noise this introduces to the test suite is a bit irritating and makes us think twice if this really a good change. I originally thought of two

[PATCH v3+ 1/5] wt-status: move strbuf into read_and_strip_branch()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The strbufs are placed outside read_and_strip_branch as a premature optimization: when it reads refs/heads/foo to strbuf and wants to return just foo, it could do so without memory movement. In return the caller must not use the returned pointer after releasing strbufs, which own the buffers that

[PATCH 01/12] pretty-formats.txt: wrap long lines

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/pretty-formats.txt | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt index 105f18a..66345d1 100644 ---

[PATCH 02/12] pretty: share code between format_decoration and show_decorations

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This also adds color support to format_decoration() Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- log-tree.c | 60 +--- log-tree.h | 3 ++ pretty.c | 19 +

[PATCH 03/12] utf8.c: move display_mode_esc_sequence_len() for use by other functions

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- utf8.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/utf8.c b/utf8.c index 1087870..82c2ddf 100644 --- a/utf8.c +++ b/utf8.c @@ -9,6 +9,20 @@ struct interval { int last; };

[PATCH 04/12] utf8.c: add utf8_strnwidth() with the ability to skip ansi sequences

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- utf8.c | 20 ++-- utf8.h | 1 + 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/utf8.c b/utf8.c index 82c2ddf..38322a1 100644 --- a/utf8.c +++ b/utf8.c @@ -266,18 +266,26 @@ int utf8_width(const char

[PATCH 06/12] pretty: get the correct encoding for --pretty:format=%e

2013-03-15 Thread Nguyễn Thái Ngọc Duy
parse_commit_header() provides the commit encoding for '%e' and it reads it from the re-encoded message, which contains the new encoding, not the original one in the commit object. Get the commit encoding from logmsg_reencode() instead. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH 09/12] pretty: add %C(auto) for auto-coloring on the next placeholder

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This is not simply convenient over $C(auto,xxx). Some placeholders (actually only one, %d) do multi coloring and we can't emit a multiple colors with %C(auto,xxx). Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/pretty-formats.txt | 3 ++- pretty.c

[PATCH 10/12] pretty: support padding placeholders, % % and %

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Either %, % or % standing before a placeholder specifies how many columns (at least as the placeholder can exceed it) it takes. Each differs on how spaces are padded: % pads on the right (aka left alignment) % pads on the left (aka right alignment) % pads both ways equally (aka centered)

[PATCH 11/12] pretty: support truncating in %, % and %

2013-03-15 Thread Nguyễn Thái Ngọc Duy
%(N,trunc) truncates the righ part after N columns and replace the last two letters with ... ltrunc does the same on the left. mtrunc cuts the middle out. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- Documentation/pretty-formats.txt | 6 +++-- pretty.c | 51

[PATCH 12/12] pretty: support % that steal trailing spaces

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This is pretty useful in `%(100)%s%Cred%(20)% an' where %s does not use up all 100 columns and %an needs more than 20 columns. By replacing %(20) with %(20), %an can steal spaces from %s. % understands escape sequences, so %Cred does not stop it from stealing spaces in %(100). Signed-off-by:

[PATCH 05/12] pretty: save commit encoding from logmsg_reencode if the caller needs it

2013-03-15 Thread Nguyễn Thái Ngọc Duy
The commit encoding is parsed by logmsg_reencode, there's no need for the caller to re-parse it again. The reencoded message now have the new encoding, not the original one. The caller would need to read commit object again before parsing. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com ---

[PATCH 07/12] utf8: keep NULs in reencode_string()

2013-03-15 Thread Nguyễn Thái Ngọc Duy
reencode_string() will be used in the next patch for re-encoding pretty output, which can contain NULs. Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- builtin/fast-export.c| 3 ++- builtin/mailinfo.c | 3 ++- compat/precompose_utf8.c | 2 +- notes.c | 4

[PATCH 08/12] pretty: two phase conversion for non utf-8 commits

2013-03-15 Thread Nguyễn Thái Ngọc Duy
Always assume format_commit_item() takes an utf-8 string for string handling simplicity (we can handle utf-8 strings, but can't with other encodings). If commit message is in non-utf8, or output encoding is not, then the commit is first converted to utf-8, processed, then output converted to

[PATCH 00/12] Layout control placeholders for pretty format

2013-03-15 Thread Nguyễn Thái Ngọc Duy
This series was ejected out of pu some time ago due to gcc warnings. I did not have time to look at it (and it worked ok for me so it was not a pressing matter). This re-roll should fix that. For demonstration, try git log --pretty='format:%C(auto)%h