"git fetch" does not pass the quiet flag (if applicable) to "git gc".
I've reproduced this in 2.0.1, but it appears to be present in master.
It looks like this line
(https://github.com/git/git/blob/master/builtin/fetch.c#L1201) is
calling "git gc" (which does support --quiet) without passing i
Jaime Soriano Pastor writes:
> In the problematic cases I've seen (specially git add and git reset
> --hard) the final state of both, merged and unmerged files, is that
> only an entry in stage 0 exists.
> Also, the current implementation of git checkout -f silently removes
> higher stage entries
On Tue, Aug 12, 2014 at 8:39 PM, Junio C Hamano wrote:
>
> Jaime Soriano Pastor writes:
>
> > Wrong implementations of tools that modify the index can left
> > some files as merged and unmerged at the same time. Avoid undesiderable
> > behaviours by handling this situation.
>
> It is understandab
On Tue, Aug 12, 2014 at 8:31 PM, Junio C Hamano wrote:
>
> Jaime Soriano Pastor writes:
>
> > A file in the index can be left as merged and unmerged at the same time
> > by some tools as libgit2, this causes some undesiderable behaviours in git.
>
> Well, doesn't it mean that libgit2 is broken?
On Wed, Aug 13, 2014 at 2:18 PM, Junio C Hamano wrote:
> Ronnie Sahlberg writes:
>
>> 15 of the patches, the refs-common.c patches, focuses on moving all backend
>> agnostic refs functions to a common file. This file will contain all
>> backend agnostic refs functions.
>>
>> The last 6 patches ad
Ronnie Sahlberg writes:
> 15 of the patches, the refs-common.c patches, focuses on moving all backend
> agnostic refs functions to a common file. This file will contain all
> backend agnostic refs functions.
>
> The last 6 patches adds a backend structure with the methods we need to
> describe a
Looks very sensible. Thanks.
On Wed, Aug 13, 2014 at 3:57 AM, Nguyễn Thái Ngọc Duy wrote:
> Fewer die() gives better control to the caller, provided that the
> caller _can_ handle it. And in unpack_compressed_entry() case, it can,
> because unpack_compressed_entry() already returns NULL if it fai
These functions do not depend on the backend implementation so we
can move them to the common code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 18 ++
refs.c| 18 --
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/refs-common.c b/re
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 8
refs.c| 14 --
refs.h| 9 +
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index 5f83d7e..6eef80b 100644
--- a/refs-common.c
+++ b/refs-common.c
@@
This change moves update_ref() to the refs-common.c file since this function
does not contain any backend specific code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 25 +
refs.c| 23 ---
2 files changed, 25 insertions(+), 23 deletions(-)
Export a generic is_refname_available() function. We will need this
as a public shared function later when we add additional refs backends
since we want to keep using the same rules for ref naming across
all backends.
Signed-off-by: Ronnie Sahlberg
---
refs.c | 29 ++---
This change moves read_ref_at() to the refs-common.c file since this function
does not contain any backend specific code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 114 ++
refs.c| 114 ---
This function can be shared across all refs backends so move it
to the common code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 6 ++
refs.c| 6 --
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index 37d3d14..655a1a0 100644
--
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 9 +
refs.c| 9 -
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index 6eef80b..d8a295c 100644
--- a/refs-common.c
+++ b/refs-common.c
@@ -3,6 +3,15 @@
#include "refs.h"
#inc
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 36
refs.c| 21 ++---
refs.h| 19 +++
3 files changed, 69 insertions(+), 7 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index f19402b..3df725d 100644
This change moves the hidden refs functions to the refs-common.c file since
these functions do not contain any backend specific code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 44
refs.c| 43 ---
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 15 +++
refs.c| 15 ---
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index 3b20db3..aafc4c8 100644
--- a/refs-common.c
+++ b/refs-common.c
@@ -570,6 +570,21 @@ void
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 5 +
refs.c| 5 -
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index f8b79e0..5f83d7e 100644
--- a/refs-common.c
+++ b/refs-common.c
@@ -3,6 +3,11 @@
#include "refs.h"
#include "st
These functions do not use any backend specific code so we can move
them to the common code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 52
refs.c| 52
2 files changed, 52 in
This change moves rename_ref() to the refs-common.c file since this function
does not contain any backend specific code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 92 +++
refs.c| 92 -
Add ref backend methods for:
resolve_ref_unsafe, is_refname_available, pack_refs, peel_ref,
create_symref, resolve_gitlink_ref.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 33 +
refs.c| 22 +++---
refs.h| 19 +
Add methods for the head_ref* functions.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 10 ++
refs.c| 6 --
refs.h| 6 ++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index d9688e2..f19402b 100644
--- a/refs-
These functions do not contain any backend specific code so we can move
them to the common code and share across all backends.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 202 ++
refs.c| 202 --
Add methods for the reflog functions.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 32
refs.c| 18 --
refs.h| 17 +
3 files changed, 61 insertions(+), 6 deletions(-)
diff --git a/refs-common.c b/refs-common.c
Add a ref structure for backend methods. Start by adding method pointers
for the transaction functions.
Rename the existing transaction functions to files_* and make them static.
Add new transaction functions that just pass through to the appropriate
methods for the backend.
Signed-off-by: Ronnie
This function does not contain any backend specific code so we
can move it to the common code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 110 ++
refs.c| 110 --
2 file
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 81 +++
refs.c| 81 ---
2 files changed, 81 insertions(+), 81 deletions(-)
diff --git a/refs-common.c b/refs-common.c
index d
This change moves delete_ref() to the refs-common.c file since this function
does not contain any backend specific code.
Signed-off-by: Ronnie Sahlberg
---
refs-common.c | 18 ++
refs.c| 19 ---
2 files changed, 18 insertions(+), 19 deletions(-)
diff --gi
List, please review
This series is called backend-struct-db and is also available at
https://github.com/rsahlberg/git/tree/backend-struct-db
This series is built on and follows after the series
ref-transactions-send-pack
This series does not change any logic or behaviour but mainly just shuffle
Create refs-common.c which will hold all backend agnostic refs code.
Signed-off-by: Ronnie Sahlberg
---
Makefile | 1 +
refs-common.c | 2 ++
2 files changed, 3 insertions(+)
create mode 100644 refs-common.c
diff --git a/Makefile b/Makefile
index 07ea105..7705136 100644
--- a/Makefile
+++
Johannes Sixt writes:
> Am 13.08.2014 20:59, schrieb Junio C Hamano:
>> diff --git a/t/t7201-co.sh b/t/t7201-co.sh
>> index 0c9ec0a..cedbb6a 100755
>> --- a/t/t7201-co.sh
>> +++ b/t/t7201-co.sh
>> @@ -223,6 +223,23 @@ test_expect_success 'checkout --merge --conflict=diff3
>> ' '
>> test_cmp
On Wed, Aug 13, 2014 at 6:57 AM, Nguyễn Thái Ngọc Duy wrote:
> Too large files may lead to failure to allocate memory. If it happens
> here, it could impact quite a few commands that involve
> diff. Moreover, too large files are inefficient to compare anyway (and
> most likely non-text), so mark t
Am 13.08.2014 20:59, schrieb Junio C Hamano:
> diff --git a/t/t7201-co.sh b/t/t7201-co.sh
> index 0c9ec0a..cedbb6a 100755
> --- a/t/t7201-co.sh
> +++ b/t/t7201-co.sh
> @@ -223,6 +223,23 @@ test_expect_success 'checkout --merge --conflict=diff3
> ' '
> test_cmp two expect
> '
>
> +test_exp
On Wed, 2014-08-13 at 09:20 -0700, Ronnie Sahlberg wrote:
> David,
>
> One possible solution can be to use the external database daemon I am
> working of for ref transactions.
> Since this makes all refs be stored in a dedicated database instead of
> the filesystem you no longer are dependent on f
Thanks for working on this.
On Wed, Aug 6, 2014 at 7:59 PM, Fabian Ruch wrote:
> The to-do list commands `squash` and `fixup` apply the changes
> introduced by the named commit to the tree but instead of creating
> a new commit on top of the current head it replaces the previous
> commit with a n
Junio C Hamano writes:
> Jonathan Nieder writes:
>
>> twoway_merge() is missing an o->gently check in the case where a file
>> that needs to be modified is missing from the index but present in the
>> old and new trees. As a result, in this case 'git checkout -m' errors
>> out instead of trying
Jonathan Nieder writes:
> twoway_merge() is missing an o->gently check in the case where a file
> that needs to be modified is missing from the index but present in the
> old and new trees. As a result, in this case 'git checkout -m' errors
> out instead of trying to perform a merge.
I see two
Signed-off-by: Bernhard Reiter
---
http.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/http.c b/http.c
index c8cd50d..afe4fc5 100644
--- a/http.c
+++ b/http.c
@@ -300,6 +300,9 @@ static CURL *get_curl_handle(void)
{
CURL *result = curl_easy_init();
+ if (!result
Signed-off-by: Bernhard Reiter
---
imap-send.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/imap-send.c b/imap-send.c
index 524fbab..fb01a9c 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -961,17 +961,16 @@ static struct imap_store *imap_open_store(struct imap_server_
Matthieu Moy writes:
> Tanay Abhra writes:
>
>> git_default_config() now uses config-set API functions to query for
>> values.
>
> I believe you missed a few spots:
>
> $ git grep -n 'git_default_config[^(]'
> Documentation/user-manual.txt:4287:git_config(git_default_config);
> archive.c
Matthieu Moy writes:
> Not that it's terribly important, but I think it's good that your
> refactoring also brings a few end-users benefits. It will help you show
> off when you tell your friends what you did this summer (not "I did
> useless code churn" ;-) ), and helps everybody see the benefit
Tanay Abhra writes:
> There is one slight behavior change, previously "merge.default"
> silently ignored a NULL value and didn't raise any error. But,
> in the same function, all other values raise an error on a NULL
> value. So to conform with other call sites in Git, a NULL value
> for "merge.d
Sergey Organov writes:
> ... I.e., git must not rebase anything
> when "Current branch is a descendant of the commit you are rebasing
> onto", unless -f is given. Simple, reasonable, straightforward.
It may be simple and straightforward, but breaks the use case the
plain vanilla rebase is used f
David,
One possible solution can be to use the external database daemon I am
working of for ref transactions.
Since this makes all refs be stored in a dedicated database instead of
the filesystem you no longer are dependent on file system semantics.
While not in the official git trees yet I would
Tanay Abhra writes:
> git_default_config() now uses config-set API functions to query for
> values.
>
> Signed-off-by: Tanay Abhra
> ---
> Sorry, for the short log message, I will explain why.
> The git_default_config() rewrite is 100% complete, the only
> problem remains is the call sites; ther
Tanay Abhra writes:
> git_default_config() now uses config-set API functions to query for
> values.
I believe you missed a few spots:
$ git grep -n 'git_default_config[^(]'
Documentation/user-manual.txt:4287:git_config(git_default_config);
archive.c:416: git_config(git_default_config,
On Tue, Aug 12, 2014 at 5:00 PM, Jonathan Nieder wrote:
> Match the predominant style in git by following K&R style for if/else
> cascades. Documentation/CodingStyle from linux.git explains:
>
> Note that the closing brace is empty on a line of its own, _except_ in
> the cases where it is fol
If we change the signature to void git_default_config(void),
we would have to use a patch like this to change the call sites
of the function. This patch is just for illustrative purpose,
I couldn't finalize if this was unnecessary code cruft or
a valid approach.
---
builtin/check-attr.c |
git_default_config() now uses config-set API functions to query for
values.
Signed-off-by: Tanay Abhra
---
Sorry, for the short log message, I will explain why.
The git_default_config() rewrite is 100% complete, the only
problem remains is the call sites; there are too many of them.
Some are call
Tanay Abhra writes:
> + if (!git_config_get_int("pack.compression", &pack_compression_level)) {
> + if (pack_compression_level == -1)
> + pack_compression_level = Z_DEFAULT_COMPRESSION;
> + else if (pack_compression_level < 0 ||
> +
Tanay Abhra writes:
> There is one slight behavior change, previously "merge.default"
> silently ignored a NULL value and didn't raise any error. But,
> in the same function, all other values raise an error on a NULL
> value. So to conform with other call sites in Git, a NULL value
> for "merge.d
On 08/07/2014 01:59 AM, Fabian Ruch wrote:
> pick and reword are atomic to-do list commands in the sense that they
> open a new task which is closed after the respective command is
> completed. squash and fixup are not atomic. They create a new task
> which is not completed until the last squash or
There is one slight behavior change, previously "merge.default"
silently ignored a NULL value and didn't raise any error. But,
in the same function, all other values raise an error on a NULL
value. So to conform with other call sites in Git, a NULL value
for "merge.default" raises an error.
Signed
Use `git_config_get_*()` family instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
fast-import.c | 44 +---
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git a
>> if (pack_idx_opts.version > 2)
>> -die("bad pack.indexversion=%"PRIu32,
>> -pack_idx_opts.version);
>> -return 0;
>> +die("bad pack.indexversion=%"PRIu32,
>> pack_idx_opts.version);
>
> One more opportunit
Tanay Abhra writes:
> merge-recursive.c | 22 ++
> 1 file changed, 6 insertions(+), 16 deletions(-)
> builtin/apply.c | 12 +---
> 1 file changed, 5 insertions(+), 7 deletions(-)
These two look straightforward and good.
--
Matthieu Moy
http://www-verimag.imag.fr/
Tanay Abhra writes:
> Signed-off-by: Tanay Abhra
> ---
> ll-merge.c | 23 ++-
> 1 file changed, 6 insertions(+), 17 deletions(-)
>
> diff --git a/ll-merge.c b/ll-merge.c
> index fb61ea6..8ea03e5 100644
> --- a/ll-merge.c
> +++ b/ll-merge.c
> @@ -225,11 +225,8 @@ static int r
Tanay Abhra writes:
> fast-import.c | 42 +++---
> 1 file changed, 19 insertions(+), 23 deletions(-)
Only 4 lines less, how disappointing ;-).
More seriously, the old code was essentially dealing with special
values, which your new code needs to do too, so y
Since v2:
- reword the fsck patch to center around unpack_compressed_entry instead
- make sure unpack-objects survive out of memory error because of large files
- rename diff_filespec_population flags
- make "git diff " work on large files
Nguyễn Thái Ngọc Duy (6):
wrapper.c: introduce gen
Too large files may lead to failure to allocate memory. If it happens
here, it could impact quite a few commands that involve
diff. Moreover, too large files are inefficient to compare anyway (and
most likely non-text), so mark them binary and skip looking at their
content.
Noticed-by: Dale R. Wor
Signed-off-by: Nguyễn Thái Ngọc Duy
---
git-compat-util.h | 2 ++
wrapper.c | 73 +++
2 files changed, 59 insertions(+), 16 deletions(-)
diff --git a/git-compat-util.h b/git-compat-util.h
index f587749..0e541e7 100644
--- a/git-compat-
Signed-off-by: Nguyễn Thái Ngọc Duy
---
diff.c| 13 +++--
diffcore-rename.c | 6 --
diffcore.h| 3 ++-
3 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/diff.c b/diff.c
index 867f034..f4b7421 100644
--- a/diff.c
+++ b/diff.c
@@ -376,7 +376,7 @@ stat
If we are given two SHA-1 and asked to determine if they are different
(but not _what_ differences), we know right away by comparing SHA-1.
A side effect of this patch is, because large files are marked binary,
diff-tree will not need to unpack them. 'diff-index --cached' will not
either. But 'dif
Fewer die() gives better control to the caller, provided that the
caller _can_ handle it. And in unpack_compressed_entry() case, it can,
because unpack_compressed_entry() already returns NULL if it fails to
inflate data.
A side effect from this is fsck continues to run when very large blobs
are pr
As a recovery tool, unpack-objects should go on unpacking as many
objects as it can.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
builtin/unpack-objects.c | 42 +-
t/t1050-large.sh | 7 +++
2 files changed, 48 insertions(+), 1 deletion(-)
diff --g
On Wed, Aug 13, 2014 at 10:36 AM, Радослав Йовчев wrote:
> Dear GIT community,
>
>
> I found myself in situation where I had to install GIT on Debian 3.1
> sarge. It comes with GCC 3.3.5. I tried to built from source but the
> libgcc was not providing the ctzll function, thus I decided to put an
Junio C Hamano writes:
> Junio C Hamano writes:
>
>> So I think the reasoning (i.e. "is a descendant" is not quite right)
>> is correct, but the updated text is not quite right. Changing it
>> further to "only the committer timestamps and identities would
>> change" is probably not an improveme
Dear GIT community,
I found myself in situation where I had to install GIT on Debian 3.1
sarge. It comes with GCC 3.3.5. I tried to built from source but the
libgcc was not providing the ctzll function, thus I decided to put an
implementation.
I do not know how to post and do a nice patch (and
Use `git_config_get_string_const()` instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
builtin/apply.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/builtin/apply.c b/builtin/a
Use `git_config_get_*()` family instead of `git_config()` to take
advantage of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
fast-import.c | 42 +++---
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/f
Signed-off-by: Tanay Abhra
---
ll-merge.c | 23 ++-
1 file changed, 6 insertions(+), 17 deletions(-)
diff --git a/ll-merge.c b/ll-merge.c
index fb61ea6..8ea03e5 100644
--- a/ll-merge.c
+++ b/ll-merge.c
@@ -225,11 +225,8 @@ static int read_merge_config(const char *var, const c
Use `git_config_get_int()` instead of `git_config()` to take advantage
of the config-set API which provides a cleaner control flow.
Signed-off-by: Tanay Abhra
---
merge-recursive.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/merge-recursive.c b/mer
72 matches
Mail list logo