[PATCH v2 01/16] refs-internal.c: make files_log_ref_write() static

2017-02-16 Thread Nguyễn Thái Ngọc Duy
Created in 5f3c3a4e6f (files_log_ref_write: new function - 2015-11-10) but probably never used outside refs-internal.c Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/files-backend.c | 3 +++ refs/refs-internal.h | 4 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/refs/files-ba

[PATCH v2 04/16] files-backend: replace *git_path*() with files_path()

2017-02-16 Thread Nguyễn Thái Ngọc Duy
This centralizes all path rewriting of files-backend.c in one place so we have easier time removing the path rewriting later. There could be some hidden indirect git_path() though, I didn't audit the code to the bottom. Side note: set_worktree_head_symref() is a bad boy and should not be in files-

[PATCH v2 06/16] refs-internal.h: correct is_per_worktree_ref()

2017-02-16 Thread Nguyễn Thái Ngọc Duy
All refs outside refs/ directory is per-worktree, not just HEAD. Signed-off-by: Nguyễn Thái Ngọc Duy --- refs/refs-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/refs/refs-internal.h b/refs/refs-internal.h index f4aed49f5..69d02b6ba 100644 --- a/refs/refs-internal

[PATCH v2 05/16] refs.c: share is_per_worktree_ref() to files-backend.c

2017-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- refs.c | 6 -- refs/refs-internal.h | 6 ++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/refs.c b/refs.c index 4f845798b..7a474198e 100644 --- a/refs.c +++ b/refs.c @@ -489,12 +489,6 @@ int dwim_log(const char *str, i

[PATCH v2 03/16] files-backend: add files_path()

2017-02-16 Thread Nguyễn Thái Ngọc Duy
This will be the replacement for both git_path() and git_path_submodule() in this file. The idea is backend takes a git path and use that, oblivious of submodule, linked worktrees and such. This is the middle step towards that. Eventually the "submodule" field in 'struct files_ref_store' should be

[PATCH v2 02/16] files-backend: convert git_path() to strbuf_git_path()

2017-02-16 Thread Nguyễn Thái Ngọc Duy
git_path() and friends are going to be killed in files-backend.c in near future. And because there's a risk with overwriting buffer in git_path(), let's convert them all to strbuf_git_path(). We'll have easier time killing/converting strbuf_git_path() then because we won't have to worry about memor

[PATCH v2 00/16] Remove submodule from files-backend.c

2017-02-16 Thread Nguyễn Thái Ngọc Duy
binbSOlqAf8r_.bin Description: plain

[PATCH 0/3] Fix l10n

2017-02-16 Thread Maxim Moseychuk
In some places static size buffers can't store formatted string. If it be happen then git die. Maxim Moseychuk (3): add git_psprintf helper function bisect_next_all: convert xsnprintf to git_psprintf stop_progress_msg: convert xsnprintf to git_psprintf bisect.c | 9 + git

[PATCH 2/3] bisect_next_all: convert xsnprintf to git_psprintf

2017-02-16 Thread Maxim Moseychuk
Git can't run bisect between 2048+ commits if use russian translation. Reproduce "LANG=ru_RU.UTF8 git bisect start v4.9 v4.8" on linux sources. Dummy solution: just increase buffer size but is not safe. Size gettext string is a runtime value. Signed-off-by: Maxim Moseychuk --- bisect.c | 9

[PATCH 3/3] stop_progress_msg: convert xsnprintf to git_psprintf

2017-02-16 Thread Maxim Moseychuk
Replace local safe string buffer allocation by git_psprintf. Signed-off-by: Maxim Moseychuk --- progress.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/progress.c b/progress.c index 76a88c573..989d65504 100644 --- a/progress.c +++ b/progress.c @@ -243,21 +243,18 @

[PATCH 1/3] add git_psprintf helper function

2017-02-16 Thread Maxim Moseychuk
There are a number of places in the code where we call xsnprintf(), with the assumption that the output will fit into the buffer. If the buffer is small, then git die. In many places buffers have compile-time size, but generated string depends from current system locale (gettext)and can have size g

Re: [PATCH] config: preserve case for one-shot config on the command line

2017-02-16 Thread Lars Schneider
> On 16 Feb 2017, at 00:48, Junio C Hamano wrote: > > The "git -c = cmd" mechanism is to pretend that a The problem is also present for gitconfig variables e.g. git config --local submodule.UPPERSUB.update none But your patch below fixes that, too! > configuration variable is set to while

Re: Confusing git messages when disk is full.

2017-02-16 Thread Andreas Schwab
On Feb 15 2017, Jeff King wrote: > On Wed, Feb 15, 2017 at 02:50:19PM -0800, Junio C Hamano wrote: > >> > That works, but the fact that we need a comment is a good sign that it's >> > kind of gross. It's too bad stdio does not specify the return of fclose >> > to report an error in the close _or_

<    1   2