Re: [PATCH] diff-tree: obey the color.ui configuration

2017-12-29 Thread Jeff King
On Fri, Dec 29, 2017 at 06:16:31PM -0500, Todd Zullinger wrote: > Ævar Arnfjörð Bjarmason wrote: > > No idea how to test this, in particular trying to pipe the output of > > color.ui=never v.s. color.ui=auto to a file as "auto" will disable > > coloring when it detects a pipe, but this fixes the

Re: [PATCH] Add shell completion for git remote rm

2017-12-29 Thread Todd Zullinger
Ævar Arnfjörð Bjarmason wrote: >> I think adding 'rm' to completion definitely counts as advertisement. >> It doesn't have much practical use, after all: typing 'rm' with >> completion is actually one more keystroke than without (rm vs. rm). > > This is only one use of the completion interface,

possible completion bug with --set-upstream-to=

2017-12-29 Thread Ernesto Alfonso
Whenever I type the last to complete origin/master, as in below: > git branch --set-upstream-to=orig what I get is: > git branch origin/master instead of the expected: > git branch --set-upstream-to=origin/master git version and OS: >git version 2.1.4 > >Distributor ID:Debian

Re: [PATCH] Add shell completion for git remote rm

2017-12-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Dec 29 2017, SZEDER Gábor jotted: >> Keith Smiley wrote: >> > It looks like that was just about preferring remove in documentation >> > and the like, I think it would still make sense to have both for >> > completion since rm is still supported. >> >> I read it as a first step in a long

Re: [PATCH] Add shell completion for git remote rm

2017-12-29 Thread Keith Smiley
The goal of this fix isn't to complete rm itself (although that is a side effect), it's to complete the remote names after you type rm. Without this patch doing this: git remote rm Attempts to complete the options for `git remote` instead of the remote names. -- Keith Smiley On 12/29,

Re: [PATCH] diff-tree: obey the color.ui configuration

2017-12-29 Thread Todd Zullinger
Ævar Arnfjörð Bjarmason wrote: > No idea how to test this, in particular trying to pipe the output of > color.ui=never v.s. color.ui=auto to a file as "auto" will disable > coloring when it detects a pipe, but this fixes the issue. You might be able to use similar methods as those Jeff used in

[PATCH] perf: amend the grep tests to test grep.threads

2017-12-29 Thread Ævar Arnfjörð Bjarmason
Ever since 5b594f457a ("Threaded grep", 2010-01-25) the number of threads git-grep uses under PTHREADS has been hardcoded to 8, but there's no performance test to check whether this is an optimal setting. Amend the existing tests for the grep engines to support a mode where this can be tested,

[PATCH] diff-tree: obey the color.ui configuration

2017-12-29 Thread Ævar Arnfjörð Bjarmason
Before git-bisect exits it calls `diff-tree --pretty --stat $commit` on the bad commit. This would always print the "commit" line with coloring despite color.ui being set to "never". Teach diff-tree to look at the git_color_config() configuration. I initially tried to add this to

Re: [PATCH] Add shell completion for git remote rm

2017-12-29 Thread SZEDER Gábor
> Keith Smiley wrote: > > It looks like that was just about preferring remove in documentation > > and the like, I think it would still make sense to have both for > > completion since rm is still supported. > > I read it as a first step in a long process to eventually > remove 'remote rm', but

Re: [BUG] git bisect colour output contrary to configuration

2017-12-29 Thread Ævar Arnfjörð Bjarmason
On Fri, Dec 29 2017, zef...@fysh.org jotted: > My ~/.gitconfig sets color.ui=never, which should prevent attempts > at colouring output from all git commands. I do not have any git > configuration enabling colour in any situation (such as for specific > commands). But when a git bisect

Re: [PATCH 2/2] travis-ci: record and skip successfully built trees

2017-12-29 Thread SZEDER Gábor
On Fri, Dec 29, 2017 at 9:03 PM, SZEDER Gábor wrote: Or print it in a different color? Maybe red? See: https://travis-ci.org/szeder/git/jobs/322247836#L622-L625 >>> >>> I considered using color for the first line, but then didn't do it, >>> because I didn't

[BUG] git bisect colour output contrary to configuration

2017-12-29 Thread Zefram
My ~/.gitconfig sets color.ui=never, which should prevent attempts at colouring output from all git commands. I do not have any git configuration enabling colour in any situation (such as for specific commands). But when a git bisect completes, the output identifying the first bad commit

Re: [PATCH 2/2] travis-ci: record and skip successfully built trees

