RE: feature request: git svn dommit --preserve-timestamps

2016-06-10 Thread Randall S. Becker
Somewhen near June 10, 2016 9:40 PM, Eric Wong wrote: > Peter Münster wrote: > > On Tue, Jun 07 2016, Eric Wong wrote: > > > Peter Münster wrote: > > >> It would be nice, if timestamps could be preserved when rewriting > > >> the git-log. > > > > > >

Re: feature request: git svn dommit --preserve-timestamps

2016-06-10 Thread Eric Wong
Peter Münster wrote: > On Tue, Jun 07 2016, Eric Wong wrote: > > Peter Münster wrote: > >> It would be nice, if timestamps could be preserved when rewriting the > >> git-log. > > > > Unfortunately, last I checked (a long time ago!), explicitly > > setting

Re: [PATCH 00/27] nd/shallow-deepen updates

2016-06-10 Thread Eric Sunshine
On Fri, Jun 10, 2016 at 8:26 AM, Nguyễn Thái Ngọc Duy wrote: > This contains cleanups after Eric's comments (all good points, > thanks!). Changed patches have Junio's s-o-b line removed, so it's > easy to see which is changed and which is not. 09/27 is a new one, > split out of

Re: [PATCHv2] submodule--helper: initial clone learns retry logic

2016-06-10 Thread Stefan Beller
On Thu, Jun 9, 2016 at 5:35 PM, Stefan Beller wrote: > Each submodule that is attempted to be cloned, will be retried once in > case of failure after all other submodules were cloned. This helps to > mitigate ephemeral server failures and increases chances of a reliable >

[PATCH 1/3] submodule update: add `--init-default-path` switch

2016-06-10 Thread Stefan Beller
The new switch `--init-default-path` initializes the submodules which are configured in `submodule.defaultUpdatePath` instead of those given as command line arguments before updating. In the first implementation this is made incompatible with further command line arguments as it is unclear what

[PATCH 3/3] completion: clone can recurse into submodules

2016-06-10 Thread Stefan Beller
Signed-off-by: Stefan Beller --- contrib/completion/git-completion.bash | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index e3918c8..3d4d24a 100644 ---

[PATCH 2/3] clone: add --init-submodule= switch

2016-06-10 Thread Stefan Beller
The new switch passes the pathspec to `git submodule update --init` which is called after the actual clone is done. Additionally this configures the submodule.defaultUpdatePath to be the given pathspec, such that any future invocation of `git submodule update --init-default-paths` will keep up

[PATCHv4 0/3] Persistent submodule pathspec specification

2016-06-10 Thread Stefan Beller
This is a reroll of origin/sb/submodule-default-paths. It is based on top of the current origin/sb/pathspec-label (d8e47e7d5c62e, 2016-06-02 pathspec: disable preload-index when attribute pathspec magic is in use) which got merged with the current origin/sb/clone-shallow-passthru (d22eb0447,

Re: [PATCH v2] Fix spelling of "occurred"

2016-06-10 Thread Junio C Hamano
Peter Colberg writes: > On Fri, Jun 10, 2016 at 02:15:58PM -0700, Junio C Hamano wrote: >> For this one, I am tempted to say that it may be better to remove >> the verb altogether, which would lead to a more concise error >> message. > > Thanks, I will send [PATCH v3] when the

Re: [PATCH v2] Fix spelling of "occurred"

2016-06-10 Thread Peter Colberg
On Fri, Jun 10, 2016 at 02:15:58PM -0700, Junio C Hamano wrote: > For this one, I am tempted to say that it may be better to remove > the verb altogether, which would lead to a more concise error > message. Thanks, I will send [PATCH v3] when the next release cycle begins. Peter -- To

Re: [PATCH v6 41/44] am: use be_silent in 'struct apply_state' to shut up applying patches

2016-06-10 Thread Junio C Hamano
The update in 33/44 to make am call into apply that is not ready to be called (e.g. the caller needs the dup(2) dance with /dev/null to be silent) gets finally corrected with this step, which makes the progress of the topic somewhat ugly and reviewing it a bit harder than necessary. As it stands,

Re: [PATCH v2] diff: disable compaction heuristic for now

2016-06-10 Thread Junio C Hamano
Jeff King writes: > Looks good. > > I think your calendar calls for release 2.9.0 on Monday. Are you going > to bump the schedule for this? I don't think it's very high risk, and > wouldn't need to. I didn't plan to. -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2] Fix spelling of "occurred"

