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

2013-03-14 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 --- builtin/l

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

2013-03-14 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 --- Documentation/git.txt | 4 ++-- pathsp

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

2013-03-14 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 42/45] pathspec: support :(literal) syntax for noglob pathspec

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

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

2013-03-14 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 'pr

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 remove_path(const char *name

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

2013-03-14 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 --- cache.h| 2 ++ path.c

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

2013-03-14 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 --- 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 +++ b/tree-diff.c @@ -224,7 +22

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

2013-03-14 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 --- builtin/add.c | 30 +++--- builtin/check-ign

[PATCH v1 35/45] Remove diff_tree_{setup,release}_paths

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/blame.c | 12 ++-- builtin/reset.c | 9 + diff.h | 2 -- notes-merge.c | 4 ++-- revision.c | 5 +++-- tree-diff.c | 18 -- 6 files changed, 20 insertions(+), 30 deletions(-) diff --git a/bui

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

2013-03-14 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 --- builtin/blame.c| 8 +--- builtin/log.c | 2 +- builtin/ls-files.c | 11 +-- diff-lib.c | 2 +- dir.c | 58 --

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 +++ b/builtin/add.c @@ -81,13 +8

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

2013-03-14 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 --- builtin/commit.c | 2 +- builtin/ls-files.c | 2 +- dir.c | 31 +++ dir.h | 2 +- 4 files changed, 18 insertions(+), 19 deletions(-) diff --gi

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 insertions(+), 13 dele

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 b/builtin/add.c index 2b20d7d..

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 b/builtin/checkout.c index 132b

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 100644 --- a/builtin

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 --- a/builtin/checkout.c +++ b/bu

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

2013-03-14 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 --- builtin/add.c | 2

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 @@ static void di

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 files changed, 19 inse

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 ab1c9e8..ec6fbe3 100644 ---

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

2013-03-14 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 N

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 "archive.h" #include "pa

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 "tree-walk.h" #include

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 +++ b/builtin/ls-files.c

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 --- a/builtin/rerere.c +++ b/builtin

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 +++ b/builtin/checkout.c @@ -45

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 @@ static char *prepa

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 --- a/builtin/commit.c +

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

2013-03-14 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-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 "refs.h" #includ

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

2013-03-14 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 convert

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

2013-03-14 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 calcula

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

2013-03-14 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 --- pathspec.c | 9 + pathspec.h | 1 + 2 files changed, 10 insertions(+) diff --git a/pa

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

2013-03-14 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 08/45] parse_pathspec: add PATHSPEC_PREFER_{CWD,FULL}

2013-03-14 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 f

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

2013-03-14 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 --- builtin/grep.c | 6 +++--- builtin/ls-tree.c | 10 +- builti

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

2013-03-14 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-14 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 --- dir.c | 1 + pathspec.c | 2 ++ pa

[PATCH v1 05/45] pathspec: add copy_pathspec

2013-03-14 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 --- builtin/mv.c | 13 +++-- pathspec.c | 8 pathspec.h | 1 + 3 files changed, 16 insertion

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 char *prefix, int p

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 02/45] clean: remove unused variable "seen"

