[PATCH 4/7] dir: hide untracked contents of untracked dirs

2017-05-02 Thread Samuel Lijin
When we taught read_directory_recursive() to recurse into untracked directories in search of ignored files given DIR_SHOW_IGNORED_TOO, that had the side effect of teaching it to collect the untracked contents of untracked directories. It does not make sense to return these, so we teach

[PATCH 0/7] Keep git clean -d from inadvertently removing ignored files

2017-05-02 Thread Samuel Lijin
This patch series fixes the bug where git clean -d culls directories containing only untracked and ignored files, by first teaching read_directory() and read_directory_recursive() to search "untracked" directories (read: directories *treated* as untracked because they only contain untracked and

[PATCH 3/7] dir: add method to check if a dir_entry lexically contains another

2017-05-02 Thread Samuel Lijin
Introduce a method that allows us to check if one dir_entry corresponds to a path which contains the path corresponding to another dir_entry. --- dir.c | 8 1 file changed, 8 insertions(+) diff --git a/dir.c b/dir.c index 6bd0350e9..25cb9eadf 100644 --- a/dir.c +++ b/dir.c @@ -1852,6

[PATCH 6/7] builtin/clean: teach clean -d to skip dirs containing ignored files

2017-05-02 Thread Samuel Lijin
There is an implicit assumption that a directory containing only untracked and ignored files should itself be considered untracked. This makes sense in use cases where we're asking if a directory should be added to the git database, but not when we're asking if a directory can be safely removed

[PATCH 7/7] t7061: check for ignored file in untracked dir

2017-05-02 Thread Samuel Lijin
--- t/t7061-wtstatus-ignore.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/t/t7061-wtstatus-ignore.sh b/t/t7061-wtstatus-ignore.sh index cdc0747bf..fc6013ba3 100755 --- a/t/t7061-wtstatus-ignore.sh +++ b/t/t7061-wtstatus-ignore.sh @@ -9,6 +9,7 @@ cat >expected <<\EOF ?? actual ??

[PATCH 2/7] dir: recurse into untracked dirs for ignored files

2017-05-02 Thread Samuel Lijin
We consider directories containing only untracked and ignored files to be themselves untracked, which in the usual case means we don't have to search these directories. This is problematic when we want to collect ignored files with DIR_SHOW_IGNORED_TOO, though, so we teach

[PATCH 5/7] dir: change linkage of cmp_name() and check_contains()

2017-05-02 Thread Samuel Lijin
--- dir.c | 4 ++-- dir.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dir.c b/dir.c index f0ddb4608..91103b561 100644 --- a/dir.c +++ b/dir.c @@ -1844,7 +1844,7 @@ static enum path_treatment read_directory_recursive(struct dir_struct *dir, return dir_state; }

[PATCH 1/7] t7300: skip untracked dirs containing ignored files

2017-05-02 Thread Samuel Lijin
If git sees a directory which contains only untracked and ignored files, clean -d should not remove that directory. --- t/t7300-clean.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/t/t7300-clean.sh b/t/t7300-clean.sh index b89fd2a6a..948a455e8 100755 --- a/t/t7300-clean.sh +++

Su cuenta bancaria esta bloqueada

2017-05-02 Thread BAC Credomatic
Su cuenta bancaria esta bloqueada. Para desbloquear tu cuenta, haz click aqui: http://baccredomaatic.com

Re: Git checkout issue - deleting file without apparent reason

2017-05-02 Thread Jeff King
On Tue, May 02, 2017 at 09:33:02PM -0400, Paul van Wichen wrote: > We are having a strange issue that we haven't been able to pin down. > Scenario: master branch and feature branch both have a specific file. > 1. Master checked out. > 2. git status show no changes / clean staging area. > 3.

Re: Git checkout issue - deleting file without apparent reason

2017-05-02 Thread Bryan Turner
On Tue, May 2, 2017 at 6:33 PM, Paul van Wichen wrote: > Hi, > > We are having a strange issue that we haven't been able to pin down. > Scenario: master branch and feature branch both have a specific file. > 1. Master checked out. > 2. git status show no changes /

Git checkout issue - deleting file without apparent reason

2017-05-02 Thread Paul van Wichen
Hi, We are having a strange issue that we haven't been able to pin down. Scenario: master branch and feature branch both have a specific file. 1. Master checked out. 2. git status show no changes / clean staging area. 3. Checkout feature branch . 4. git status show no changes / clean staging

Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names

2017-05-02 Thread Liam Beguin
Hi Johannes, On Tue, 2017-05-02 at 17:48 +0200, Johannes Schindelin wrote: > Hi Liam, > > On Tue, 2 May 2017, Liam Beguin wrote: > > > Add the 'rebase.abbreviateCommands' configuration option to allow `git > > rebase -i` to default to the single-letter command-names in the todo > > list. > >

Re: [PATCH v3 3/6] rebase -i: add short command-name in --autosquash

2017-05-02 Thread Liam Beguin
Hi Johannes, On Tue, 2017-05-02 at 17:34 +0200, Johannes Schindelin wrote: > Hi Liam, > > On Tue, 2 May 2017, Liam Beguin wrote: > > > teach `git rebase -i` to recognise short command-names when using the > > '--autosquash' option. This allows commit with titles beginning with > > "s! ..." and

[PATCH 18/24] cache.h: drop add_to_cache

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/commit.c | 2 +- cache.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/commit.c b/builtin/commit.c index fa962c4f86..ac4fe97d36 100644 --- a/builtin/commit.c +++ b/builtin/commit.c @@ -287,7

[PATCH 16/24] cache.h: drop rename_cache_entry_at

2017-05-02 Thread Stefan Beller
One define was unused, the other occurs just once. Easy patch. Signed-off-by: Stefan Beller --- builtin/mv.c | 2 +- cache.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/builtin/mv.c b/builtin/mv.c index 40e40bb098..1a3c61994c 100644 ---

[PATCH 17/24] cache.h: drop remove_file_from_cache

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression path; @@ -remove_file_from_cache(path) +remove_file_from_index(_index, path) Additionally drop the define from cache.h manually. Signed-off-by: Stefan Beller --- apply.c| 4 ++-- builtin/commit.c | 2 +-

[PATCH 14/24] cache.h: drop cache_name_pos

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression name, namelen; @@ -cache_name_pos(name, namelen) +index_name_pos(_index, name, namelen) Additionally manual editing: * drop the define from cache.h. Signed-off-by: Stefan Beller --- apply.c | 9 + builtin/blame.c

[PATCH 19/24] cache.h: drop add_file_to_cache

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- cache.h | 1 - rerere.c| 2 +- submodule.c | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index bc49defc27..a9b059913e 100644 --- a/cache.h +++ b/cache.h @@ -354,7 +354,6 @@ extern void

[PATCH 21/24] cache.h: drop refresh_cache

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression flags; @@ -refresh_cache(flags) +refresh_index(_index, flags, NULL, NULL, NULL) Additionally drop the define from cache.h manually. This is a commit where I think the macro expansion is maybe silly, but for reasons outlined in the first patch of the series, we

[PATCH 15/24] cache.h: drop add_cache_entry

2017-05-02 Thread Stefan Beller
coccinelle patch -add_cache_entry(ce, option) +add_index_entry(_index, ce, option) Additionally drop the define from cache.h manually. Signed-off-by: Stefan Beller --- apply.c| 4 ++-- builtin/blame.c| 3 ++- builtin/checkout.c | 3 ++-

[PATCH 23/24] cache.h: drop ce_match_stat

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression ce, st, options; @@ -ce_match_stat(ce, st, options) +ie_match_stat(_index, ce, st, options) Additionally drop the define from cache.h manually. Note that there is an empty define section in cache.h now. The cleanup of that is done in a later patch. Signed-off-by:

[PATCH 24/24] cache.h: retire NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Stefan Beller
The NO_THE_INDEX_COMPATIBILITY_MACROS pre processor setting was introduced in 4aab5b46f4 (Make read-cache.c "the_index" free., 2007-04-01), stating: This makes all low-level functions defined in read-cache.c to take an explicit index_state structure as their first parameter, to

[PATCH 09/24] cache.h: drop resolve_undo_clear

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/checkout.c | 2 +- builtin/merge.c| 2 +- builtin/read-tree.c| 2 +- builtin/update-index.c | 2 +- cache.h| 1 - merge.c| 2 +- 6 files changed, 5 insertions(+), 6 deletions(-) diff

[PATCH 08/24] cache.h: drop unmerge_cache[_entry_at]

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/update-index.c | 2 +- cache.h| 2 -- rerere.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/builtin/update-index.c b/builtin/update-index.c index 8667c48446..b8458016f0 100644 ---

[PATCH 20/24] cache.h: drop chmod_cache_entry

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/add.c | 2 +- builtin/update-index.c | 2 +- cache.h| 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/builtin/add.c b/builtin/add.c index f6d71b10d0..288b1f5bb3 100644 --- a/builtin/add.c

[PATCH 22/24] cache.h: drop ce_modified

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/ls-files.c | 2 +- cache.h| 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/builtin/ls-files.c b/builtin/ls-files.c index 3507490d3e..89fac7ddf5 100644 --- a/builtin/ls-files.c +++ b/builtin/ls-files.c @@

[PATCH 13/24] cache.h: drop is_cache_unborn(), discard_cache(), unmerged_cache()

2017-05-02 Thread Stefan Beller
cocci semantic patch: @@ @@ -is_cache_unborn() +is_index_unborn(_index) @@ @@ -discard_cache() +discard_index(_index) @@ @@ -unmerged_cache() +unmerged_index(_index) Additionally the defines in cache.h were removed manually. Signed-off-by: Stefan Beller --- builtin/am.c

[PATCH 06/24] unpack-trees.c: rename parameter 'the_index'

2017-05-02 Thread Stefan Beller
As "the_index" is already a global variable, we do not want to confuse the local variable with the global variable. Signed-off-by: Stefan Beller --- unpack-trees.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c

[PATCH 12/24] cache.h: drop cache_dir_exists

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- cache.h | 1 - dir.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cache.h b/cache.h index 85a85f8b96..4b8e8c31fe 100644 --- a/cache.h +++ b/cache.h @@ -368,7 +368,6 @@ extern void free_name_hash(struct index_state

[PATCH 11/24] cache.h: drop cache_file_exists

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- apply.c | 2 +- cache.h | 1 - dir.c | 9 + merge-recursive.c | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/apply.c b/apply.c index 159e039a18..eb8eaeabec 100644 --- a/apply.c

[PATCH 10/24] cache.h: drop cache_name_is_other

2017-05-02 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/clean.c| 2 +- builtin/ls-files.c | 2 +- cache.h| 1 - dir.c | 2 +- wt-status.c| 4 ++-- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/builtin/clean.c b/builtin/clean.c index

[PATCH 05/24] cache.h: drop read_cache_unmerged()

2017-05-02 Thread Stefan Beller
@@ @@ -read_cache_unmerged() +read_index_unmerged(_index) Additionally drop the define from cache.h manually. Signed-off-by: Stefan Beller --- builtin/am.c| 2 +- builtin/merge.c | 2 +- builtin/pull.c | 2 +- builtin/read-tree.c | 2 +- builtin/reset.c

[PATCH 07/24] cache.h: drop read_blob_data_from_cache

2017-05-02 Thread Stefan Beller
This was done without cocinelle, as we only have 2 occurrences. Signed-off-by: Stefan Beller --- cache.h | 1 - convert.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cache.h b/cache.h index 9b94339573..d078e88c3f 100644 --- a/cache.h +++

[PATCH 02/24] cache.h: drop active_* macros

2017-05-02 Thread Stefan Beller
Based on the coccinelle patch: @@ @@ -active_cache +the_index.cache @@ @@ -active_nr +the_index.cache_nr @@ @@ -active_alloc +the_index.cache_alloc @@ @@ -active_cache_changed +the_index.cache_changed @@ @@ -active_cache_tree +the_index.cache_tree Additional manual editing: * drop the macros

[PATCH 04/24] cache.h: drop read_cache_preload(pathspec)

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression E; @@ -read_cache_preload(E) +read_index_preload(_index, E) Additionally manual editing: * drop the define from cache.h. * builtin/{commit,describe}.c were not picked up as we have NULL and the address of an expression. Converted them manually. *

[PATCH 03/24] cache.h: drop read_cache_from

2017-05-02 Thread Stefan Beller
coccinelle patch: @@ expression E; @@ -read_cache_from(E) +read_index_from(_index, E) additionally drop the define from cache.h manually Signed-off-by: Stefan Beller --- apply.c | 2 +- builtin/am.c | 4 ++-- builtin/commit.c | 6 +++--- cache.h | 1 -

[PATCH 01/24] cache.h: drop read_cache()

2017-05-02 Thread Stefan Beller
This patch is produced via coccinelle using this semantic patch: @@ @@ -read_cache() +read_index(_index) Additional manual editing: * drop define in cache.h * a comment in builtin/check-ignore.c and read-cache.c were converted * builtin/diff.c: fix error message referencing the function.

[PATCH 00/24] Retire NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Stefan Beller
This is the follow up to [1], but actually completed now. The reasoning why this series is a good idea is in the commit message of the last patch, quoted here: The NO_THE_INDEX_COMPATIBILITY_MACROS pre processor setting was introduced in 4aab5b46f4 (Make read-cache.c "the_index" free.,

Re: [PATCH 0/5] Abide by our own rules regarding line endings

2017-05-02 Thread Jonathan Nieder
Hi, Johannes Schindelin wrote: > Over the past decade, there have been a couple of attempts to remedy the [...] I'm intentionally skimming this cover letter, since anything important it says needs to also be in the commit messages. [...] > Without these fixes, Git will fail to build and pass

Re: Proposal for missing blob support in Git repos

2017-05-02 Thread Jonathan Tan
On 05/02/2017 11:32 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, May 2, 2017 at 7:21 PM, Jonathan Tan wrote: On Mon, May 1, 2017 at 6:41 PM, Junio C Hamano wrote: Jonathan Tan writes: On 05/01/2017 04:29 PM, Junio C

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Ævar Arnfjörð Bjarmason
On Tue, May 2, 2017 at 10:51 PM, Kevin Daudt wrote: > On Tue, May 02, 2017 at 08:52:21PM +0200, Ęvar Arnfjörš Bjarmason wrote: >> >> * Due to the bizarro existing semantics of the configure script noted >> upthread if you have a git build script that does --with-libpcre & you >>

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Kevin Daudt
On Tue, May 02, 2017 at 08:52:21PM +0200, Ævar Arnfjörð Bjarmason wrote: > > * Due to the bizarro existing semantics of the configure script noted > upthread if you have a git build script that does --with-libpcre & you > have libpcre1 installed, it'll link to it, but now since > --with-libpcre

Re: Reference help

2017-05-02 Thread Ævar Arnfjörð Bjarmason
On Tue, May 2, 2017 at 9:33 PM, Desjardin, Donald wrote: > Sorry if this is not the place for this. > > I'm looking for any reference to potential problems when updating a git > client (say from 1.7.N to 1.8.N) with old workspaces. > > The scenario is this: >

Reference help

2017-05-02 Thread Desjardin, Donald
Sorry if this is not the place for this. I'm looking for any reference to potential problems when updating a git client (say from 1.7.N to 1.8.N) with old workspaces. The scenario is this: Lots of developers use a single machine for work They have lots of workspaces created

Re: [PATCHv2 0/3] Some submodule bugfixes

2017-05-02 Thread Brandon Williams
On 05/02, Stefan Beller wrote: > v2: > * I dropped the RFC patches for reattaching HEAD as that is not the main >concern of this series. > * patch1 is just about dropping cp1 to reusing cp, instead of additionally >"fixing" mem leaks as finish_command does that for us > * reordered the

[PATCHv2 2/3] submodule: avoid auto-discovery in new working tree manipulator code

2017-05-02 Thread Stefan Beller
All commands that are run in a submodule, are run in a correct setup, there is no need to prepare the environment without setting the GIT_DIR variable. By setting the GIT_DIR variable we fix issues as discussed in 10f5c52656 (submodule: avoid auto-discovery in prepare_submodule_repo_env(),

[PATCHv2 3/3] submodule: properly recurse for read-tree and checkout

2017-05-02 Thread Stefan Beller
We forgot to prepare the submodule env, which is only a problem for nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules with nested submodules, 2017-04-13) for further explanation. To come up with a proper test for this, we'd need to look at nested submodules just as in that given

[PATCHv2 0/3] Some submodule bugfixes

2017-05-02 Thread Stefan Beller
v2: * I dropped the RFC patches for reattaching HEAD as that is not the main concern of this series. * patch1 is just about dropping cp1 to reusing cp, instead of additionally "fixing" mem leaks as finish_command does that for us * reordered the patches, former patch 3 now as patch 2

[PATCHv2 1/3] submodule_move_head: reuse child_process structure for futher commands

2017-05-02 Thread Stefan Beller
We do not need to declare another struct child_process, but we can just reuse the existing `cp` struct. Signed-off-by: Stefan Beller --- submodule.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/submodule.c b/submodule.c index

Re: [PATCH v2 5/6] submodule: improve submodule_has_commits

2017-05-02 Thread Brandon Williams
On 05/02, Brandon Williams wrote: > On 05/02, Stefan Beller wrote: > > On Tue, May 2, 2017 at 10:25 AM, Brandon Williams wrote: > > > On 05/01, Stefan Beller wrote: > > >> On Mon, May 1, 2017 at 6:02 PM, Brandon Williams > > >> wrote: > > >> > + > > >> > +

Re: [PATCH v2 5/6] submodule: improve submodule_has_commits

2017-05-02 Thread Brandon Williams
On 05/02, Stefan Beller wrote: > On Tue, May 2, 2017 at 10:25 AM, Brandon Williams wrote: > > On 05/01, Stefan Beller wrote: > >> On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote: > >> > + > >> > + if (capture_command(, , GIT_MAX_HEXSZ +

Re: [PATCH v2 00/53] object_id part 8

2017-05-02 Thread Brandon Williams
On 05/01, brian m. carlson wrote: > This is the eighth series of patches to convert unsigned char [20] to > struct object_id. This series converts lookup_commit, lookup_blob, > lookup_tree, lookup_tag, and finally parse_object to struct object_id. > > A small number of functions have temporaries

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Ævar Arnfjörð Bjarmason
On Tue, May 2, 2017 at 6:05 PM, Johannes Schindelin wrote: > Hi Ævar, > > On Tue, 2 May 2017, Ævar Arnfjörð Bjarmason wrote: > >> On Tue, May 2, 2017 at 2:09 PM, Johannes Schindelin >> wrote: >> > >> > On Sun, 30 Apr 2017, Junio C Hamano

Re: CYGWIN git cannot install python packages with pip

2017-05-02 Thread ankostis
Note that MSYS2 Git-12.2.1 also has no such problem. On 2 May 2017 at 20:08, ankostis wrote: > On Windows, with Cygwin-git 02.12.2-1 the python command: > > pip install git+https://github.com/...` > > fails to work with the following error: > > ... > > Git-2.8.3 had no

Re: Proposal for missing blob support in Git repos

2017-05-02 Thread Ævar Arnfjörð Bjarmason
On Tue, May 2, 2017 at 7:21 PM, Jonathan Tan wrote: > On Mon, May 1, 2017 at 6:41 PM, Junio C Hamano wrote: >> Jonathan Tan writes: >> >>> On 05/01/2017 04:29 PM, Junio C Hamano wrote: Jonathan Tan

Re: [PATCH v3 14/25] setup_discovered_git_dir(): plug memory leak

2017-05-02 Thread Jeff King
On Tue, May 02, 2017 at 10:20:29AM -0700, Stefan Beller wrote: > > - gitdir = real_pathdup(gitdir, 1); > > + gitdir = to_free = real_pathdup(gitdir, 1); > > if (chdir(cwd->buf)) > > die_errno("Could not come back

Re: [PATCH v2 03/53] Convert struct cache_tree to use struct object_id

2017-05-02 Thread Brandon Williams
On 05/01, brian m. carlson wrote: > Convert the sha1 member of struct cache_tree to struct object_id by > changing the definition and applying the following semantic patch, plus > the standard object_id transforms: > > @@ > struct cache_tree E1; > @@ > - E1.sha1 > + E1.oid.hash > > @@ > struct

CYGWIN git cannot install python packages with pip

2017-05-02 Thread ankostis
On Windows, with Cygwin-git 02.12.2-1 the python command: pip install git+https://github.com/...` fails to work with the following error: $ pip install git+https://github.com/ipython/traitlets/ Collecting git+https://github.com/ipython/traitlets/ Cloning

Re: [PATCH v2 02/53] Clean up outstanding object_id transforms.

2017-05-02 Thread Brandon Williams
On 05/01, brian m. carlson wrote: > The semantic patch for standard object_id transforms found two > outstanding places where we could make a transformation automatically. > Apply these changes. > > Signed-off-by: brian m. carlson > --- > builtin/diff.c | 2 +- >

Re: [PATCH v2 5/6] submodule: improve submodule_has_commits

2017-05-02 Thread Stefan Beller
On Tue, May 2, 2017 at 10:25 AM, Brandon Williams wrote: > On 05/01, Stefan Beller wrote: >> On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote: >> > + >> > + if (capture_command(, , GIT_MAX_HEXSZ + 1) || >> > out.len) >> >> eh, I gave too

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Ævar Arnfjörð Bjarmason
On Tue, May 2, 2017 at 7:43 PM, Brandon Williams wrote: > On 05/02, Ævar Arnfjörð Bjarmason wrote: >> On Tue, May 2, 2017 at 2:09 PM, Johannes Schindelin >> wrote: >> > Hi Ævar, >> > >> > On Sun, 30 Apr 2017, Junio C Hamano wrote: >> > >> >> *

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Brandon Williams
On 05/02, Ævar Arnfjörð Bjarmason wrote: > On Tue, May 2, 2017 at 2:09 PM, Johannes Schindelin > wrote: > > Hi Ævar, > > > > On Sun, 30 Apr 2017, Junio C Hamano wrote: > > > >> * ab/grep-pcre-v2 (2017-04-25) 20 commits > >> - SQUASH??? > >> - Makefile & configure:

Re: [PATCH v2 5/6] submodule: improve submodule_has_commits

2017-05-02 Thread Brandon Williams
On 05/01, Stefan Beller wrote: > On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote: > > + > > + if (capture_command(, , GIT_MAX_HEXSZ + 1) || > > out.len) > > eh, I gave too much and self-contradicting feedback here earlier, > ideally I'd like to review

Re: [PATCH v3 14/25] setup_discovered_git_dir(): plug memory leak

2017-05-02 Thread Stefan Beller
On Tue, May 2, 2017 at 9:02 AM, Johannes Schindelin wrote: > The setup_explicit_git_dir() function does not take custody of the string > passed as first parameter; we have to release it if we turned the value of > git_dir into an absolute path. > > Signed-off-by:

Re: [PATCH 0/5] Start of a journey: drop NO_THE_INDEX_COMPATIBILITY_MACROS

2017-05-02 Thread Stefan Beller
On Tue, May 2, 2017 at 8:35 AM, Jeff Hostetler wrote: > You may also want to look at unpack-trees.c : mark_new_skip_worktree(). > It has a local variable named "the_index" in the argument list. > You may want to rename this to avoid confusion. Thanks for bringing this up.

[PATCH v3] l10n: de.po: update German translation

2017-05-02 Thread Ralf Thielow
Translate 96 new messages came from git.pot update in dfc182b (l10n: git.pot: v2.13.0 round 1 (96 new, 37 removed)). Signed-off-by: Ralf Thielow --- po/de.po | 323 --- 1 file changed, 142 insertions(+), 181

Re: [PATCH v2] l10n: de.po: update German translation

2017-05-02 Thread Ralf Thielow
2017-05-01 14:19 GMT+02:00 Simon Ruderich : > On Sun, Apr 30, 2017 at 09:11:49PM +0200, Ralf Thielow wrote: >> #: config.c:1952 >> #, c-format >> msgid "unknown core.untrackedCache value '%s'; using 'keep' default value" >> -msgstr "" >> +msgstr "Unbekannter Wert '%s' in

Re: [PATCH v2 1/1] t0027: tests are not expensive; remove t0025

2017-05-02 Thread Johannes Schindelin
Hi Bögi, On Tue, 2 May 2017, tbo...@web.de wrote: > From: Torsten Bögershausen > > The purpose of t0027 is to test all CRLF related conversions at > "git checkout" and "git add". > > Running t0027 under Git for Windows takes 3-4 minutes, so the whole script > had been marked as

Re: PCRE v2 compile error, was Re: What's cooking in git.git (May 2017, #01; Mon, 1)

2017-05-02 Thread Johannes Schindelin
Hi Ævar, On Tue, 2 May 2017, Ævar Arnfjörð Bjarmason wrote: > On Tue, May 2, 2017 at 2:09 PM, Johannes Schindelin > wrote: > > > > On Sun, 30 Apr 2017, Junio C Hamano wrote: > > > >> * ab/grep-pcre-v2 (2017-04-25) 20 commits > >> - SQUASH??? > >> - Makefile &

[PATCH v3 23/25] name-rev: avoid leaking memory in the `deref` case

2017-05-02 Thread Johannes Schindelin
When the `name_rev()` function is asked to dereference the tip name, it allocates memory. But when it turns out that another tip already described the commit better than the current one, we forgot to release the memory. Pointed out by Coverity. Signed-off-by: Johannes Schindelin

[PATCH v3 25/25] submodule_uses_worktrees(): plug memory leak

2017-05-02 Thread Johannes Schindelin
There is really no reason why we would need to hold onto the allocated string longer than necessary. Reported by Coverity. Signed-off-by: Johannes Schindelin --- worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/worktree.c b/worktree.c

[PATCH v3 19/25] line-log: avoid memory leak

2017-05-02 Thread Johannes Schindelin
Discovered by Coverity. Signed-off-by: Johannes Schindelin --- line-log.c | 1 + 1 file changed, 1 insertion(+) diff --git a/line-log.c b/line-log.c index a23b910471b..b9087814b8c 100644 --- a/line-log.c +++ b/line-log.c @@ -1125,6 +1125,7 @@ static int

[PATCH v3 20/25] shallow: avoid memory leak

2017-05-02 Thread Johannes Schindelin
Reported by Coverity. Signed-off-by: Johannes Schindelin --- shallow.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/shallow.c b/shallow.c index 25b6db989bf..f9370961f99 100644 --- a/shallow.c +++ b/shallow.c @@ -473,11 +473,15 @@ static

[PATCH v3 24/25] show_worktree(): plug memory leak

2017-05-02 Thread Johannes Schindelin
The buffer allocated by shorten_unambiguous_ref() needs to be released. Discovered by Coverity. Signed-off-by: Johannes Schindelin --- builtin/worktree.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/builtin/worktree.c

[PATCH v3 21/25] add_reflog_for_walk: avoid memory leak

2017-05-02 Thread Johannes Schindelin
We free()d the `log` buffer when dwim_log() returned 1, but not when it returned a larger value (which meant that it still allocated the buffer but we simply ignored it). While in the vicinity, make sure that the `reflogs` structure as well as the `branch` variable are released properly, too.

[PATCH v3 22/25] remote: plug memory leak in match_explicit()

2017-05-02 Thread Johannes Schindelin
The `guess_ref()` returns an allocated buffer of which `make_linked_ref()` does not take custody (`alloc_ref()` makes a copy), therefore we need to release the buffer afterwards. Noticed via Coverity. Signed-off-by: Johannes Schindelin --- remote.c | 5 +++-- 1 file

[PATCH v3 18/25] receive-pack: plug memory leak in update()

2017-05-02 Thread Johannes Schindelin
Reported via Coverity. Signed-off-by: Johannes Schindelin --- builtin/receive-pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index f96834f42c9..48c07ddb659 100644 ---

[PATCH v3 10/25] cat-file: fix memory leak

2017-05-02 Thread Johannes Schindelin
Discovered by Coverity. Signed-off-by: Johannes Schindelin --- builtin/cat-file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/cat-file.c b/builtin/cat-file.c index 1890d7a6390..9af863e7915 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@

[PATCH v3 12/25] split_commit_in_progress(): fix memory leak

2017-05-02 Thread Johannes Schindelin
Reported via Coverity. Signed-off-by: Johannes Schindelin --- wt-status.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wt-status.c b/wt-status.c index 0a6e16dbe0f..1f3f6bcb980 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1088,8 +1088,13

[PATCH v3 14/25] setup_discovered_git_dir(): plug memory leak

2017-05-02 Thread Johannes Schindelin
The setup_explicit_git_dir() function does not take custody of the string passed as first parameter; we have to release it if we turned the value of git_dir into an absolute path. Signed-off-by: Johannes Schindelin --- setup.c | 9 +++-- 1 file changed, 7

[PATCH v3 15/25] pack-redundant: plug memory leak

2017-05-02 Thread Johannes Schindelin
Identified via Coverity. Signed-off-by: Johannes Schindelin --- builtin/pack-redundant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/pack-redundant.c b/builtin/pack-redundant.c index 72c815844dd..cb1df1c7614 100644 --- a/builtin/pack-redundant.c +++

[PATCH v3 17/25] fast-export: avoid leaking memory in handle_tag()

2017-05-02 Thread Johannes Schindelin
Reported by, you guessed it, Coverity. Signed-off-by: Johannes Schindelin --- builtin/fast-export.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/fast-export.c b/builtin/fast-export.c index e0220630d00..64617ad8e36 100644 --- a/builtin/fast-export.c

[PATCH v3 11/25] checkout: fix memory leak

2017-05-02 Thread Johannes Schindelin
This change addresses part of the NEEDSWORK comment above the code, therefore the comment needs to be adjusted, too. Discovered via Coverity. Signed-off-by: Johannes Schindelin --- builtin/checkout.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH v3 16/25] mktree: plug memory leaks reported by Coverity

2017-05-02 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- builtin/mktree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/mktree.c b/builtin/mktree.c index de9b40fc63b..da0fd8cd706 100644 --- a/builtin/mktree.c +++ b/builtin/mktree.c @@ -72,7 +72,7 @@

[PATCH v3 13/25] setup_bare_git_dir(): help static analysis

2017-05-02 Thread Johannes Schindelin
Coverity reported a memory leak in this function. However, it can only be called once, as setup_git_directory() changes global state and hence is not reentrant. Mark the variable as static to indicate that this is a singleton. Signed-off-by: Johannes Schindelin ---

[PATCH v3 09/25] mailinfo & mailsplit: check for EOF while parsing

2017-05-02 Thread Johannes Schindelin
While POSIX states that it is okay to pass EOF to isspace() (and it seems to be implied that EOF should *not* be treated as whitespace), and also to pass EOF to ungetc() (which seems to be intended to fail without buffering the character), it is much better to handle these cases explicitly. Not

[PATCH v3 05/25] git_config_rename_section_in_file(): avoid resource leak

2017-05-02 Thread Johannes Schindelin
In case of errors, we really want the file descriptor to be closed. Discovered by a Coverity scan. Signed-off-by: Johannes Schindelin --- config.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config.c b/config.c index

[PATCH v3 08/25] status: close file descriptor after reading git-rebase-todo

2017-05-02 Thread Johannes Schindelin
Reported via Coverity. Signed-off-by: Johannes Schindelin --- wt-status.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wt-status.c b/wt-status.c index 03754849626..0a6e16dbe0f 100644 --- a/wt-status.c +++ b/wt-status.c @@ -1168,6 +1168,7 @@ static int

[PATCH v3 07/25] difftool: address a couple of resource/memory leaks

2017-05-02 Thread Johannes Schindelin
This change plugs a couple of memory leaks and makes sure that the file descriptor is closed in run_dir_diff(). Spotted by Coverity. Signed-off-by: Johannes Schindelin --- builtin/difftool.c | 33 +++-- 1 file changed, 23 insertions(+),

[PATCH v3 06/25] get_mail_commit_oid(): avoid resource leak

2017-05-02 Thread Johannes Schindelin
When we fail to read, or parse, the file, we still want to close the file descriptor and release the strbuf. Reported via Coverity. Signed-off-by: Johannes Schindelin --- builtin/am.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH v3 04/25] add_commit_patch_id(): avoid allocating memory unnecessarily

2017-05-02 Thread Johannes Schindelin
It would appear that we allocate (and forget to release) memory if the patch ID is not even defined. Reported by the Coverity tool. Signed-off-by: Johannes Schindelin --- patch-ids.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patch-ids.c

[PATCH v3 03/25] winansi: avoid buffer overrun

2017-05-02 Thread Johannes Schindelin
When we could not convert the UTF-8 sequence into Unicode for writing to the Console, we should not try to write an insanely-long sequence of invalid wide characters (mistaking the negative return value for an unsigned length). Reported by Coverity. Signed-off-by: Johannes Schindelin

[PATCH v3 02/25] winansi: avoid use of uninitialized value

2017-05-02 Thread Johannes Schindelin
When stdout is not connected to a Win32 console, we incorrectly used an uninitialized value for the "plain" character attributes. Detected by Coverity. Signed-off-by: Johannes Schindelin --- compat/winansi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 00/25] Address a couple of issues identified by Coverity

2017-05-02 Thread Johannes Schindelin
I recently registered the git-for-windows fork with Coverity to ensure that even the Windows-specific patches get some static analysis love. While at it, I squashed a couple of obvious issues in the part that is not Windows-specific. Note: while this patch series squashes some of those issues,

[PATCH v3 01/25] mingw: avoid memory leak when splitting PATH

2017-05-02 Thread Johannes Schindelin
In the (admittedly, concocted) case that PATH consists only of colons, we would leak the duplicated string. Signed-off-by: Johannes Schindelin --- compat/mingw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c

[PATCH v2 1/1] t0027: tests are not expensive; remove t0025

2017-05-02 Thread tboegi
From: Torsten Bögershausen The purpose of t0027 is to test all CRLF related conversions at "git checkout" and "git add". Running t0027 under Git for Windows takes 3-4 minutes, so the whole script had been marked as "EXPENSIVE". The source code for "Git for Windows" overrides

Re: Could GIT manage revision headers embedded in code ?

2017-05-02 Thread Johannes Schindelin
Hi Eric, On Tue, 2 May 2017, Delanoe Eric wrote: > Could this kind of "keyword expansion" feature be added into GIT ? Back in the days, it was decided that this should be part of the "export as zip" functionality, see the `export-subst` feature in git-archive's and gitattributes' documentation.

Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names

2017-05-02 Thread Johannes Schindelin
Hi Liam, On Tue, 2 May 2017, Liam Beguin wrote: > Add the 'rebase.abbreviateCommands' configuration option to allow `git > rebase -i` to default to the single-letter command-names in the todo > list. > > Using single-letter command-names can present two benefits. First, it > makes it easier to

Re: [PATCH v3 0/6] rebase -i: add config to abbreviate command-names

2017-05-02 Thread Johannes Schindelin
Hi, On Tue, 2 May 2017, Ævar Arnfjörð Bjarmason wrote: > I locally rebased this into just 3 patches, i.e. in this sequence: > > - Documentation: move rebase.* config variables to a separate > rebase-config.txt > - Documentation: use preferred name for the 'todo list' script > - *all the rest

  1   2   >