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

2015-01-25 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com 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 gits...@pobox.com wrote: ... Regardless of that funny %1 business, I notice

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

2015-01-25 Thread Junio C Hamano
Erik Faye-Lund kusmab...@gmail.com 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

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 pclo...@gmail.com 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

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 pclo...@gmail.com wrote: Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com --- 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

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

2015-01-25 Thread Junio C Hamano
Craig Silverstein csilv...@khanacademy.org 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

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

2015-01-25 Thread Junio C Hamano
Craig Silverstein csilv...@khanacademy.org 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

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

[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

[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 pclo...@gmail.com --- 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

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-ls-files.txt | 7 +++ builtin/ls-files.c | 38 +++--- 2 files changed, 42 insertions(+), 3 deletions(-) diff --git

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/config.txt | 11 +++ ls_colors.c | 26

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- 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

[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

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- color.h | 2 ++ ls_colors.c | 66

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-ls-files.txt | 7 +++ builtin/ls-files.c | 7 +++ 2 files changed, 14 insertions(+) diff --git a/Documentation/git-ls-files.txt

[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 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 pclo...@gmail.com Signed-off-by: Junio C Hamano

[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 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

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-list-files.txt | 3 +++ builtin/ls-files.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/Documentation/git-list-files.txt

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-ls-files.txt | 6 ++ builtin/ls-files.c | 28 2 files changed, 34 insertions(+) diff --git a/Documentation/git-ls-files.txt

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- Documentation/git-list-files.txt | 4 builtin/ls-files.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Documentation/git-list-files.txt

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/ls-files.c | 2 +- 1 file

[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 pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- builtin/ls-files.c | 48 +++- 1 file

[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 pclo...@gmail.com --- 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

[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 pclo...@gmail.com --- 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

[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 pclo...@gmail.com ---

[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 19/21] list-files -F: show submodules with the new indicator ''

2015-01-25 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Junio C Hamano gits...@pobox.com --- 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

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 gits...@pobox.com wrote: Aleksey Vasenev margtu-f...@ya.ru writes: To: git@vger.kernel.org Cc: Junio C Hamano gits...@pobox.com, Aleksey Vasenev