Hi Hannes,
On Thu, 9 Jun 2016, Johannes Sixt wrote:
> Meanwhile, I have retrained my muscle memory to stop before typing "-i" after
> "rebase" for an opportunity to consider whether bare rebase can be used.
>
> What should I say? I am impressed. It's like 100 times faster than rebase -i
> (on Wi
I found a false positive with the new compaction heuristic in v2.9:
-- >8 --
# start with a simple file
cat >file.rb <<\EOF
def foo
do_foo_stuff()
common_ending()
end
EOF
git add file.rb
git commit -m base
# and then add another function with a similar ending
cat >>file.rb <<\EOF
def bar
Hey Eric,
On Fri, Jun 10, 2016 at 3:24 AM, Eric Sunshine wrote:
> On Wed, Jun 8, 2016 at 11:24 AM, Pranit Bauva wrote:
>> Reimplement the `check_expected_revs` shell function in C and add a
>> `--check-expected-revs` subcommand to `git bisect--helper` to call it
>> from git-bisect.sh .
>> [...]
On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote:
> We want ref_stores to be polymorphic, so invent a base class of which
> files_ref_store is a derived class. For now there is a one-to-one
> relationship between ref_stores and submodules.
>
> Signed-off-by: Michael Haggerty
> ---
> diff --
I want to broaden the scope of this test file, so rename it accordingly.
Signed-off-by: Michael Haggerty
---
t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-errors.sh} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename t/{t1404-update-ref-df-conflicts.sh => t1404-update-ref-er
The tests already set a variable called prefix and passed its value as
the first argument to this function. The old argument handling was
overwriting the global variable with its same value rather than creating
a local variable.
So change test_update_rejected to refer to the global variable rather
Some of the error messages will be improved in subsequent commits.
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 221 ++-
1 file changed, 219 insertions(+), 2 deletions(-)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref
Signed-off-by: Michael Haggerty
---
t/t1404-update-ref-errors.sh | 10 ++
1 file changed, 10 insertions(+)
diff --git a/t/t1404-update-ref-errors.sh b/t/t1404-update-ref-errors.sh
index 541cad1..7cfeaa9 100755
--- a/t/t1404-update-ref-errors.sh
+++ b/t/t1404-update-ref-errors.sh
@@ -3,6
This is v2 of the patch series. Thanks to Johannes Sixt and Junio for
their comments about v1 [1].
Changes since v1:
* In t1404, don't use non-portable `local`: change function
test_update_rejected to refer to the global `$prefix` variable
rather than taking it as a parameter.
* Because that
To aid the effort, extract a new function, check_old_oid(), and use it
in the two places where the read value of the reference has to be
checked against update->old_sha1.
Update tests to reflect the improvements.
Signed-off-by: Michael Haggerty
---
refs/files-backend.c | 77
If we're overwriting a symref with a SHA-1, we need to resolve the value
of the symref (1) to check against update->old_sha1 and (2) to write to
its reflog. However, we've already read the symref itself and know its
referent. So there is no need to read the symref's value through the
symref; we can
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 diffed the old and new output for the top 10,000
On 06/10/2016 09:50 AM, Jeff King wrote:
> I found a false positive with the new compaction heuristic in v2.9:
> [...]
> I get this rather unfortunate diff:
>
> $ git diff
> diff --git a/file.rb b/file.rb
> index bd9d1cb..67fbeba 100644
> --- a/file.rb
> +++ b/file.rb
> @@
On Fri, Jun 10, 2016 at 10:31:13AM +0200, Michael Haggerty wrote:
> I've often thought that indentation would be a good, fairly universal
> signal for diff to use when deciding how to slide hunks around. Most
> source code is indented in a way that shows its structure.
>
> I propose the following
Hi Dscho,
On Fri, Jun 10, 2016 at 9:01 AM, Johannes Schindelin
wrote:
> Hi Hannes,
>
> On Thu, 9 Jun 2016, Johannes Sixt wrote:
>
>> Meanwhile, I have retrained my muscle memory to stop before typing "-i" after
>> "rebase" for an opportunity to consider whether bare rebase can be used.
>>
>> What
This function allows to search the commmand line and config
files for an option, long and short, with mandatory value.
The function would return e.g. for the command line
"git status -uno --untracked-files=all" the result
"all" regardless of the config option.
Signed-off-by: Thomas Braun
---
co
Changes since v4:
- Add SP before backslash at EOL
- Fix line continuation issue in __git_get_option_value,
now t9902 passes again
Thomas Braun (3):
completion: factor out untracked file modes into a variable
completion: add __git_get_option_value helper
completion: add git status
contri
Signed-off-by: Thomas Braun
---
contrib/completion/git-completion.bash | 50 ++
1 file changed, 50 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 0bf67c9..ddda5e5 100644
--- a/contrib/completion/gi
Am 09.06.2016 um 19:21 schrieb Junio C Hamano:
> * tb/complete-status (2016-06-06) 3 commits
> - completion: add git status
> - completion: add __git_get_option_value helper
> - completion: factor out untracked file modes into a variable
>
> The completion script (in contrib/) learned to compl
Signed-off-by: Thomas Braun
---
contrib/completion/git-completion.bash | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 3402475..addea89 100644
--- a/contrib/completion/git-completion.bash
Signed-off-by: Thomas Braun
---
contrib/completion/git-completion.bash | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 3402475..addea89 100644
--- a/contrib/completion/git-completion.bash
Signed-off-by: Thomas Braun
---
contrib/completion/git-completion.bash | 50 ++
1 file changed, 50 insertions(+)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index 0bf67c9..ddda5e5 100644
--- a/contrib/completion/gi
On 06/10/2016 10:41 AM, Jeff King wrote:
> On Fri, Jun 10, 2016 at 10:31:13AM +0200, Michael Haggerty wrote:
>
>> I've often thought that indentation would be a good, fairly universal
>> signal for diff to use when deciding how to slide hunks around. Most
>> source code is indented in a way that s
Hi Christian,
On Fri, 10 Jun 2016, Christian Couder wrote:
> On Fri, Jun 10, 2016 at 9:01 AM, Johannes Schindelin
> wrote:
> >
> > On Thu, 9 Jun 2016, Johannes Sixt wrote:
> >
> >> Meanwhile, I have retrained my muscle memory to stop before typing "-i"
> >> after
> >> "rebase" for an opportunit
If the given string list has strdup_strings set (*), the string will be
duplicated again. Pointless and leak memory. Ignore that flag.
(*) only interpret-trailers.c does it at the moment
Signed-off-by: Nguyễn Thái Ngọc Duy
---
parse-options-cb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletio
On 06/10/2016 10:08 AM, Eric Sunshine wrote:
> On Fri, Jun 3, 2016 at 5:03 PM, Michael Haggerty wrote:
>> We want ref_stores to be polymorphic, so invent a base class of which
>> files_ref_store is a derived class. For now there is a one-to-one
>> relationship between ref_stores and submodules.
>>
On Mon, Jun 6, 2016 at 2:43 AM, Eric Sunshine wrote:
>> /*
>> * The commits out of the rev-list are not ancestors of
>> * our ref.
>> */
>> - i = read_in_full(cmd.out, namebuf, 1);
>> + i = read_in_full(cmd.out, buf, 1);
>
> s/1/sizeof(buf)/ perhaps o
Hi,
Could someone please show me, where the timestamp is rewritten in the
code, so that I could change it and compile a local copy of git, that
fits my needs? Perhaps I could even create a patch, that implements
"--preserve-timestamps" and send it back.
I've already searched in git-svn.perl but w
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 10/27.
Interdiff
diff --git a/builtin/clone.c b/builtin/clone.c
index 5ccf6b7..3849231
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
Signed-off-by: Junio C Hamano
---
upload-pack.c | 9 -
1 file changed, 4 insertions(+
This is a prep step for further refactoring. Besides reindentation and
s/shallows\./shallows->/g, no other changes are expected.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
upload-pack.c | 99 +++
1 file changed,
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index bfb7985..615bfb2 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -276,7 +276,7 @@ static void create_p
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
upload-pack.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 97ed620..0eb9a0b 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -538,6 +538,2
Signed-off-by: Nguyễn Thái Ngọc Duy
---
remote-curl.c | 46 ++
1 file changed, 18 insertions(+), 28 deletions(-)
diff --git a/remote-curl.c b/remote-curl.c
index c704857..fd030c1 100644
--- a/remote-curl.c
+++ b/remote-curl.c
@@ -725,38 +725,28 @@ stat
The shallow repo could be deepened or shortened when then user gives
--depth. But in future that won't be the only way to deepen/shorten a
repo. Stop relying on args->depth in this mode. Future deepening
methods can simply set this flag on instead of updating all these if
expressions.
The new name
On error check_non_tip() will die and not closing file descriptors is no
big deal. The next patch will split the majority of this function out
for reuse in other cases, where die() may not be the only outcome. Same
story for popping SIGPIPE out of the signal chain. So let's make sure we
clean thing
This reduces the number of "if (verbose)" which makes it a bit easier
to read imo. It also makes it easier to redirect all these printouts,
to a file for example.
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
fetch-pack.c | 88 +---
Also add some more comments in this code because it takes too long to
understand what it does (to me, who should be familiar enough to
understand this code well!)
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
upload-pack.c | 39 ++-
1
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
builtin/fetch-pack.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c
index 9b2a514..8332d3d 100644
--- a/builtin/fetch-pack.c
+++ b/builtin/fetch-pac
For now we can handle two types, string and boolean, in
set_helper_option(). Later on we'll add string_list support, which does
not fit well. The new function strbuf_set_helper_option() can be reused
for a separate function that handles string-list.
Signed-off-by: Nguyễn Thái Ngọc Duy
---
transp
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
upload-pack.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 615bfb2..60f2e5e 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -641,9 +641,9 @@ static void receive_
Signed-off-by: Nguyễn Thái Ngọc Duy
---
upload-pack.c | 36 +++-
1 file changed, 23 insertions(+), 13 deletions(-)
diff --git a/upload-pack.c b/upload-pack.c
index 1e8b025..b6f3756 100644
--- a/upload-pack.c
+++ b/upload-pack.c
@@ -451,7 +451,7 @@ static int is_ou
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, bu
Signed-off-by: Nguyễn Thái Ngọc Duy
Signed-off-by: Junio C Hamano
---
Documentation/fetch-options.txt | 4
Documentation/git-fetch-pack.txt| 4
Documentation/gitremote-helpers.txt | 3 +++
builtin/fetch-pack.c| 4
builtin/fetch.c | 2
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 4020744..08caf1d 100644
--- a/fetch-pack.c
+++ b
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 bo
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 deepen-no
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 ++---
fetch-pa
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 e5f83bf..26f050d 100755
--- a/t/t5
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 b/Documentation/git-clone.txt
index b7c467a..
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
---
refs.c | 8 +++
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 f8b6442..614a006 100644
--- a/object.h
+
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
@@ -452,23 +452,23 @@ static
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
--- a/Documentation/g
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 100755
--- a/t/t5500-fe
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 when
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 agai
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, with mandatory value.
The function
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 is a quite small
>> function thus subcommand facil
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 +-
refs.h | 2 +-
13 f
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.
We actually can do both
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 somebody
>> new
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 BSS take care of these initialization.
>> [...]
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 diffed the old a
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 "hey neat, I found a case" and more "w
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 new compaction heuristic in v2.9:
[...]
>>>
>>> An
"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 mis-set for the basic u
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 error code paths addressed system
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
> examples, that's the nature of he
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 one at the end of t
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 +-
> po/pt_PT.po | 2 +-
> po/ru.po| 2
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
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, void *data)
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. This will further be
>>> called from `check_expected_revs` function. This
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(&want_obj, depth,
> SHALLOW, NOT_SHALLOW);
> - whi
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
> Signed-off-by: Junio C Hamano
> ---
Ah, OK ;-) Ha
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; i++) {
> +
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 lat
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.
Pre
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
---
apply.h | 100 ++
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
Signed-off-by: Chri
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 change
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 calli
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 gitdif
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
---
builtin/app
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
---
buil
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 no
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 adjust
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
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 deletions(-)
diff --git a/apply.
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
---
builtin/
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
Signed-off-by: Chr
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
instead
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
---
apply.h | 3 +++
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 deletions(-)
diff --git a/bui
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 +--
appl
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 clear_apply_state(struct apply_state *
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 b/run-command.c
index d8ed
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 Coude
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 ++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/run
1 - 100 of 144 matches
Mail list logo