2017-12-29 Thread SZEDER Gábor
On Thu, Dec 28, 2017 at 12:16 PM, Lars Schneider wrote: > >> On 28 Dec 2017, at 00:00, SZEDER Gábor wrote: >> >> On Wed, Dec 27, 2017 at 8:15 PM, Lars Schneider >> wrote: >>> On 27 Dec 2017, at 17:49, SZEDER Gábor

Re: [PATCH v2 4/5] convert: add support for 'checkout-encoding' attribute

2017-12-29 Thread Torsten Bögershausen
I probably need to look at convert.c more closer, some other comments inline. On Fri, Dec 29, 2017 at 04:22:21PM +0100, lars.schnei...@autodesk.com wrote: > From: Lars Schneider > > Git and its tools (e.g. git diff) expect all text files in UTF-8 > encoding. Git will

Re: [ANNOUNCE] Git v2.16.0-rc0

2017-12-29 Thread Paul Smith
On Thu, 2017-12-28 at 20:30 -0800, Junio C Hamano wrote: > * The way "git worktree add" determines what branch to create from >where and checkout in the new worktree has been updated a bit. Does this include the enhancements published a few weeks ago to allow worktrees to be created directly

Re: [PATCH v2 1/5] strbuf: add xstrdup_toupper()

2017-12-29 Thread Lars Schneider
> On 29 Dec 2017, at 16:56, Torsten Bögershausen wrote: > > On Fri, Dec 29, 2017 at 04:22:18PM +0100, lars.schnei...@autodesk.com wrote: >> From: Lars Schneider >> >> Create a copy of an existing string and make all characters upper case. >> Similar

Re: [PATCH] completion: restore 'remote rm'

2017-12-29 Thread Keith Smiley
Updated: e17dba8fe1 ("remote: prefer subcommand name 'remove' to 'rm'", 2012-09-06) removed the 'rm' subcommand from completion. The 'remote rm' subcommand is still supported and not planned to be removed. Offer completions for it. Signed-off-by: Keith Smiley ---

Re: [PATCH v2 1/5] strbuf: add xstrdup_toupper()

2017-12-29 Thread Torsten Bögershausen
On Fri, Dec 29, 2017 at 04:22:18PM +0100, lars.schnei...@autodesk.com wrote: > From: Lars Schneider > > Create a copy of an existing string and make all characters upper case. > Similar xstrdup_tolower(). > > This function is used in a subsequent commit. > >

[PATCH v2 1/5] strbuf: add xstrdup_toupper()

2017-12-29 Thread lars . schneider
From: Lars Schneider Create a copy of an existing string and make all characters upper case. Similar xstrdup_tolower(). This function is used in a subsequent commit. Signed-off-by: Lars Schneider --- strbuf.c | 13 + strbuf.h |

[PATCH v2 2/5] utf8: add function to detect prohibited UTF-16/32 BOM

2017-12-29 Thread lars . schneider
From: Lars Schneider Whenever a data stream is declared to be UTF-16BE, UTF-16LE, UTF-32BE or UTF-32LE a BOM must not be used [1]. The function returns true if this is the case. This function is used in a subsequent commit. [1]

[PATCH v2 5/5] convert: add tracing for checkout-encoding

2017-12-29 Thread lars . schneider
From: Lars Schneider Add the GIT_TRACE_CHECKOUT_ENCODING environment variable to enable tracing for content that is reencoded with the checkout-encoding attribute. Signed-off-by: Lars Schneider --- convert.c| 28

[PATCH v2 4/5] convert: add support for 'checkout-encoding' attribute

2017-12-29 Thread lars . schneider
From: Lars Schneider Git and its tools (e.g. git diff) expect all text files in UTF-8 encoding. Git will happily accept content in all other encodings, too, but it might not be able to process the text (e.g. viewing diffs or changing line endings). Add an attribute to

[PATCH v2 3/5] utf8: add function to detect a missing UTF-16/32 BOM

2017-12-29 Thread lars . schneider
From: Lars Schneider If the endianness is not defined in the encoding name, then let's be strict and require a BOM to avoid any encoding confusion. The has_missing_utf_bom() function returns true if a required BOM is missing. The Unicode standard instructs to assume

[PATCH v2 0/5] convert: add support for different encodings

2017-12-29 Thread lars . schneider
From: Lars Schneider Hi, notable changes since v1: * In [1] Peff described a situation where you "couldn't checkout _away_ from" problems because of "die() in convert_to_git()". I fixed this and tried to replicate the situation with the test "error if encoding

[PATCH] git-archive: accept --owner and --group like GNU tar

