"git fetch" does not pass quiet setting to "git c"

2014-08-13 Thread Matthew Flaschen
"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

Re: [PATCH] read-cache.c: Ensure unmerged entries are removed

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH] read-cache.c: Ensure unmerged entries are removed

2014-08-13 Thread Jaime Soriano Pastor
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

Re: [PATCH] read-cache.c: Ensure unmerged entries are removed

2014-08-13 Thread Jaime Soriano Pastor
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?

Re: [PATCH v2 00/23] backend-struct-db

2014-08-13 Thread Ronnie Sahlberg
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

Re: [PATCH v2 00/23] backend-struct-db

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH v3 2/6] sha1_file.c: do not die failing to malloc in unpack_compressed_entry

2014-08-13 Thread Junio C Hamano
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

[PATCH v2 10/23] refs-common.c: move read_ref, read_ref_full and ref_exists to common

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 14/23] refs-common.c: move names_conflict to the common code

2014-08-13 Thread Ronnie Sahlberg
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 @@

[PATCH v2 03/23] refs-common.c: move update_ref to refs-common.c

2014-08-13 Thread Ronnie Sahlberg
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(-)

[PATCH v2 01/23] refs.c: create a public function for is_refname_available

2014-08-13 Thread Ronnie Sahlberg
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 ++---

[PATCH v2 06/23] refs-common.c: move read_ref_at to the refs common file

2014-08-13 Thread Ronnie Sahlberg
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 ---

[PATCH v2 11/23] refs-common.c: move resolve_refdup to common

2014-08-13 Thread Ronnie Sahlberg
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 --

[PATCH v2 15/23] refs-common.c: move prettify_refname to the common code

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 22/23] refs.c: add methods for the ref iterators

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 07/23] refs-common.c: move the hidden refs functions to the common code

2014-08-13 Thread Ronnie Sahlberg
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 ---

[PATCH v2 17/23] refs-common.c: move head_ref_namespaced to the common file

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 13/23] refs-common.c: move is_branch to the common code

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 09/23] refs-common.c: move warn_if_dangling_symref* to refs-common

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 05/23] refs-common.c: move rename_ref to the common code

2014-08-13 Thread Ronnie Sahlberg
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 -

[PATCH v2 20/23] refs.c: add methods for misc ref operations

2014-08-13 Thread Ronnie Sahlberg
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 +

[PATCH v2 21/23] refs.c: add methods for head_ref*

2014-08-13 Thread Ronnie Sahlberg
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-

[PATCH v2 08/23] refs-common.c: move dwim and friend functions to refs common

2014-08-13 Thread Ronnie Sahlberg
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 --

[PATCH v2 19/23] refs.c: add reflog backend methods

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 18/23] refs.c: add a backend method structure with transaction functions

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 12/23] refs-common.c: move check_refname_component to the common code

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 16/23] refs-common.c: move ref iterators to the common code

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 04/23] refs-common.c: move delete_ref to the common code

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 00/23] backend-struct-db

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH v2 02/23] refs-common.c: create a file to host all common refs code

2014-08-13 Thread Ronnie Sahlberg
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 +++

Re: [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH v3 5/6] diff --stat: mark any file larger than core.bigfilethreshold binary

2014-08-13 Thread Eric Sunshine
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

Re: [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged

2014-08-13 Thread Johannes Sixt
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

Re: [PATCH v4 0/1] receive-pack: optionally deny case clone refs

2014-08-13 Thread David Turner
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

Re: [PATCH v2 02/23] rebase -i: allow squashing empty commits without complaints

2014-08-13 Thread Phil Hord
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

Re: [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH 3/3] checkout -m: attempt merge when deletion of path was staged

2014-08-13 Thread Junio C Hamano
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

[PATCH] http.c: die if curl_*_init fails

2014-08-13 Thread Bernhard Reiter
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

[PATCH] git-imap-send: simplify tunnel construction

2014-08-13 Thread Bernhard Reiter
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_

Re: [PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH v2 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH] Documentation/git-rebase.txt: fix -f description to match actual git behavior.

2014-08-13 Thread Junio C Hamano
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

Re: [PATCH v4 0/1] receive-pack: optionally deny case clone refs

2014-08-13 Thread Ronnie Sahlberg
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

Re: [PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

2014-08-13 Thread Matthieu Moy
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

Re: [PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

2014-08-13 Thread Matthieu Moy
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,

Re: [PATCH 2/3] unpack-trees: use 'cuddled' style for if-else cascade

2014-08-13 Thread Ronnie Sahlberg
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

[PATCH/RFC v2 2/2] use the new git_default_config()

2014-08-13 Thread Tanay Abhra
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 |

[PATCH/RFC v2 1/2] git_default_config() rewritten using the config-set API

2014-08-13 Thread Tanay Abhra
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

Re: [PATCH v2 1/5] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Matthieu Moy
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 || > +

Re: [PATCH v2 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Matthieu Moy
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

Re: [PATCH v2 23/23] rebase -i: enable options --signoff, --reset-author for pick, reword

2014-08-13 Thread Michael Haggerty
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

[PATCH v2 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Tanay Abhra
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

[PATCH v2 1/5] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
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

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
>> 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

Re: [PATCH 3/4] merge-recursive.c: replace `git_config()` with `git_config_get_int()`

2014-08-13 Thread Matthieu Moy
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/

Re: [PATCH 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Matthieu Moy
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

Re: [PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Matthieu Moy
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

[PATCH v3 0/6] Large file improvements

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

[PATCH v3 5/6] diff --stat: mark any file larger than core.bigfilethreshold binary

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

[PATCH v3 1/6] wrapper.c: introduce gentle xmalloc(z) that does not die()

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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-

[PATCH v3 4/6] diff.c: allow to pass more flags to diff_populate_filespec

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

[PATCH v3 6/6] diff: shortcut for diff'ing two binary SHA-1 objects

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

[PATCH v3 2/6] sha1_file.c: do not die failing to malloc in unpack_compressed_entry

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

[PATCH v3 3/6] unpack-objects: continue when fail to malloc due to large objects

2014-08-13 Thread Nguyễn Thái Ngọc Duy
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

Re: Undefined reference to __builtin_ctzll

2014-08-13 Thread Erik Faye-Lund
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

Re: [PATCH] Documentation/git-rebase.txt: fix -f description to match actual git behavior.

2014-08-13 Thread Sergey Organov
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

Undefined reference to __builtin_ctzll

2014-08-13 Thread Радослав Йовчев
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

[PATCH 4/4] builtin/apply.c: replace `git_config()` with `git_config_get_string_const()`

2014-08-13 Thread Tanay Abhra
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

[PATCH 1/4] fast-import.c: replace `git_config()` with `git_config_get_*()` family

2014-08-13 Thread Tanay Abhra
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

[PATCH 2/4] ll-merge.c: refactor `read_merge_config()` to use `git_config_string()`

2014-08-13 Thread Tanay Abhra
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

[PATCH 3/4] merge-recursive.c: replace `git_config()` with `git_config_get_int()`

2014-08-13 Thread Tanay Abhra
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