[PATCH] gitweb: Improve diffs when filenames contain problem characters

2014-03-30 Thread Andrew Keller
When formatting a diff header line, be sure to escape the raw output from git for use as HTML. This ensures that when "problem characters" (&, <, >, ?, etc.) exist in filenames, gitweb displays them as text, rather than letting the browser interpret them as HTML. Reported-by: Dongsheng Song Sign

[PATCH v2.1] commit: add --ignore-submodules[=] parameter

2014-03-30 Thread Ronald Weiss
Git commit honors the 'ignore' setting from .gitmodules or .git/config, but didn't allow to override it from command line, like other commands do. Useful values for commit are 'all' (default) or 'none'. The others ('dirty' and 'untracked') have same effect as 'none', as commit is only interested

[PATCH v2] commit: add --ignore-submodules[=] parameter

2014-03-30 Thread Ronald Weiss
Git commit honors the 'ignore' setting from .gitmodules or .git/config, but didn't allow to override it from command line, like other commands do. Useful values for commit are 'all' (default) or 'none'. The others ('dirty' and 'untracked') have same effect as 'none', as commit is only interested

Re: [PATCH 1/2] commit: add --ignore-submodules[=] parameter

2014-03-30 Thread Jens Lehmann
Am 29.03.2014 23:50, schrieb Ronald Weiss: > Git commit honors the 'ignore' setting from .gitmodules or .git/config, > but didn't allow to override it from command line, like other commands do. > > Useful values for commit are 'all' (default) or 'none'. The others > ('dirty' and 'untracked') have

socket_perror() "bug"?

2014-03-30 Thread Thiago Farina
Hi, In imap-send.c:socket_perror() we pass |func| as a parameter, which I think it is the name of the function that "called" socket_perror, or the name of the function which generated an error. But at line 184 and 187 it always assume it was SSL_connect. Should we instead call perror() and ssl_s

[PATCH v3 2/3] patch-id: document new behaviour

2014-03-30 Thread Michael S. Tsirkin
Clarify that patch ID is now a sum of hashes, not a hash. Document --stable and --unstable flags. Signed-off-by: Michael S. Tsirkin --- changes from v2: explicitly list the kinds of changes against which patch ID is stable Documentation/git-patch-id.txt | 23 ++- 1

[PATCH v3 3/3] patch-id-test: test --stable and --unstable flags

2014-03-30 Thread Michael S. Tsirkin
Verify that patch ID is now stable against diff split and reordering. Signed-off-by: Michael S. Tsirkin --- Changes from v2: added test to verify patch ID is stable against diff splitting t/t4204-patch-id.sh | 117 1 file changed, 10

[PATCH v3 1/3] patch-id: make it stable against hunk reordering

2014-03-30 Thread Michael S. Tsirkin
Patch id changes if users 1. reorder file diffs that make up a patch or 2. split a patch up to multiple diffs that touch the same path (keeping hunks within a single diff ordered to make patch valid). As the result is functionally equivalent, a different patch id is surprising to many users. In pa

[PATCH v3 17/18] list-files: add -F/--classify

2014-03-30 Thread Nguyễn Thái Ngọc Duy
This appends an indicator after the file name if it's executable, a directory and so on, like in GNU ls. In fact append_indicator() is a rewrite from get_type_indicator() in coreutils.git commit 7326d1f1a67edf21947ae98194f98c38b6e9e527. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-l

git@vger.kernel.org

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 4 ++-- builtin/ls-files.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/git-list-files.txt b/Documentation/git-list-files.txt index 22084eb..c57129b 100644 --- a/Docume

[PATCH v3 14/18] list-files: sort output and remove duplicates

2014-03-30 Thread Nguyễn Thái Ngọc Duy
When you mix different file types, with ls-files you may get separate listing. For example, "ls-files -cm" will show file "abc" twice: one as part of cached list, one of modified list. With "ls" (and this patch) they will be in a single sorted list (easier for the eye). Duplicate entries are also

[PATCH v3 16/18] list-files: show directories as well as files

2014-03-30 Thread Nguyễn Thái Ngọc Duy
The index does not store directories explicitly (except submodules) so we have to figure them out from file list. The function show_directories() deliberately generates duplicate directories and expects the previous patch to remove duplicates. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/ls-f

[PATCH v3 15/18] list-files: do not show duplicate cached entries

