Re: [PATCH] git-new-workdir: support submodules

2015-01-25 Thread Junio C Hamano
Craig Silverstein writes: > This patch, in adding submodule support, I expect would be > similarly useful to people even though it, also, imposes those > same constraints to the submodule's config files. I would expect that you would see exactly the same issue with Duy's multiple work tree serie

Re: [PATCH] git-new-workdir: support submodules

2015-01-25 Thread Craig Silverstein
> But then, you are saying that the update does not fix these existing > issues around submodule support. So...? I guess my point is that the existing contrib script has proven to be useful to people, even though it imposes these constraints on clients wrt the config file (namely, you can't have

Re: [PATCH] win32: syslog: prevent potential realloc memory leak

2015-01-25 Thread Junio C Hamano
Erik Faye-Lund writes: > Sorry for very late reply. I had a bug in my mail rules that caused > this email to skip my inbox. That should be fixed now. > > On Mon, Dec 15, 2014 at 7:11 PM, Junio C Hamano wrote: > ... >> Regardless of that funny %1 business, I notice in >> >> >> http://msdn.mi

Re: [PATCH] wincred: fix get credential if username has @

2015-01-25 Thread Junio C Hamano
Erik Faye-Lund writes: > Sorry for the extremely delayed reply, I had a bug in my mail-filters. > Hopefully fixed now. > > ... > > I noticed the breakage myself around the same time, and posted about it here: > > https://groups.google.com/d/msg/msysgit/YVuCqmwwRyY/HULHj5OoE88J > > Unfortunately,

Re: [PATCH] git-new-workdir: support submodules

2015-01-25 Thread Junio C Hamano
Craig Silverstein writes: > } Or one new-workdir checkout's branch may check out a top-level > } project from today while the other one may have a top-level project > } from two years ago, > > This is also true, but just as much a problem with the 'git > new-workdir' script as it existed before m

Re: [PATCH] win32: syslog: prevent potential realloc memory leak

2015-01-25 Thread Erik Faye-Lund
Sorry for very late reply. I had a bug in my mail rules that caused this email to skip my inbox. That should be fixed now. On Mon, Dec 15, 2014 at 7:11 PM, Junio C Hamano wrote: > Arjun Sreedharan writes: > >> use a temporary variable to free the memory in case >> realloc() fails. >> >> Signed-o

Re: [PATCH] wincred: fix get credential if username has @

2015-01-25 Thread Erik Faye-Lund
Sorry for the extremely delayed reply, I had a bug in my mail-filters. Hopefully fixed now. On Wed, Nov 19, 2014 at 11:41 PM, Junio C Hamano wrote: > Aleksey Vasenev writes: > >>> To: git@vger.kernel.org >>> Cc: Junio C Hamano , Aleksey Vasenev > > Sorry, but I am hardly qualified to review thi

Re: [PATCH 21/21] t3080: tests for git-list-files

2015-01-25 Thread Eric Sunshine
On Sun, Jan 25, 2015 at 7:37 AM, Nguyễn Thái Ngọc Duy wrote: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > diff --git a/t/t3080-list-files.sh b/t/t3080-list-files.sh > new file mode 100755 > index 000..6313dd9 > --- /dev/null > +++ b/t/t3080-list-files.sh > +test_expect_success 'no dups' ' >

Re: [PATCH 17/21] list-files: show directories as well as files

2015-01-25 Thread Eric Sunshine
On Sun, Jan 25, 2015 at 7:37 AM, Nguyễn Thái Ngọc Duy wrote: > The index does not store directories explicitly (except submodules) so > we have to figure them out from file list when output lis depth-limited. > > The function show_as_directory() deliberately generates duplicate > directories and e

[PATCH 20/21] list-files: -M aka diff-cached

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/ls-files.c | 67 +++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 697a307..b04c712 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-fi

[PATCH 21/21] t3080: tests for git-list-files

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t3080-list-files.sh (new +x) | 122 + t/t3080/color_ls (new) | 3 + t/t3080/ls_colors (new)| 2 + 3 files changed, 127 insertions(+) create mode 100755 t/t3080-list-files.sh create mode 100644

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

2015-01-25 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

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 475c6

[PATCH 15/21] list-files: sort output and remove duplicates

2015-01-25 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 16/21] list-files: do not show duplicate cached entries

2015-01-25 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 13/21] list-files: add -1 short for --no-column

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 8d285c1..1c0c877 10064

[PATCH 17/21] list-files: show directories as well as files

2015-01-25 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 when output lis depth-limited. The function show_as_directory() deliberately generates duplicate directories and expects the previous patch to remove duplicates. Signed-off-by: Nguyễn

[PATCH 14/21] list-files: add -t back

2015-01-25 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 Signed-off-by: Junio C Hamano --- Documentation/git-list-f

[PATCH 10/21] list-files: make alias 'ls' default to 'list-files'

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-list-files.txt | 3 ++- config.c | 8 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Documentation/git-list-files.txt b/Documentation/git-list-files.txt index 3039e1e..2182a38 100644 --- a/D

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

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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/Document

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

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 99328b9..3d921eb 100

[PATCH 09/21] list-files: a user friendly version of ls-files and more

2015-01-25 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

[PATCH 12/21] list-files: add -R/--recursive short for --max-depth=-1

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 2182a38..8d285c1 1006

[PATCH 11/21] list-files: -u does not imply showing stages

2015-01-25 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 Signed-off-by: Junio C Hamano --- builtin/ls-files.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH 07/21] ls-files: add --column

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 inde

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

2015-01-25 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 Signed-off-by: Junio C Hamano --- builtin/ls-files.c | 48 +++- 1 file changed, 35 insertions(+), 13 deletions(-)

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

2015-01-25 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 Signed-off-by: Junio C Hamano --- color.h | 2 ++ ls_colors.c | 66 +

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

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- 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 2090866..2290c47 100644 --- a/Do

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

2015-01-25 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 Signed-off-by: Junio C Hamano --- Documentation/config.txt | 11 +++ ls_colors.c | 26 ++ 2 files changed, 37 insertio

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

2015-01-25 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 00/21] nd/list-files updates

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Changes since 'pu' version: - refresh_index() in 09/21 is set not to show "XXX: needs merge" messages, cluttering "list-files -u" output - new patch 10/21 to add a default alias 'ls' to 'list-files', of course overridable by the user - fix "list-files -u" not showing anything because s