2013-03-14 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- 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 cmd_clean(int argc, const ch

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

2013-03-14 Thread Nguyễn Thái Ngọc Duy
From: Andrew Wong The previous code did not diagnose an incorrectly spelled ":(top" as an error. Signed-off-by: Andrew Wong Signed-off-by: Junio C Hamano Signed-off-by: Nguyễn Thái Ngọc Duy --- setup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c

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

2013-03-14 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 (44

Re: [RFD] Combine diff improvements

2013-03-14 Thread Junio C Hamano
Antoine Pelisse writes: > While if we invert the two parents order we will have: > - 3 > --1 > --2 > - 4 > -3 > -4 > > While clearly, in both cases, the optimal solution would be close to: > - 3 > --1 > --2 > -3 > --4 We should shoot for better readability as the primary goal. When I am view

Re: Tag peeling peculiarities

2013-03-14 Thread Michael Haggerty
On 03/14/2013 02:40 PM, Jeff King wrote: > On Thu, Mar 14, 2013 at 12:28:53PM +0100, Michael Haggerty wrote: > >> Perhaps if peel_ref() *were* 100% reliable, we might be able to use it >> to avoid object lookups in some other places. > > In theory, some of the many uses of deref_tag could be adop

[PATCH] pull: Apply -q and -v options to rebase mode as well

2013-03-14 Thread Peter Eisentraut
git pull passed -q and -v only to git merge, but they can be useful for git rebase as well, so pass them there, too. In particular, using -q shuts up the "Already up-to-date." message. Add test cases to prove it. Signed-off-by: Peter Eisentraut --- git-pull.sh |2 +- t/t5521-pu

Re: [ANN] git-arr 0.11

2013-03-14 Thread Alberto Bertogli
On Thu, Mar 14, 2013 at 01:43:16PM +0100, Matthieu Moy wrote: > Alberto Bertogli writes: > > > I wanted to let you know about git-arr, which is a git repository > > browser that can generate static HTML instead of having to run > > dynamically. > > Can it run incrementally? I mean, if you have l

Re: Delivery Status Notification (Failure)

2013-03-14 Thread Harring Figueiredo
Got it! >From the recommended site: -- In the English singular case, the number – always 1 – can be replaced with "one": printf (ngettext ("One file removed", "%d files removed", n), n); This works because the ‘printf’ function discards excess arguments that are not consumed by the for

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

2013-03-14 Thread Erik Faye-Lund
On Thu, Mar 14, 2013 at 11:45 PM, Junio C Hamano wrote: > Johannes Schindelin writes: > >> Apparently, ftps is also handled by cURL and most likely requires SSL. >> >> How about optimizing for the common case and instead of prefixcmp(url, >> "https:")) ask for !prefixcmp(url, "http:")? > > I thin

Re: [RFD] Combine diff improvements

2013-03-14 Thread Junio C Hamano
Antoine Pelisse writes: > I would like to discuss some improvements. ;-) > The current implementation doesn't look for optimal solution but for the > easiest/greedy solution. Yes, you nailed it. > Does it make any sense? And is it worth implementing? Probably yes, and definitely. -- To unsu

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

2013-03-14 Thread Junio C Hamano
Johannes Schindelin writes: > Apparently, ftps is also handled by cURL and most likely requires SSL. > > How about optimizing for the common case and instead of prefixcmp(url, > "https:")) ask for !prefixcmp(url, "http:")? I think that is a very sensible way to go. As to ALL vs DEFAULT, given t

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

2013-03-14 Thread Johannes Schindelin
Hi Junio, On Thu, 14 Mar 2013, Junio C Hamano wrote: > Erik Faye-Lund writes: > > >> I wonder whether we want to have something like this instead: > >> > >> flags = CURL_GLOBAL_ALL; > >> if (prefixcmp(url, "https:")) > >> flags &= ^CURL_GLOBAL_SSL; > >> c

Re: [PATCH v2 3/3] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread Junio C Hamano
John Keeping writes: >> > +for f in file file2 sub/sub >> > +do >> > + echo "$f" >> > + readlink "$2/$f" >> > +done >actual >> > +EOF >> >> When you later want to enhance the test to check a combination of >> difftool arguments where some paths are expected to become links and >> others are ex

Re: [PATCH v2 3/3] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread John Keeping
On Thu, Mar 14, 2013 at 02:28:31PM -0700, Junio C Hamano wrote: > John Keeping writes: > > > diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh > > index 3aab6e1..70e09b6 100755 > > --- a/t/t7800-difftool.sh > > +++ b/t/t7800-difftool.sh > > @@ -340,6 +340,28 @@ test_expect_success PERL 'diff

Re: Delivery Status Notification (Failure)