2016-06-10 Thread Junio C Hamano
Peter Colberg writes: > Signed-off-by: Peter Colberg > --- > config.c | 2 +- > refs.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/config.c b/config.c > index f51c56b..d7ce34b 100644 > --- a/config.c > +++ b/config.c > @@

Re: [PATCH v2] diff: disable compaction heuristic for now

2016-06-10 Thread Jeff King
On Fri, Jun 10, 2016 at 01:55:01PM -0700, Junio C Hamano wrote: > This is for 'master' when the topic is merged (will keep it in stash > for now). > > Documentation/RelNotes/2.9.0.txt | 8 +--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git

Re: [PATCH v6 43/44] builtin/apply: add a cli option for be_silent

2016-06-10 Thread René Scharfe
Am 10.06.2016 um 22:11 schrieb Christian Couder: Let's make it possible to request a silent operation on the command line. Signed-off-by: Christian Couder --- builtin/apply.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/apply.c b/builtin/apply.c

Re: [PATCH v2] diff: disable compaction heuristic for now

2016-06-10 Thread Junio C Hamano
Junio C Hamano writes: > Jeff King writes: > > > We probably want a patch to the release notes to note that it's not on > > by default. And we may want to advertise the experimental knob so > > that people actually try it (otherwise we won't get

Re: [PATCH v2] diff: disable compaction heuristic for now

2016-06-10 Thread Jeff King
On Fri, Jun 10, 2016 at 01:48:58PM -0700, Junio C Hamano wrote: > Jeff King writes: > > > We probably want a patch to the release notes to note that it's not on > > by default. And we may want to advertise the experimental knob so > > that people actually try it

[PATCH v2] diff: disable compaction heuristic for now

2016-06-10 Thread Junio C Hamano
http://lkml.kernel.org/g/20160610075043.ga13...@sigill.intra.peff.net reports that a change to add a new "function" with common ending with the existing one at the end of the file is shown like this: def foo do_foo_stuff() + common_ending() +end + +def bar +

Re: [PATCH 10/27] upload-pack: move rev-list code out of check_non_tip()

