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 read_directo
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 ign
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 +18
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 fro
---
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
?? expecte
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
read_directory_recursive(
---
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;
}
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. Para desbloquear tu cuenta, haz click aqui:
http://baccredomaatic.com
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. Checko
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 / clean staging area.
> 3. Checkout
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 area.
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.
> >
>
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 "
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 +287,7 @@ static void add
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
--- a/builtin/mv.c
+++ b/builtin
coccinelle patch:
@@ expression path; @@
-remove_file_from_cache(path)
+remove_file_from_index(&the_index, path)
Additionally drop the define from cache.h manually.
Signed-off-by: Stefan Beller
---
apply.c| 4 ++--
builtin/commit.c | 2 +-
builtin/reset.c| 2 +-
coccinelle patch:
@@ expression name, namelen; @@
-cache_name_pos(name, namelen)
+index_name_pos(&the_index, name, namelen)
Additionally manual editing:
* drop the define from cache.h.
Signed-off-by: Stefan Beller
---
apply.c | 9 +
builtin/blame.c | 4 ++--
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 free_name_hash(struct index_
coccinelle patch:
@@ expression flags; @@
-refresh_cache(flags)
+refresh_index(&the_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
coccinelle patch
-add_cache_entry(ce, option)
+add_index_entry(&the_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 ++-
builtin/reset.c| 3
coccinelle patch:
@@ expression ce, st, options; @@
-ce_match_stat(ce, st, options)
+ie_match_stat(&the_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-
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 specify
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 --git a/builtin/checkout
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
--- a/builtin/update-ind
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
+++ b/builtin/add.c
@@
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
@@ -369,7 +369,7 @@ sta
cocci semantic patch:
@@ @@
-is_cache_unborn()
+is_index_unborn(&the_index)
@@ @@
-discard_cache()
+discard_index(&the_index)
@@ @@
-unmerged_cache()
+unmerged_index(&the_index)
Additionally the defines in cache.h were removed manually.
Signed-off-by: Stefan Beller
---
builtin/am.c
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
index aa15111fef..3dd8f6
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 *istate);
#define refr
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
+++ b/apply.c
@@ -3810
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 9bdefca6dc..c6aacbb0f0 10
@@ @@
-read_cache_unmerged()
+read_index_unmerged(&the_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 | 2 +-
cache.h
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
+++ b/cache.h
@@ -374,7 +374,6
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 from
coccinelle patch:
@@ expression E; @@
-read_cache_from(E)
+read_index_from(&the_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 -
4 files changed,
coccinelle patch:
@@ expression E; @@
-read_cache_preload(E)
+read_index_preload(&the_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.
* builtin/diff{
This patch is produced via coccinelle using this semantic patch:
@@ @@
-read_cache()
+read_index(&the_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.
S
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., 2007-04-01
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 th
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 Hamano wrote:
Jonathan Tan writes:
Thanks for your comments. If you're r
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
>> have libpcre1 ins
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 d
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:
> Lots of developers use a sing
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 using
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 p
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(), 2016-09-
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
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 (avoi
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 d3299e29c0..a2377ce019 100644
---
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:
> > >> > +
> > >> > + if (capture_command(&cp,
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(&cp, &out, GIT_MAX_HEXSZ + 1) ||
> >> > out.len)
> >>
> >>
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
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 wrote:
>> >
>> >> * ab/grep-pcre-v2 (2017-04-25) 20 commits
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 such problem.
>
> Any i
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 writes:
> Thanks for your comments. If you're referring to the codepath
> invol
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 t
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 ca
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 https://github.com/ipytho
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 +-
> reflog-walk.c | 2 +-
> 2 files
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(&cp, &out, GIT_MAX_HEXSZ + 1) ||
>> > out.len)
>>
>> eh, I gave too much and self-contradicting fee
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:
>> >
>> >> * ab/grep-pcre-v2 (2017-04-25) 20 commits
>> >> - SQUA
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: make PCRE v2 the default PCRE i
On 05/01, Stefan Beller wrote:
> On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote:
> > +
> > + if (capture_command(&cp, &out, GIT_MAX_HEXSZ + 1) ||
> > out.len)
>
> eh, I gave too much and self-contradicting feedback here earlier,
> ideally I'd like to review this to be simil
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 writes:
>>>
Thanks for your comments. If you're referring to the codepath
involving write_sha1_file() (for example, builtin/hash-object ->
>>
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: Johannes Schindelin
> ---
> setu
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. I just made a local comm
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 deletions(-)
diff --git a/p
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 core.untrackedCache; ben
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 "EXPENSIVE".
>
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 & configure: make PCRE v2 the defaul
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
---
builtin/nam
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
index bae787cf8d7..89a81b13de3
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 process_ranges_ordinary_commit(struct rev
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 b/builtin/worktree.c
index 1722a9bdc2a..ff5dfd
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 void paint_down(struct paint
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.
Ide
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 changed, 3 insertions(+), 2
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
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pac
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
@@ -165,6 +165,7 @@ static int cat
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 @@ static int split_commit_i
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 insertions(+), 2 deletions(-)
diff
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
+++ b/builtin/pack-redundant.c
@@
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
+++ b/builtin/fast-export.c
@@
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 deletions(-)
diff --git a/builtin/c
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 @@ static void mktree_line(char *
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
---
setup.c | 2 +-
1 file change
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
onl
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 b4a3205da32..a30056ec7e9 100644
--- a/config.c
+++
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 read_rebase_todolist(const char *fnam
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(+), 10 deletions(-)
diff --git a/
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 a/builtin/am.c b/builtin/am.c
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 b/patch-ids.c
index fa8f11de82
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
---
compat
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 a/compat/winansi.c b/compat/winansi
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, th
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
index 3fbfda5978b..fe0e3ccd248
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 this since 2014:
"t
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.
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
1 - 100 of 134 matches
Mail list logo