2013-03-14 Thread Junio C Hamano
Harring Figueiredo writes: > Just want to confirm that this is not a bug: > ... > printf_ln(Q_("The bundle requires this ref", > "The bundle requires these %d refs", > r->nr), >r->nr

Re: Delivery Status Notification (Failure)

2013-03-14 Thread Harring Figueiredo
Hello folks, Just want to confirm that this is not a bug: bunde.c: 443 printf_ln(Q_("The bundle requires this ref", "The bundle requires these %d refs", r->nr), r->nr); seem

Re: [PATCH 2/2] entry: fix filter lookup

2013-03-14 Thread Junio C Hamano
John Keeping writes: > diff --git a/t/t2003-checkout-cache-mkdir.sh b/t/t2003-checkout-cache-mkdir.sh > index 63fd0a8..4c97468 100755 > --- a/t/t2003-checkout-cache-mkdir.sh > +++ b/t/t2003-checkout-cache-mkdir.sh > @@ -90,4 +90,30 @@ test_expect_success SYMLINKS 'use --prefix=tmp- where > tmp-p

Re: [PATCH v3] Allow combined diff to ignore white-spaces

2013-03-14 Thread Junio C Hamano
Antoine Pelisse writes: > +test_expect_success 'check combined output (no ignore space)' ' > + git show >actual.tmp && > + sed -e "1,/^@@@/d" < actual.tmp >actual && > + tr -d Q <<-\EOF >expected && > + --always coalesce > + - eol space coalesce > + - space change coalesce

Re: [PATCH v2 3/3] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread Junio C Hamano
John Keeping writes: > diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh > index 3aab6e1..70e09b6 100755 > --- a/t/t7800-difftool.sh > +++ b/t/t7800-difftool.sh > @@ -340,6 +340,28 @@ test_expect_success PERL 'difftool --dir-diff' ' > stdin_contains file ' > > +write_script .git/CH

Re: [PATCH v2 2/3] difftool: avoid double slashes in symlink targets

2013-03-14 Thread Junio C Hamano
John Keeping writes: > When we add tests for symlinks in "git difftool --dir-diff" it's easier > to check the target path if we don't have to worry about double slashes > separating directories. Remove the trailing slash (if present) from > $workdir before creating the symlinks in order to avoid

[PATCH v3] Allow combined diff to ignore white-spaces

2013-03-14 Thread Antoine Pelisse
Currently, it's not possible to use the space-ignoring options (-b, -w, --ignore-space-at-eol) with combined diff. It makes it pretty impossible to read a merge between a branch that changed all tabs to spaces, and a branch with functional changes. Pass diff flags to diff engine, so that combined

[PATCH v2 3/3] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread John Keeping
Some users like to edit files in their diff tool when using "git difftool --dir-diff --symlink" to compare against the working tree but difftool currently only created symlinks when a file contains unstaged changes. Change this behaviour so that symlinks are created whenever the right-hand side of

[PATCH v2 2/3] difftool: avoid double slashes in symlink targets

2013-03-14 Thread John Keeping
When we add tests for symlinks in "git difftool --dir-diff" it's easier to check the target path if we don't have to worry about double slashes separating directories. Remove the trailing slash (if present) from $workdir before creating the symlinks in order to avoid this. Signed-off-by: John Kee

[PATCH v2 1/3] git-difftool(1): fix formatting of --symlink description

2013-03-14 Thread John Keeping
Signed-off-by: John Keeping --- Documentation/git-difftool.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-difftool.txt b/Documentation/git-difftool.txt index e0e12e9..e575fea 100644 --- a/Documentation/git-difftool.txt +++ b/Documentation/git-difftoo

[PATCH v2 0/3] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread John Keeping
Changes since v1: - A new second patch to make it safer to compare symlink targets in tests - Test in patch 3 (formerly patch 2) re-written thanks to feedback from David Aguilar This series is based on next, although I think Git's clever enough to ignore the changes in the context of the t7800

[PATCH 2/2] entry: fix filter lookup

2013-03-14 Thread John Keeping
When looking up the stream filter, write_entry() should be passing the path of the file in the repository, not the path to which the content is going to be written. This allows the file to be correctly looked up against the .gitattributes files in the working tree. This change makes the streaming

[PATCH 1/2] t2003: modernize style

2013-03-14 Thread John Keeping
- Description goes on the test_expect_* line - Open SQ of test goes on the test_expect_* line - Closing SQ of test goes on its own line - Use TAB for indent Also remove three comments that appear to relate to the development of the patch before it was committed. Signed-off-by: John Keeping ---

[PATCH 0/2] checkout-index: fix .gitattributes handling with --prefix

2013-03-14 Thread John Keeping
This is from the recent "difftool --dir-diff" discussion. With these patches applied I think "difftool --dir-diff" should correctly apply filters to the files that it checks out with no changes to the git-difftool code. John Keeping (2): t2003: modernize style entry: fix streaming filter path

git merge problem

2013-03-14 Thread Коньков Евгений
Hi I have started branch from master then on master were changes in whitespace (code formatting) in branch on that lines changes were not. Now when I try to merge branch to master I get lost changes at space on master So I try to ignore space change git merge -Xignore-space-change my_branch I h

[no subject]

2013-03-14 Thread fmh
binqOz6kpO7KB.bin Description: iso-8859-1

Re: [PATCH v3 3/3] git-merge-one-file: revise merge error reporting

2013-03-14 Thread Kevin Bracey
On 14/03/2013 19:31, Kevin Bracey wrote: On 14/03/2013 16:56, Junio C Hamano wrote: Well, yes, but I would assume that we would forcibly select normal diff here somehow, if we aren't already. We should be - turning ABCDEFGH vs ABCD into ABCD is silly. Doh. But anyway, we don't want to waste

Re: difftool -d symlinks, under what conditions

2013-03-14 Thread Junio C Hamano
John Keeping writes: > The path passed to get_stream_filter is only used to decide what filters > apply to the file, so shouldn't it be using "ce->name" and not "path" > for the same reason that the call to convert_to_working_tree() further > down the same function does? Correct and well spotted

Re: [PATCH v3 3/3] git-merge-one-file: revise merge error reporting

2013-03-14 Thread Kevin Bracey
On 14/03/2013 16:56, Junio C Hamano wrote: Kevin Bracey writes: Maybe the virtual base itself should be different. Maybe it should put a ??? marker in place of every unique line. So you get: Left ABCEFGH Right XABCDEFJH -> Merge result <|X>ABC<|D>EFH VBase ?ABC?EF??H That actually fee

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

2013-03-14 Thread Junio C Hamano
Johannes Schindelin writes: > Hence my earlier suggestion (with the obvious tyop '^' instead of '~'). > You will also find the information in my mail (unless you plonk my mails) > that ... Our mails simply crossed. Comparing the two messages I think we are in complete agreement. -- To unsubscr

Re: difftool -d symlinks, under what conditions

2013-03-14 Thread John Keeping
On Thu, Mar 14, 2013 at 09:43:00AM +, John Keeping wrote: > On Wed, Mar 13, 2013 at 09:45:47AM -0700, Junio C Hamano wrote: > > Does the temporary checkout correctly apply the smudge filter and > > crlf conversion, by the way? If not, regardless of the topic in > > this thread, that may want t

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

2013-03-14 Thread Johannes Schindelin
Hi Junio, On Thu, 14 Mar 2013, Junio C Hamano wrote: > Erik Faye-Lund writes: > > > diff --git a/http.c b/http.c > > index 3b312a8..528a736 100644 > > --- a/http.c > > +++ b/http.c > > @@ -343,7 +343,8 @@ void http_init(struct remote *remote, const char *url, > > int proactive_auth) > > > >

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

2013-03-14 Thread Junio C Hamano
Erik Faye-Lund writes: >> I wonder whether we want to have something like this instead: >> >> flags = CURL_GLOBAL_ALL; >> if (prefixcmp(url, "https:")) >> flags &= ^CURL_GLOBAL_SSL; >> curl_global_init(flags); >> >> I do see that CURL_GLOBAL_ALL is #define'

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

2013-03-14 Thread Junio C Hamano
Erik Faye-Lund writes: > diff --git a/http.c b/http.c > index 3b312a8..528a736 100644 > --- a/http.c > +++ b/http.c > @@ -343,7 +343,8 @@ void http_init(struct remote *remote, const char *url, > int proactive_auth) > > git_config(http_options, NULL); > > - curl_global_init(CURL_GLO

[PATCH] Make core.sharedRepository work under cygwin 1.7

2013-03-14 Thread Torsten Bögershausen
When core.sharedRepository is used, set_shared_perm() in path.c needs lstat() to return the correct POSIX permissions. The default for cygwin is core.ignoreCygwinFSTricks = false, which means that a simplified and fast implementation of lstat() is used. Especially the file permission bits are wro

Re: [PATCH] Allow combined diff to ignore white-spaces

2013-03-14 Thread Antoine Pelisse
On Thu, Mar 14, 2013 at 4:31 PM, Junio C Hamano wrote: > Johannes Sixt writes: > >> This form of 'echo' is not sufficiently portable. How about: >> >> tr -d Q <<-\EOF >test && >> >> always coalesce >> eol space coalesce Q >> ... >> EOF > > Much better. > >>> +test_expect_s

Re: [PATCH v2] git-tag: Allow --points-at syntax to create a tag pointing to specified commit

2013-03-14 Thread Junio C Hamano
Michal Novotny writes: > Oh, interesting. It's working now and I didn't know that as it was not > working some time ago I've been trying this approach. Maybe it's been > added recently... Pretty much from the very beginning "git tag " has been the way to create a tag, with missing defaulting t

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

2013-03-14 Thread Erik Faye-Lund
On Thu, Mar 14, 2013 at 4:23 PM, Johannes Schindelin wrote: > Hi kusma, > > On Thu, 14 Mar 2013, Erik Faye-Lund wrote: > >> Since ancient times, we have been calling curl_global_init with the >> CURL_GLOBAL_ALL-flag, which initializes SSL (and the Win32 socket >> stack on Windows). >> >> Initializ

Re: [PATCH] Allow combined diff to ignore white-spaces

2013-03-14 Thread Junio C Hamano
Johannes Sixt writes: > This form of 'echo' is not sufficiently portable. How about: > > tr -d Q <<-\EOF >test && > > always coalesce > eol space coalesce Q > ... > EOF Much better. >> +test_expect_success 'check combined output (no ignore space)' ' >> +git show | te

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

2013-03-14 Thread Johannes Schindelin
Hi kusma, On Thu, 14 Mar 2013, Erik Faye-Lund wrote: > Since ancient times, we have been calling curl_global_init with the > CURL_GLOBAL_ALL-flag, which initializes SSL (and the Win32 socket > stack on Windows). > > Initializing SSL takes quite some time on Windows, so let's avoid > doing it whe

Re: [PATCH 2/2] difftool --dir-diff: symlink all files matching the working tree

2013-03-14 Thread Junio C Hamano
John Keeping writes: > +write_script .git/CHECK_SYMLINKS <<\EOF && > +#!/bin/sh > +test -L "$2/file" && > +test -L "$2/file2" && > +test -L "$2/sub/sub" > +echo $? > +EOF Please drop "#!/bin/sh" from the above; it is misleading and pointless. After all, you are using "write_script" to avoid hav

Re: Tag peeling peculiarities

2013-03-14 Thread Junio C Hamano
Jeff King writes: > On Thu, Mar 14, 2013 at 01:24:48AM -0400, Jeff King wrote: > >> So the only question is how much work we want to put into making sure >> the new reader handles the old writer correctly. Doing 2c is obviously >> more rigorous, and it is not that much work to add the fully-packe

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

2013-03-14 Thread Junio C Hamano
Duy Nguyen writes: > On Wed, Mar 13, 2013 at 10:21 PM, Torsten Bögershausen wrote: >>> + statusUno:: >>> + If collecting untracked files in linkgit:git-status[1] >>> + takes more than 2 seconds, hint the user that the option >>> + `-uno` could be used to s

Re: [PATCH v3 3/3] git-merge-one-file: revise merge error reporting

2013-03-14 Thread Junio C Hamano
Kevin Bracey writes: > I disagree here. At the minute, it does set ret to 1 (but further down > the code - bringing it up here next to the "ERROR" print clarifies > that), and will report the merge as failed, conflict in the 3-way > merge or not. Which I think is correct. OK. I agree that forci

Re: [PATCH v2] git-tag: Allow --points-at syntax to create a tag pointing to specified commit

2013-03-14 Thread Michal Novotny
On 03/14/2013 02:36 PM, John Keeping wrote: > On Thu, Mar 14, 2013 at 01:34:54PM +0100, Michal Novotny wrote: >> This patch adds the option to specify SHA-1 commit hash using --points-at >> option of git tag to create a tag pointing to a historical commit. > What does this do that "git tag " does

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

2013-03-14 Thread Erik Faye-Lund
On Thu, Mar 14, 2013 at 2:51 PM, Erik Faye-Lund wrote: > Since ancient times, we have been calling curl_global_init with the > CURL_GLOBAL_ALL-flag, which initializes SSL (and the Win32 socket > stack on Windows). > > Initializing SSL takes quite some time on Windows, so let's avoid > doing it whe

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

2013-03-14 Thread Erik Faye-Lund
Since ancient times, we have been calling curl_global_init with the CURL_GLOBAL_ALL-flag, which initializes SSL (and the Win32 socket stack on Windows). Initializing SSL takes quite some time on Windows, so let's avoid doing it when it's not needed. timing of echo "" | ./git-remote-http.exe origi

Re: Tag peeling peculiarities

2013-03-14 Thread Jeff King
On Thu, Mar 14, 2013 at 12:28:53PM +0100, Michael Haggerty wrote: > Perhaps if peel_ref() *were* 100% reliable, we might be able to use it > to avoid object lookups in some other places. In theory, some of the many uses of deref_tag could be adopted. However, we do not always have the refname han

Re: [PATCH v2] git-tag: Allow --points-at syntax to create a tag pointing to specified commit

2013-03-14 Thread John Keeping
On Thu, Mar 14, 2013 at 01:34:54PM +0100, Michal Novotny wrote: > This patch adds the option to specify SHA-1 commit hash using --points-at > option of git tag to create a tag pointing to a historical commit. What does this do that "git tag " doesn't? > This was pretty easy in the past for the l

Re: [PATCH v3 00/13] Exclude optimizations

2013-03-14 Thread Duy Nguyen
Just thinking out loud. If I'm not mistaken, a directory's mtime is only changed when files are added are removed in that directory. And that's all we care about in read_directory. So if we keep a secondary index containing the list of all (tracked and untracked) .gitignore files and all untracked

Re: [ANN] git-arr 0.11

2013-03-14 Thread Matthieu Moy
Alberto Bertogli writes: > I wanted to let you know about git-arr, which is a git repository > browser that can generate static HTML instead of having to run > dynamically. Can it run incrementally? I mean, if you have launched it for one revision, does re-running it on the next revision regener

Re: [PATCH 2/2] add: respect add.updateroot config option

2013-03-14 Thread Matthieu Moy
Junio C Hamano writes: > It still has the same "the user saw > it mentioned on stackoverflow and sets it without understanding that > the behaviour is getting changed" effect. I'm not so worried about this point, as the mechanism is temporary, and it will take time before answers on stackoverflo

[PATCH v2] git-tag: Allow --points-at syntax to create a tag pointing to specified commit

2013-03-14 Thread Michal Novotny
This patch adds the option to specify SHA-1 commit hash using --points-at option of git tag to create a tag pointing to a historical commit. This was pretty easy in the past for the lightweight tags that are just simple pointers (by creating .git/refs/tags/$tagname with SHA-1 hash) but it was not

  1   2   >