2017-12-29 Thread suzuki toshiya
The ownership of files created by git-archive is always root:root. Add --owner and --group options which work like the GNU tar equivalent to allow overriding these defaults. Signed-off-by: suzuki toshiya --- Documentation/git-archive.txt | 13 +++ archive-tar.c

Re: Rewrite cat-file.c : need help to find a bug

2017-12-29 Thread Оля Тележная
2017-12-29 16:22 GMT+03:00 Jeff King : > On Fri, Dec 29, 2017 at 01:05:50PM +0300, Оля Тележная wrote: > >> Hi everyone, >> I am trying to reuse formatting logic from ref-filter in cat-file >> command. Now cat-file uses its own formatting code. >> I am trying to achieve that

Re: [PATCH] git-archive: accepts --owner --group aslike GNU tar.

2017-12-29 Thread suzuki toshiya
Dear Junio, Ævar Thank you very much for your reviews, in spite of my many overlooking of the requirements written in the documents. To classify various cases, I modified my patch heavily. It would be posted soon. I found that some Python scripts are included in the git repository, but nothing

Re: [PATCH v1] convert: add support for 'encoding' attribute

2017-12-29 Thread Lars Schneider
> On 29 Dec 2017, at 13:59, Torsten Bögershausen wrote: > > On 2017-12-28 17:14, Lars Schneider wrote:> >>> On 17 Dec 2017, at 18:14, Torsten Bögershausen wrote: >>> >>> On Mon, Dec 11, 2017 at 04:50:23PM +0100, lars.schnei...@autodesk.com wrote: From: Lars

Re: [PATCH] Add shell completion for git remote rm

2017-12-29 Thread Todd Zullinger
Keith Smiley wrote: > It looks like that was just about preferring remove in documentation > and the like, I think it would still make sense to have both for > completion since rm is still supported. I read it as a first step in a long process to eventually remove 'remote rm', but if that's never

[PATCH/RFC 0/2] git diff --UTF-8

2017-12-29 Thread tboegi
From: Torsten Bögershausen RFC patch: convert files from e.g. UTF-16 into UTF-8 while running "git diff". The diff must be called with "git diff --UTF-8" and the "encoding" attribute must be set for the file(s). The commit messages may need some improvements, and a closer look at

[PATCH/RFC 2/2] git diff: Allow to reencode into UTF-8

2017-12-29 Thread tboegi
From: Torsten Bögershausen When blobs are encoded in UTF-16, `git diff` will treat them as binary. Make it possible to show a user readable diff encoded in UTF-8. This allows to run git diff and feed the into a web sever. Improve Git to look at the "encodig" attribute and to

[PATCH/RFC 1/2] convert_to_git(): checksafe becomes an integer

2017-12-29 Thread tboegi
From: Torsten Bögershausen When calling convert_to_git(), the checksafe parameter has been used to check if commit would give a non-roundtrip conversion of EOL. When checksafe was introduced, 3 values had been in use: SAFE_CRLF_FALSE: no warning SAFE_CRLF_FAIL: reject the commit

Re: Rewrite cat-file.c : need help to find a bug

2017-12-29 Thread Jeff King
On Fri, Dec 29, 2017 at 01:05:50PM +0300, Оля Тележная wrote: > Hi everyone, > I am trying to reuse formatting logic from ref-filter in cat-file > command. Now cat-file uses its own formatting code. > I am trying to achieve that step-by-step, now I want to invoke > populate_value function, and I

Re: [PATCH v1] convert: add support for 'encoding' attribute

2017-12-29 Thread Torsten Bögershausen
On 2017-12-28 17:14, Lars Schneider wrote:> >> On 17 Dec 2017, at 18:14, Torsten Bögershausen wrote: >> >> On Mon, Dec 11, 2017 at 04:50:23PM +0100, lars.schnei...@autodesk.com wrote: >>> From: Lars Schneider >>> > >>> +`encoding` >>> +^^ >>> +

Rewrite cat-file.c : need help to find a bug

2017-12-29 Thread Оля Тележная
Hi everyone, I am trying to reuse formatting logic from ref-filter in cat-file command. Now cat-file uses its own formatting code. I am trying to achieve that step-by-step, now I want to invoke populate_value function, and I have a bug somewhere. My code is here.

Segfault

2017-12-29 Thread Andrew Tsykhonya
git stash pop resulted in crash: /usr/local/Cellar/git/2.10.2/libexec/git-core/git-stash: line 470: 14946 Segmentation fault: 11 git merge-recursive $b_tree -- $c_tree $w_tree although, the changes have been applied successfully.