2014-03-30 Thread Nguyễn Thái Ngọc Duy
With the current show_files() "list-files -tcm" will show foo.c M foo.c The first item is redundant. If "foo.c" is modified, we know it's in the cache. Introduce show_files_compact to do that because ls-files is plumbing and scripts may already depend on current display behavior. Another diffe

[PATCH v3 09/18] Add git-list-files, a user friendly version of ls-files and more

2014-03-30 Thread Nguyễn Thái Ngọc Duy
This is more user friendly version of ls-files: * it's automatically colored and columnized * it refreshes the index like all porcelain commands * it defaults to non-recursive behavior like ls * :(glob) is on by default so '*.c' means a.c but not a/b.c, use '**/*.c' for that. * auto pager The n

[PATCH v3 08/18] ls-files: support --max-depth

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-ls-files.txt | 7 +++ builtin/ls-files.c | 7 +++ 2 files changed, 14 insertions(+) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index a5a30c2..ad621b5 100644 --- a/Documentation/git-ls-

[PATCH v3 11/18] list-files: add -R/--recursive short for --max-depth=-1

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 4 builtin/ls-files.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Documentation/git-list-files.txt b/Documentation/git-list-files.txt index 3039e1e..5dccbbc 100644 --- a/Documentation/git-list

[PATCH v3 12/18] list-files: add -1 short for --no-column

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 3 +++ builtin/ls-files.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Documentation/git-list-files.txt b/Documentation/git-list-files.txt index 5dccbbc..725a236 100644 --- a/Documentation/git-list-

[PATCH v3 10/18] list-files: -u does not imply showing stages

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Showing full index entry information is something for ls-files only. The users of "git list-files" may just want to know what entries are not unmerged. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/ls-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/ls-files.

[PATCH v3 13/18] list-files: add -t back

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Tag "H" (cached) is not shown though because it's usually the majority and becomes noise. Not showing it makes the other tags stand out. -t is on by default if more than one file category is selected. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 6 ++ builtin/l

[PATCH v3 02/18] ls_colors.c: parse color.ls.* from config file

2014-03-30 Thread Nguyễn Thái Ngọc Duy
This is the second (and preferred) source for color information. This will override $LS_COLORS. Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 11 +++ ls_colors.c | 26 ++ 2 files changed, 37 insertions(+) diff --git a/Documentati

[PATCH v3 06/18] ls-files: add --color to highlight file names

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-ls-files.txt | 7 +++ builtin/ls-files.c | 38 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index c0

[PATCH v3 07/18] ls-files: add --column

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-ls-files.txt | 6 ++ builtin/ls-files.c | 28 2 files changed, 34 insertions(+) diff --git a/Documentation/git-ls-files.txt b/Documentation/git-ls-files.txt index f006fc1..a5a30c2 100644 --- a

[PATCH v3 04/18] ls_colors.c: highlight submodules like directories

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/config.txt | 3 ++- ls_colors.c | 8 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index 3fb754e..6bca55e 100644 --- a/Documentation/config.txt +++ b/Do

[PATCH v3 03/18] ls_colors.c: add a function to color a file name

2014-03-30 Thread Nguyễn Thái Ngọc Duy
The new function is based on print_color_indicator() from commit 7326d1f1a67edf21947ae98194f98c38b6e9e527 in coreutils.git. Signed-off-by: Nguyễn Thái Ngọc Duy --- color.h | 2 ++ ls_colors.c | 66 + 2 files changed, 68 insertions(

[PATCH v3 05/18] ls-files: buffer full item in strbuf before printing

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Buffering so that we can manipulate the strings (e.g. coloring) further before finally printing them. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/ls-files.c | 48 +++- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/builtin/ls-files

[PATCH v3 01/18] ls_colors.c: add $LS_COLORS parsing code

2014-03-30 Thread Nguyễn Thái Ngọc Duy
Reusing color settings from $LS_COLORS could give a native look and feel on file coloring. This code is basically from coreutils.git [1], rewritten to fit Git. As this is from GNU ls, the environment variable CLICOLOR is not tested. It is to be decided later whether we should ignore $LS_COLORS if

[PATCH v3 00/18] git-ls

2014-03-30 Thread Nguyễn Thái Ngọc Duy
All comments by Eric are fixed in v3. -F is added. And the command name is now list-files, not ls. 'ls' is saved for the user to make an alias with better default options. Nguyễn Thái Ngọc Duy (18): ls_colors.c: add $LS_COLORS parsing code ls_colors.c: parse color.ls.* from config file ls_co

[BUG] 'pread' : macro redefinition

2014-03-30 Thread Marat Radchenko
Stefan Zager chromium.org> writes: > > This adds a Windows implementation of pread. > diff --git a/compat/mingw.h b/compat/mingw.h > index 08b83fe..377ba50 100644 > --- a/compat/mingw.h > +++ b/compat/mingw.h > +ssize_t mingw_pread(int fd, void *buf, size_t count, off64_t offset); > +#define pre

[PATCH v4 3/3] parse-options: remove unused OPT_SET_PTR

2014-03-30 Thread Marat Radchenko
OPT_SET_PTR was never used since its creation in 2007 (commit db7244bd5be12e389badb9cec621dbbcfa11f59a). --- Documentation/technical/api-parse-options.txt | 4 parse-options.c | 5 - parse-options.h | 5 + t/t0040-parse-optio

[PATCH v4 1/3] MSVC: fix t0040-parse-options crash

2014-03-30 Thread Marat Radchenko
On 64-bit MSVC, pointers are 64 bit but `long` is only 32. Thus, casting string to `unsigned long`, which is redundand on other platforms, throws away important bits and when later cast to `intptr_t` results in corrupt pointer. This patch fixes test-parse-options by replacing harming cast with cor

[PATCH v4 2/3] parse-options: add cast to correct pointer type to OPT_SET_PTR

2014-03-30 Thread Marat Radchenko
Do not force users of OPT_SET_PTR to cast pointer to correct underlying pointer type by integrating cast into OPT_SET_PTR macro. Cast is required to prevent 'initialization makes integer from pointer without a cast' compiler warning. --- parse-options.h | 2 +- test-parse-options.c | 2 +- 2

[PATCH v4 0/3] Take four on fixing OPT_SET_PTR issues

2014-03-30 Thread Marat Radchenko
Patches summary: 1. Fix initial issue (incorrect cast causing crash on 64-bit MSVC) 2. Improve OPT_SET_PTR to prevent same errors in future 3. Purge OPT_SET_PTR away since nobody uses it *Optional* patch №3 is separated from №1 and №2 so that if someone someday decides to return OPT_SET_PTR back b

Re: [PATCH v2 1/3] patch-id: make it stable against hunk reordering

2014-03-30 Thread Michael S. Tsirkin
On Fri, Mar 28, 2014 at 12:20:13PM -0700, Junio C Hamano wrote: > "Michael S. Tsirkin" writes: > > > Patch id changes if you reorder hunks in a diff. > > As the result is functionally equivalent, this is surprising to many > > people. > > In particular, reordering hunks is helpful to make patches

[WIP/PATCH] status/commit: always show staged submodules regardless of ignore config

2014-03-30 Thread Jens Lehmann
Currently setting submodule..ignore and/or diff.ignoreSubmodules to "all" suppresses all output of submodule changes for the diff family, status and commit. For status and commit this is really confusing, as it even when the user chooses to record a new commit for an ignored submodule by adding it

Re: [PATCH 3/3] test-lib: '--run' to run only specific tests

2014-03-30 Thread Eric Sunshine
On Fri, Mar 28, 2014 at 3:05 AM, Ilya Bobyr wrote: > On 3/27/2014 8:36 PM, Eric Sunshine wrote: >> On Thu, Mar 27, 2014 at 6:32 AM, Ilya Bobyr wrote: >>> Allow better control of the set of tests that will be executed for a >>> single test suite. Mostly useful while debugging or developing as it

Re: [PATCH v3] MSVC: fix t0040-parse-options crash

2014-03-30 Thread Andreas Schwab
Junio C Hamano writes: > As OPT_SET_PTR() is about setting the pointer value to intptr_t defval, > a follow-up patch on top of this fix (see attached) may not be a bad > thing to have, but that patch alone will not fix this issue without > dropping the unneeded and unwanted cast to unsigned long.

Re: What's cooking in git.git (Mar 2014, #07; Fri, 28)

2014-03-30 Thread Junio C Hamano
Michael Haggerty writes: > On 03/28/2014 11:21 PM, Junio C Hamano wrote: >> Here are the topics that have been cooking. Commits prefixed with >> '-' are only in 'pu' (proposed updates) while commits prefixed with >> '+' are in 'next'. > > Junio, > > Have you overlooked my ref-transactions series