2016-06-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > -static void check_non_tip(void) > +static int check_unreachable(struct object_array *src) > { >... > /* All the non-tip ones are ancestors of what we advertised */ > - return; > + return 1; > > error: > if (cmd.in >= 0)

Re: [PATCH v2 00/94] libify apply and use lib in am

2016-06-10 Thread Christian Couder
On Fri, Jun 10, 2016 at 7:04 PM, Johannes Sixt wrote: > Am 10.06.2016 um 13:11 schrieb Johannes Schindelin: >> >> Not really. The reply (which I had not quite connected with my mail >> because they were over a week apart) says this: >> >>> I fixed this by moving the "close(fd)"

Re: Re* [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Jeff King
On Fri, Jun 10, 2016 at 11:13:10AM -0700, Junio C Hamano wrote: > Jacob Keller writes: > > > I think we could use the indentation trick and it might help in this > > case. I agree, let's disable this for this cycle and experiment in the > > next one. Good catch, Peff. >

Re: [PATCH 09/27] upload-pack: make check_non_tip() clean things up error

2016-06-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Subject: Re: [PATCH 09/27] upload-pack: make check_non_tip() clean things up > error "clean things up on error"? > On error check_non_tip() will die and not closing file descriptors is no > big deal. The next patch will split the majority of

[PATCH v6 20/44] builtin/apply: make add_conflicted_stages_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", add_conflicted_stages_file() should return -1 instead of calling die(). Helped-by: Eric Sunshine

[PATCH v6 08/44] builtin/apply: make parse_ignorewhitespace_option() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", parse_ignorewhitespace_option() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 36/44] apply: make 'be_silent' incompatible with 'apply_verbosely'

2016-06-10 Thread Christian Couder
It should be an error to have both be_silent and apply_verbosely set, so let's check that in check_apply_state(). And by the way let's not automatically set apply_verbosely when be_silent is set. Signed-off-by: Christian Couder --- apply.c | 9 +++-- 1 file

[PATCH v6 15/44] builtin/apply: make gitdiff_*() return 1 at end of header

2016-06-10 Thread Christian Couder
The gitdiff_*() functions that are called as p->fn() in parse_git_header() should return 1 instead of -1 in case of end of header or unrecognized input, as these are not real errors. It just instructs the parser to break out. This makes it possible for gitdiff_*() functions to return -1 in case

[PATCH v6 43/44] builtin/apply: add a cli option for be_silent

2016-06-10 Thread Christian Couder
Let's make it possible to request a silent operation on the command line. Signed-off-by: Christian Couder --- builtin/apply.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/builtin/apply.c b/builtin/apply.c index ddd61de..93744f8 100644 --- a/builtin/apply.c +++

[PATCH v6 33/44] builtin/am: use apply api in run_apply()

2016-06-10 Thread Christian Couder
This replaces run_apply() implementation with a new one that uses the apply api that has been previously prepared in apply.c and apply.h. This shoud improve performance a lot in certain cases. As the previous implementation was creating a new `git apply` process to apply each patch, it could be

[PATCH v6 37/44] apply: don't print on stdout when be_silent is set

2016-06-10 Thread Christian Couder
Signed-off-by: Christian Couder --- apply.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apply.c b/apply.c index dd9b301..2529534 100644 --- a/apply.c +++ b/apply.c @@ -4679,13 +4679,13 @@ static int apply_patch(struct apply_state *state,

[PATCH v6 32/44] environment: add set_index_file()

2016-06-10 Thread Christian Couder
Introduce set_index_file() to be able to temporarily change the index file. It should be used like this: /* Save current index file */ old_index_file = get_index_file(); set_index_file((char *)tmp_index_file); /* Do stuff that will use tmp_index_file as the index file */ ...

[PATCH v6 19/44] builtin/apply: make remove_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", remove_file() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 44/44] apply: use error_errno() where possible

2016-06-10 Thread Christian Couder
Signed-off-by: Christian Couder --- apply.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apply.c b/apply.c index ef49709..cd4cd01 100644 --- a/apply.c +++ b/apply.c @@ -3505,7 +3505,7 @@ static int load_current(struct

[PATCH v6 09/44] builtin/apply: move init_apply_state() to apply.c

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we must make init_apply_state() usable outside "builtin/apply.c". Let's do that by moving it into a new "apply.c". Helped-by: Eric Sunshine Signed-off-by: Christian Couder --- Makefile| 1 + apply.c

[PATCH v6 13/44] builtin/apply: make apply_all_patches() return -1 on error

2016-06-10 Thread Christian Couder
To finish libifying the apply functionality, apply_all_patches() should not die() or exit() in case of error, but return -1. While doing that we must take care that file descriptors are properly closed and, if needed, reset a sensible value. Also, according to the lockfile API, when finished

[PATCH v6 05/44] builtin/apply: make parse_chunk() return a negative integer on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing or exit()ing. To do that in a compatible manner with the rest of the error handling in builtin/apply.c, parse_chunk() should return -1 instead of calling die() or exit(). As parse_chunk() is called

[PATCH v6 18/44] builtin/apply: make build_fake_ancestor() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", build_fake_ancestor() should return -1 instead of calling die(). Helped-by: Eric Sunshine

[PATCH v6 03/44] builtin/apply: read_patch_file() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. Let's do that by returning -1 instead of die()ing in read_patch_file(). Helped-by: Eric Sunshine Signed-off-by: Christian Couder --- builtin/apply.c

[PATCH v6 11/44] builtin/apply: make check_apply_state() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", check_apply_state() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 34/44] write_or_die: use warning() instead of fprintf(stderr, ...)

2016-06-10 Thread Christian Couder
Signed-off-by: Christian Couder --- write_or_die.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/write_or_die.c b/write_or_die.c index 49e80aa..c29f677 100644 --- a/write_or_die.c +++ b/write_or_die.c @@ -87,8 +87,7 @@ int

[PATCH v6 38/44] usage: add set_warn_routine()

2016-06-10 Thread Christian Couder
There are already set_die_routine() and set_error_routine(), so let's add set_warn_routine() as this will be needed in a following commit. Signed-off-by: Christian Couder --- git-compat-util.h | 1 + usage.c | 5 + 2 files changed, 6 insertions(+) diff

[PATCH v6 42/44] run-command: make dup_devnull() static again

2016-06-10 Thread Christian Couder
As there is no caller of dup_devnull() outside run-command.c any more, let's make dup_devnull() static again. Signed-off-by: Christian Couder --- run-command.c | 2 +- run-command.h | 6 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/run-command.c

[PATCH v6 39/44] usage: add get_error_routine() and get_warn_routine()

2016-06-10 Thread Christian Couder
Let's make it possible to get the current error_routine and warn_routine, so that we can store them before using set_error_routine() or set_warn_routine() to use new ones. This way we will be able put back the original routines, when we are done with using new ones. Signed-off-by: Christian

[PATCH v6 31/44] run-command: make dup_devnull() non static

2016-06-10 Thread Christian Couder
We will need this function in a later commit to redirect stdout and stderr to /dev/null. Helped-by: Johannes Sixt Helped-by: Johannes Schindelin Signed-off-by: Christian Couder --- run-command.c | 2 +- run-command.h | 6

[PATCH v6 14/44] builtin/apply: make parse_traditional_patch() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", parse_traditional_patch() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 12/44] builtin/apply: move check_apply_state() to apply.c

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we must make check_apply_state() usable outside "builtin/apply.c". Let's do that by moving it into "apply.c". Signed-off-by: Christian Couder --- apply.c | 32 apply.h | 1 +

[PATCH v6 35/44] apply: add 'be_silent' variable to 'struct apply_state'

2016-06-10 Thread Christian Couder
This variable should prevent anything to be printed on both stderr and stdout. Let's not take care of stdout and apply_verbosely for now though, as that will be taken care of in following patches. Signed-off-by: Christian Couder --- apply.c | 43

[PATCH v6 40/44] apply: change error_routine when be_silent is set

2016-06-10 Thread Christian Couder
Signed-off-by: Christian Couder --- apply.c | 23 +-- apply.h | 4 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/apply.c b/apply.c index 2529534..ef49709 100644 --- a/apply.c +++ b/apply.c @@ -109,6 +109,11 @@ void

[PATCH v6 41/44] am: use be_silent in 'struct apply_state' to shut up applying patches

2016-06-10 Thread Christian Couder
Signed-off-by: Christian Couder --- builtin/am.c | 29 - 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/builtin/am.c b/builtin/am.c index a16b06c..43f7316 100644 --- a/builtin/am.c +++ b/builtin/am.c @@ -1525,7 +1525,6 @@

[PATCH v6 30/44] apply: make some parsing functions static again

2016-06-10 Thread Christian Couder
Some parsing functions that were used in both "apply.c" and "builtin/apply.c" are now only used in the former, so they can be made static to "apply.c". Signed-off-by: Christian Couder --- apply.c | 6 +++--- apply.h | 5 - 2 files changed, 3 insertions(+), 8

[PATCH v6 24/44] builtin/apply: make write_out_results() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", write_out_results() should return -1 instead of calling exit(). Helped-by: Eric Sunshine

[PATCH v6 06/44] builtin/apply: make parse_single_patch() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in builtin/apply.c, parse_single_patch() should return -1 instead of calling die(). Let's do that by using error() and let's

[PATCH v6 25/44] builtin/apply: make try_create_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", try_create_file() should return -1 in case of error. Unfortunately try_create_file() currently returns -1 to

[PATCH v6 26/44] builtin/apply: make create_one_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", create_one_file() should return -1 instead of calling exit(). Signed-off-by: Christian Couder

[PATCH v6 28/44] apply: rename and move opt constants to apply.h

2016-06-10 Thread Christian Couder
The constants for the "inaccurate-eof" and the "recount" options will be used in both "apply.c" and "builtin/apply.c", so they need to go into "apply.h", and therefore they need a name that is more specific to the API they belong to. Signed-off-by: Christian Couder ---

[PATCH v6 27/44] builtin/apply: rename option parsing functions

2016-06-10 Thread Christian Couder
As these functions are going to be part of the libified apply api, let's give them a name that is more specific to the apply api. Signed-off-by: Christian Couder --- builtin/apply.c | 40 1 file changed, 20 insertions(+), 20

[PATCH v6 22/44] builtin/apply: make create_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", create_file() should just return what add_conflicted_stages_file() and add_index_file() are returning

[PATCH v6 21/44] builtin/apply: make add_index_file() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", add_index_file() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 07/44] builtin/apply: make parse_whitespace_option() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in builtin/apply.c, parse_whitespace_option() should return -1 instead of calling die(). Signed-off-by: Christian Couder

[PATCH v6 04/44] builtin/apply: make find_header() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in builtin/apply.c, find_header() should return -1 instead of calling die(). Unfortunately find_header() already returns -1 when

[PATCH v6 10/44] apply: make init_apply_state() return -1 instead of exit()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", init_apply_state() should return -1 instead of calling exit(). Helped-by: Eric Sunshine

[PATCH v6 17/44] builtin/apply: change die_on_unsafe_path() to check_unsafe_path()

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", die_on_unsafe_path() should return -1 using error() instead of calling die(), so while doing that let's

[PATCH v6 23/44] builtin/apply: make write_out_one_result() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of exit()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", write_out_one_result() should just return what remove_file() and create_file() are returning instead of

[PATCH v6 16/44] builtin/apply: make gitdiff_*() return -1 on error

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. To do that in a compatible manner with the rest of the error handling in "builtin/apply.c", gitdiff_*() functions should return -1 instead of calling die(). A previous patch made it possible for

[PATCH v6 01/44] apply: move 'struct apply_state' to apply.h

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we must make 'struct apply_state' usable outside "builtin/apply.c". Let's do that by creating a new "apply.h" and moving 'struct apply_state' there. Helped-by: Eric Sunshine Signed-off-by: Christian Couder

[PATCH v6 02/44] builtin/apply: make apply_patch() return -1 instead of die()ing

2016-06-10 Thread Christian Couder
To libify `git apply` functionality we have to signal errors to the caller instead of die()ing. As a first step in this direction, let's make apply_patch() return -1 in case of errors instead of dying. For now its only caller apply_all_patches() will exit(1) when apply_patch() return -1. In a

[PATCH v6 00/44] libify apply and use lib in am, part 2

2016-06-10 Thread Christian Couder
Goal This is a patch series about libifying `git apply` functionality, and using this libified functionality in `git am`, so that no 'git apply' process is spawn anymore. This makes `git am` significantly faster, so `git rebase`, when it uses the am backend, is also significantly faster.

Re: [PATCH 06/27] upload-pack: move "unshallow" sending code out of deepen()

2016-06-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > +static void deepen(int depth, const struct object_array *shallows) > +{ > + struct commit_list *result = NULL; > + int i; > + if (depth == INFINITE_DEPTH && !is_repository_shallow()) > + for (i = 0; i < shallows->nr;

Re: [PATCH 05/27] upload-pack: remove unused variable "backup"

2016-06-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > After the last patch, "result" and "backup" are the same. "result" used > to move, but the movement is now contained in send_shallow(). Delete > this redundant variable. > > Signed-off-by: Nguyễn Thái Ngọc Duy >

Re: [PATCH 04/27] upload-pack: move "shallow" sending code out of deepen()

2016-06-10 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > @@ -551,16 +565,7 @@ static void deepen(int depth, const struct object_array > *shallows) > backup = result = > get_shallow_commits(_obj, depth, > SHALLOW,

Re: [PATCH 1/2] bisect--helper: `is_expected_rev` shell function in C

2016-06-10 Thread Eric Sunshine
On Fri, Jun 10, 2016 at 9:39 AM, Pranit Bauva wrote: > On Fri, Jun 10, 2016 at 3:03 AM, Eric Sunshine > wrote: >> On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva wrote: >>> Reimplement `is_expected_rev` shell function in C.

[PATCH v2] Fix spelling of "occurred"

2016-06-10 Thread Peter Colberg
Signed-off-by: Peter Colberg --- config.c | 2 +- refs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config.c b/config.c index f51c56b..d7ce34b 100644 --- a/config.c +++ b/config.c @@ -1281,7 +1281,7 @@ static void git_config_raw(config_fn_t fn,

Re: [PATCH v2 5/6] lock_ref_for_update(): make error handling more uniform

2016-06-10 Thread David Turner
On Fri, 2016-06-10 at 10:14 +0200, Michael Haggerty wrote: > /* > + * Check whether the REF_HAVE_OLD and old_oid values stored in update > + * are consistent with the result read for the reference. error is > + * true iff there was an error reading the reference; otherwise, oid "error" is not a

Re: [PATCH] Fix spelling of "occurred"

2016-06-10 Thread Pranit Bauva
Hey Peter, On Fri, Jun 10, 2016 at 7:52 PM, Peter Colberg wrote: > Signed-off-by: Peter Colberg > --- > config.c| 2 +- > po/bg.po| 2 +- > po/ca.po| 2 +- > po/de.po| 2 +- > po/fr.po| 2 +- > po/git.pot | 2 +- > po/ko.po| 2 +- >

Re: Re* [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Stefan Beller
On Fri, Jun 10, 2016 at 11:13 AM, Junio C Hamano wrote: > Subject: [PATCH] diff: disable compaction heuristic for now > > http://lkml.kernel.org/g/20160610075043.ga13...@sigill.intra.peff.net > reports that a change to add a new "function" with common ending > with the existing

Re* [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Junio C Hamano
Jacob Keller writes: > I think we could use the indentation trick and it might help in this > case. I agree, let's disable this for this cycle and experiment in the > next one. Good catch, Peff. > > As others have said you will always be able to produce counter >

Re: [PATCH v2 00/94] libify apply and use lib in am

2016-06-10 Thread Johannes Sixt
Am 10.06.2016 um 13:11 schrieb Johannes Schindelin: On Fri, 10 Jun 2016, Christian Couder wrote: On Fri, Jun 10, 2016 at 9:01 AM, Johannes Schindelin wrote: I lost track in the meantime: were those issues with unclosed file handles and unreleased memory in the

Re: [PATCHv4] Documentation: triangular workflow

2016-06-10 Thread Junio C Hamano
"Philip Oakley" writes: >> +Preparation >> +~~~ >> + >> +Cloning from **PUBLISH**, which is a fork of **UPSTREAM** or an empty >> +repository. > > I agree here. To clone the upstream, to which you have no push access (by > definition), would leave the config badly

Re: [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Jacob Keller
On Fri, Jun 10, 2016 at 9:25 AM, Stefan Beller wrote: > On Fri, Jun 10, 2016 at 8:56 AM, Junio C Hamano wrote: >> Jeff King writes: >> >>> On Fri, Jun 10, 2016 at 03:50:43AM -0400, Jeff King wrote: >>> I found a false positive with the

Re: [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Stefan Beller
On Fri, Jun 10, 2016 at 8:56 AM, Junio C Hamano wrote: > Jeff King writes: > >> On Fri, Jun 10, 2016 at 03:50:43AM -0400, Jeff King wrote: >> >>> I found a false positive with the new compaction heuristic in v2.9: >>> [...] >> >> And by the way, this is less

Re: [BUG-ish] diff compaction heuristic false positive

2016-06-10 Thread Junio C Hamano
Jeff King writes: > On Fri, Jun 10, 2016 at 03:50:43AM -0400, Jeff King wrote: > >> I found a false positive with the new compaction heuristic in v2.9: >> [...] > > And by the way, this is less "hey neat, I found a case" and more "wow, > this is a lot worse than I thought". > > I

Re: [PATCH 05/38] refs: create a base class "ref_store" for files_ref_store

2016-06-10 Thread Junio C Hamano
Michael Haggerty writes: > On 06/09/2016 06:14 PM, Junio C Hamano wrote: >> Michael Haggerty writes: >> > +static struct ref_store *main_ref_store = NULL; > + > +static struct ref_store *submodule_ref_stores = NULL; Let's let

Re: [PATCH] Adds *~ to the .gitignore

2016-06-10 Thread Junio C Hamano
Jeff King writes: > On Thu, Jun 09, 2016 at 03:48:12PM -0700, Junio C Hamano wrote: > >> As I said, however, I could support a move to add some selected >> small number of common file extensions, as long as we have some >> (social) mechanism to avoid churning this file every time

Re: [PATCH v2 00/33] Yet more preparation for reference backends

2016-06-10 Thread Junio C Hamano
Michael Haggerty writes: > Junio, if you want to incorporate this revised version of the branch in > your big rewind of next, then we can pretend that the bug was never > there :-) Otherwise, tell me in what form you would like the fix and I > will be happy to provide it.

[PATCH] Fix spelling of "occurred"

2016-06-10 Thread Peter Colberg
Signed-off-by: Peter Colberg --- config.c| 2 +- po/bg.po| 2 +- po/ca.po| 2 +- po/de.po| 2 +- po/fr.po| 2 +- po/git.pot | 2 +- po/ko.po| 2 +- po/pt_PT.po | 2 +- po/ru.po| 2 +- po/sv.po| 2 +- po/vi.po| 2 +- po/zh_CN.po | 2 +-

Re: [PATCH 1/2] bisect--helper: `is_expected_rev` shell function in C

2016-06-10 Thread Pranit Bauva
Hey Eric, On Fri, Jun 10, 2016 at 3:03 AM, Eric Sunshine wrote: > On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva wrote: >> Reimplement `is_expected_rev` shell function in C. This will further be >> called from `check_expected_revs` function. This

Re: [PATCH v4 2/3] completion: add __git_get_option_value helper

2016-06-10 Thread SZEDER Gábor
Hallo Thomas, I saw v5 hit my mailbox while writing this. I glanced it over and it seems my comments here apply to that version as well. Quoting Thomas Braun : This function allows to search the commmand line and config files for an option, long and short,

Re: [PATCH v2 00/33] Yet more preparation for reference backends

2016-06-10 Thread Michael Haggerty
On 05/06/2016 06:13 PM, Michael Haggerty wrote: > [...] > This patch series is also available from my GitHub repo [2] as branch > "split-under-lock". > > [1] http://thread.gmane.org/gmane.comp.version-control.git/292772 > [2] https://github.com/mhagger/git I was reading this area of the code

[PATCH 27/27] fetch, upload-pack: --deepen=N extends shallow boundary by N commits

2016-06-10 Thread Nguyễn Thái Ngọc Duy
In git-fetch, --depth argument is always relative with the latest remote refs. This makes it a bit difficult to cover this use case, where the user wants to make the shallow history, say 3 levels deeper. It would work if remote refs have not moved yet, but nobody can guarantee that, especially

[PATCH 23/27] clone: define shallow clone boundary with --shallow-exclude

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-clone.txt | 5 + builtin/clone.c | 10 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index a410409..5049663 100644

[PATCH 26/27] upload-pack: add get_reachable_list()

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- object.h | 2 +- upload-pack.c | 52 +--- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/object.h b/object.h index

[PATCH 25/27] upload-pack: split check_unreachable() in two, prep for get_reachable_list()

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- upload-pack.c | 44 +++- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/upload-pack.c b/upload-pack.c index 3f40fcb..5942f99 100644 --- a/upload-pack.c +++ b/upload-pack.c @@

[PATCH 24/27] t5500, t5539: tests for shallow depth excluding a ref

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t5500-fetch-pack.sh | 21 + t/t5539-fetch-http-shallow.sh | 22 ++ 2 files changed, 43 insertions(+) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index 26f050d..145b370

[PATCH 19/27] t5500, t5539: tests for shallow depth since a specific date

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- t/t5500-fetch-pack.sh | 24 t/t5539-fetch-http-shallow.sh | 25 + 2 files changed, 49 insertions(+) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index

[PATCH 18/27] clone: define shallow clone boundary based on time with --shallow-since

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 3 +++ builtin/clone.c | 16 +--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Documentation/git-clone.txt

[PATCH 20/27] refs: add expand_ref()

2016-06-10 Thread Nguyễn Thái Ngọc Duy
This is basically dwim_ref() without @{} support. To be used on the server side where we want to expand abbreviated to full ref names and nothing else. The first user is "git clone/fetch --shallow-exclude". Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano

[PATCH 22/27] fetch: define shallow boundary with --shallow-exclude

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/fetch-options.txt | 5 + Documentation/git-fetch-pack.txt| 5 + Documentation/gitremote-helpers.txt | 4 builtin/fetch-pack.c| 7 +++ builtin/fetch.c | 13

[PATCH 21/27] upload-pack: support define shallow boundary by excluding revisions

2016-06-10 Thread Nguyễn Thái Ngọc Duy
This should allow the user to say "create a shallow clone of this branch after version ". Short refs are accepted and expanded at the server side with expand_ref() because we cannot expand (unknown) refs from the client side. Like deepen-since, deepen-not cannot be used with deepen. But

[PATCH 13/27] fetch-pack.c: mark strings for translating

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- fetch-pack.c | 75 ++-- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/fetch-pack.c b/fetch-pack.c index

[PATCH 15/27] shallow.c: implement a generic shallow boundary finder based on rev-list

2016-06-10 Thread Nguyễn Thái Ngọc Duy
Instead of a custom commit walker like get_shallow_commits(), this new function uses rev-list to mark NOT_SHALLOW to all reachable commits, except borders. The definition of reachable is to be defined by the protocol later. This makes it more flexible to define shallow boundary. The way we find

[PATCH 16/27] upload-pack: add deepen-since to cut shallow repos based on time

2016-06-10 Thread Nguyễn Thái Ngọc Duy
This should allow the user to say "create a shallow clone containing the work from last year" (once the client side is fixed up, of course). In theory deepen-since and deepen (aka --depth) can be used together to draw the shallow boundary (whether it's intersection or union is up to discussion,

  1   2   >