On 13.08.2014 01:57, Jonathan Nieder wrote:
Stefan Beller wrote:
In line 1763 of unpack-tree.c we have a condition on the current tree
[...]
The description is describing why the patch is *correct* (i.e., not
going to introduce a bug), while what the reader wants to know is why
the
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 tanay...@gmail.com
---
merge-recursive.c | 22 ++
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git
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 tanay...@gmail.com
---
fast-import.c | 42 +++---
1 file changed, 19 insertions(+), 23
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
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
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 tanay...@gmail.com
---
builtin/apply.c | 12 +---
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git
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
Junio C Hamano gits...@pobox.com writes:
Junio C Hamano gits...@pobox.com 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
On Wed, Aug 13, 2014 at 10:36 AM, Радослав Йовчев radoslav...@gmail.com 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
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
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 pclo...@gmail.com
---
builtin/unpack-objects.c | 42 +-
t/t1050-large.sh | 7 +++
2 files changed, 48 insertions(+), 1
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
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
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
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
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
@@
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 tree tree work on large files
Nguyễn Thái Ngọc Duy (6):
wrapper.c:
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.
Tanay Abhra tanay...@gmail.com 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
Tanay Abhra tanay...@gmail.com writes:
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
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
@@
Tanay Abhra tanay...@gmail.com 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
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 opportunity for
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 tanay...@gmail.com
---
fast-import.c | 44 +---
1 file changed, 21 insertions(+), 23
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.
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
Tanay Abhra tanay...@gmail.com 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
Tanay Abhra tanay...@gmail.com 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 ||
+
git_default_config() now uses config-set API functions to query for
values.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
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
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
On Tue, Aug 12, 2014 at 5:00 PM, Jonathan Nieder jrnie...@gmail.com wrote:
Match the predominant style in git by following KR 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
Tanay Abhra tanay...@gmail.com 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:
Tanay Abhra tanay...@gmail.com writes:
git_default_config() now uses config-set API functions to query for
values.
Signed-off-by: Tanay Abhra tanay...@gmail.com
---
Sorry, for the short log message, I will explain why.
The git_default_config() rewrite is 100% complete, the only
problem
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
Sergey Organov sorga...@gmail.com 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
Tanay Abhra tanay...@gmail.com 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
Matthieu Moy matthieu@grenoble-inp.fr 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
Matthieu Moy matthieu@grenoble-inp.fr writes:
Tanay Abhra tanay...@gmail.com 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:
Signed-off-by: Bernhard Reiter ock...@raz.or.at
---
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
Signed-off-by: Bernhard Reiter ock...@raz.or.at
---
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 =
Jonathan Nieder jrnie...@gmail.com 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
Junio C Hamano gits...@pobox.com writes:
Jonathan Nieder jrnie...@gmail.com 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'
Thanks for working on this.
On Wed, Aug 6, 2014 at 7:59 PM, Fabian Ruch baf...@gmail.com 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
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 file
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
branch' '
test_cmp two expect
'
On Wed, Aug 13, 2014 at 6:57 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com 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
Johannes Sixt j...@kdbg.org 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
branch' '
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 sahlb...@google.com
---
refs-common.c | 18 ++
refs.c| 19 ---
2 files changed, 18 insertions(+), 19
Create refs-common.c which will hold all backend agnostic refs code.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs-common.c | 81 +++
refs.c| 81 ---
2 files changed, 81 insertions(+), 81 deletions(-)
diff --git a/refs-common.c
This function does not contain any backend specific code so we
can move it to the common code.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs-common.c | 110 ++
refs.c| 110
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:
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 sahlb...@google.com
---
refs-common.c | 202 ++
refs.c| 202
Add methods for the reflog functions.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs-common.c | 32
refs.c| 18 --
refs.h| 17 +
3 files changed, 61 insertions(+), 6 deletions(-)
diff --git
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 sahlb...@google.com
---
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 sahlb...@google.com
---
refs-common.c | 33 +
refs.c| 22 +++---
refs.h|
Add methods for the head_ref* functions.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
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 sahlb...@google.com
---
refs-common.c | 44
refs.c| 43
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
@@
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
These functions do not use any backend specific code so we can move
them to the common code.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs-common.c | 52
refs.c| 52
2
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 sahlb...@google.com
---
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 sahlb...@google.com
---
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
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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 @@
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 sahlb...@google.com
---
refs-common.c | 25 +
refs.c| 23 ---
2 files changed, 25
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 sahlb...@google.com
---
refs.c | 29
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
These functions do not depend on the backend implementation so we
can move them to the common code.
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
refs-common.c | 18 ++
refs.c| 18 --
2 files changed, 18 insertions(+), 18 deletions(-)
diff --git
Signed-off-by: Ronnie Sahlberg sahlb...@google.com
---
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
+++
Looks very sensible. Thanks.
On Wed, Aug 13, 2014 at 3:57 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com 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
Ronnie Sahlberg sahlb...@google.com 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
On Wed, Aug 13, 2014 at 2:18 PM, Junio C Hamano gits...@pobox.com wrote:
Ronnie Sahlberg sahlb...@google.com 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
On Tue, Aug 12, 2014 at 8:31 PM, Junio C Hamano gits...@pobox.com wrote:
Jaime Soriano Pastor jsorianopas...@gmail.com 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
On Tue, Aug 12, 2014 at 8:39 PM, Junio C Hamano gits...@pobox.com wrote:
Jaime Soriano Pastor jsorianopas...@gmail.com 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
Jaime Soriano Pastor jsorianopas...@gmail.com 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
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 it.
73 matches
Mail list logo