Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-08 Thread Martin von Zweigbergk
, not an implementation glitch. Pardon HTML, misspellings and grammos, typed on a tablet. On Nov 7, 2014 11:10 PM, Martin von Zweigbergk martinv...@gmail.com wrote: Trying again from plain old gmail which I think does not send a multipart content. On Fri, Nov 7, 2014 at 11:06 PM, Martin von Zweigbergk

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-08 Thread Martin von Zweigbergk
First of all, thanks again for spending time on this. On Sat, Nov 8, 2014 at 12:30 AM, Jeff King p...@peff.net wrote: On Fri, Nov 07, 2014 at 11:35:59PM -0800, Junio C Hamano wrote: So just to be clear, the behavior we want is that: echo foo some-new-path git add some-new-path git

Re: [RFC] git checkout $tree -- $path always rewrites files

2014-11-07 Thread Martin von Zweigbergk
Trying again from plain old gmail which I think does not send a multipart content. On Fri, Nov 7, 2014 at 11:06 PM, Martin von Zweigbergk martinv...@gmail.com wrote: Is this also related to git checkout $rev . not removing removed files? What you say about the difference in implementation

Re: [RFC/PATCH] rebase: use reflog to find common base with upstream

2013-12-08 Thread Martin von Zweigbergk
On Sun, Dec 8, 2013 at 12:06 PM, John Keeping j...@keeping.me.uk wrote: Commit 15a147e (rebase: use @{upstream} if no upstream specified, 2011-02-09) says: Make it default to 'git rebase @{upstream}'. That is also what 'git pull [--rebase]' defaults to, so it only makes sense

Re: [PATCH 16/16] add: avoid yoda conditions

2013-10-31 Thread Martin von Zweigbergk
I was recently confused by the yoda condition in this block of code from [1] + for (i = 0; i revs.nr; i++) + if (bases-item-object == revs.commit[i]-object) + break; /* found */ + if (revs.nr = i) I think I was particularly surprised because it came so soon after the i revs.nr. I didn't bother

Re: [PATCH v3 2/2] merge-base: teach --fork-point mode

2013-10-25 Thread Martin von Zweigbergk
Thanks for taking care of this! Maybe John or I can finally get the changes to rebase done after this. A few comments below. Sorry I didn't find time to review the earlier revisions. On Fri, Oct 25, 2013 at 2:38 PM, Junio C Hamano gits...@pobox.com wrote: + +where `origin/master` used to point

Re: Re* Bug report: reset -p HEAD

2013-10-24 Thread Martin von Zweigbergk
Sorry about the regression and thanks for report and fixes. On Thu, Oct 24, 2013 at 9:24 PM, Jeff King p...@peff.net wrote: On Thu, Oct 24, 2013 at 08:40:13PM -0700, Junio C Hamano wrote: Maarten de Vries maar...@de-vri.es writes: Some more info: It used to work as intended. Using a bisect

Re: [PATCH] rebase: use reflog to find common base with upstream

2013-10-22 Thread Martin von Zweigbergk
On Mon, Oct 21, 2013 at 4:24 AM, John Keeping j...@keeping.me.uk wrote: On Sun, Oct 20, 2013 at 10:03:29PM -0700, Martin von Zweigbergk wrote: On Wed, Oct 16, 2013 at 11:53 AM, John Keeping j...@keeping.me.uk wrote: Commit 15a147e (rebase: use @{upstream} if no upstream specified, 2011-02-09

Re: [PATCH] rebase: use reflog to find common base with upstream

2013-10-21 Thread Martin von Zweigbergk
On Wed, Oct 16, 2013 at 11:53 AM, John Keeping j...@keeping.me.uk wrote: Commit 15a147e (rebase: use @{upstream} if no upstream specified, 2011-02-09) says: Make it default to 'git rebase @{upstream}'. That is also what 'git pull [--rebase]' defaults to, so it only makes sense

Re: [PATCH] rebase: use reflog to find common base with upstream

2013-10-20 Thread Martin von Zweigbergk
On Wed, Oct 16, 2013 at 11:53 AM, John Keeping j...@keeping.me.uk wrote: Commit 15a147e (rebase: use @{upstream} if no upstream specified, 2011-02-09) says: Make it default to 'git rebase @{upstream}'. That is also what 'git pull [--rebase]' defaults to, so it only makes sense

Re: [PATCH 04/13] Use git merge instead of git pull .

2013-08-24 Thread Martin von Zweigbergk
On Sat, Aug 24, 2013 at 9:19 PM, Jonathan Nieder jrnie...@gmail.com wrote: Thomas Ackermann wrote: --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -1784,17 +1784,6 @@ repository that you pulled from. fast-forwards,fast-forward; instead, your branch will just be

Re: detached HEAD before root commit - possible?

2013-06-23 Thread Martin von Zweigbergk
On Sun, Jun 23, 2013 at 4:54 PM, Jonathan Nieder jrnie...@gmail.com wrote: In other words, HEAD always either points to an unborn or existing branch or an existing commit. It's not clear to me what it would mean to detach from an unborn branch. I think it should mean that the next commit

Re: [PATCH mz/rebase-tests] rebase topology tests: fix commit names on case-insensitive file systems

2013-06-18 Thread Martin von Zweigbergk
On Tue, Jun 18, 2013 at 12:28 AM, Johannes Sixt j.s...@viscovery.net wrote: The recently introduced tests used uppercase letters to denote cherry-picks of commits having the corresponding lowercase letter names. The helper functions also set up tags with the names of the commits. But this

Re: [PATCH 1/3] rebase: guard against missing files in read_basic_state()

2013-06-15 Thread Martin von Zweigbergk
On Thu, Jun 13, 2013 at 3:29 PM, Junio C Hamano gits...@pobox.com wrote: Ramkumar Ramachandra artag...@gmail.com writes: A more troublesome is that nobody seems to check the return value of this function. If head-name, onto or orig-head is missing, is that an error condition that should make

Re: [PATCH] reset: trivial refactoring

2013-06-13 Thread Martin von Zweigbergk
On Thu, Jun 13, 2013 at 11:15 AM, Felipe Contreras felipe.contre...@gmail.com wrote: @@ -82,7 +82,7 @@ static int reset_index(const unsigned char *sha1, int reset_type, int quiet) if (unpack_trees(nr, desc, opts)) return -1; - if (reset_type == MIXED ||

Re: Bad attitudes and problems in the Git community (was: Re: [PATCH 2/2] Move sequencer to builtin)

2013-06-10 Thread Martin von Zweigbergk
On Mon, Jun 10, 2013 at 9:58 AM, Felipe Contreras felipe.contre...@gmail.com wrote: On Mon, Jun 10, 2013 at 4:05 AM, Stefano Lattarini stefano.lattar...@gmail.com wrote: You need two sides to have an argument. I disagree. Unless you mean than, whenever a part behaves in a hostile and

Re: Bad attitudes and problems in the Git community (was: Re: [PATCH 2/2] Move sequencer to builtin)

2013-06-10 Thread Martin von Zweigbergk
Yes, sorry. I find this whole story quite amusing (albeit distracting and unnecessary), but sorry for adding to the spam. I'll be quiet now. On Mon, Jun 10, 2013 at 11:33 AM, Martin Langhoff martin.langh...@gmail.com wrote: On Mon, Jun 10, 2013 at 2:11 PM, Martin von Zweigbergk martinv

Re: [PATCH v4 45/45] tests: update topology tests

2013-06-10 Thread Martin von Zweigbergk
On Sun, Jun 9, 2013 at 9:40 AM, Felipe Contreras felipe.contre...@gmail.com wrote: Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- t/t3425-rebase-topology-merges.sh | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git

[PATCH v6 3/7] add tests for rebasing of empty commits

2013-06-07 Thread Martin von Zweigbergk
Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/t3401-rebase-partial.sh | 24 t/t3421-rebase-topology-linear.sh | 58 +++ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/t/t3401-rebase-partial.sh b/t

[PATCH v6 2/7] add tests for rebasing with patch-equivalence present

2013-06-07 Thread Martin von Zweigbergk
Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/lib-rebase.sh | 17 t/t3421-rebase-topology-linear.sh | 85 +++ 2 files changed, 102 insertions(+) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 1e0ff28..4b74ae4

[PATCH v6 1/7] add simple tests of consistency across rebase types

2013-06-07 Thread Martin von Zweigbergk
Helped-by: Johannes Sixt j...@kdbg.org Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/lib-rebase.sh | 16 t/t3421-rebase-topology-linear.sh | 78 +++ 2 files changed, 94 insertions(+) create mode 100755 t/t3421

[PATCH v6 7/7] tests: move test for rebase messages from t3400 to t3406

2013-06-07 Thread Martin von Zweigbergk
t3406 is supposed to test messages from rebase operation, so let's move tests in t3400 that fit that description into 3406. Most of the functionality they tested, except for the messages, has now been subsumed by t3420. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/t3400

[PATCH v6 4/7] add tests for rebasing root

2013-06-07 Thread Martin von Zweigbergk
Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/t3421-rebase-topology-linear.sh | 129 ++ 1 file changed, 129 insertions(+) diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh index f19f0d0..e67add6 100755

[PATCH v6 6/7] t3406: modernize style

2013-06-07 Thread Martin von Zweigbergk
Update the following: - Quote 'setup' - Remove blank lines within test case body - Use test_commit instead of custom quick_one - Create branch topic from tag created by test_commit Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/t3406-rebase-message.sh | 30

[PATCH v6 0/8] Rebase topology test

2013-06-07 Thread Martin von Zweigbergk
Changes since v5: * Improved test_linear_range * Changed TODOs to be about consistency, not --topo-order Martin von Zweigbergk (7): add simple tests of consistency across rebase types add tests for rebasing with patch-equivalence present add tests for rebasing of empty commits add

[PATCH v6 5/7] add tests for rebasing merged history

2013-06-07 Thread Martin von Zweigbergk
Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- t/t3400-rebase.sh | 31 + t/t3401-rebase-partial.sh | 45 --- t/t3404-rebase-interactive.sh | 10 +- t/t3409-rebase-preserve-merges.sh | 53 t/t3425-rebase-topology-merges.sh | 258

Re: [PATCH v5 1/7] add simple tests of consistency across rebase types

2013-06-04 Thread Martin von Zweigbergk
On Mon, Jun 3, 2013 at 11:15 PM, Johannes Sixt j.s...@viscovery.net wrote: Am 6/4/2013 7:14, schrieb Martin von Zweigbergk: On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano gits...@pobox.com wrote: + +# checks that the revisions in $2 represent a linear range with the +# subjects in $1

Re: [PATCH v5 5/7] add tests for rebasing merged history

2013-06-04 Thread Martin von Zweigbergk
On Tue, Jun 4, 2013 at 10:18 AM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: --- +#TODO: make all flavors of rebase use --topo-order +test_run_rebase success 'e n o' '' +test_run_rebase success 'e n o' -m +test_run_rebase success 'n o e' -i I

Re: [PATCH v2 1/7] add simple tests of consistency across rebase types

2013-06-03 Thread Martin von Zweigbergk
On Tue, May 28, 2013 at 11:39 PM, Martin von Zweigbergk martinv...@gmail.com wrote: create mode 100755 t/t3420-rebase-topology-linear.sh Just FYI, there's another test case with the same number (t3420-rebase-autostash) in pu. I don't know how you normally handle such cases. -- To unsubscribe

Re: [PATCH v2 1/7] add simple tests of consistency across rebase types

2013-06-03 Thread Martin von Zweigbergk
On Mon, Jun 3, 2013 at 11:05 AM, Junio C Hamano gits...@pobox.com wrote: Martin von Zweigbergk martinv...@gmail.com writes: On Tue, May 28, 2013 at 11:39 PM, Martin von Zweigbergk martinv...@gmail.com wrote: create mode 100755 t/t3420-rebase-topology-linear.sh Just FYI, there's another

[PATCH v5 7/7] tests: move test for rebase messages from t3400 to t3406

2013-06-03 Thread Martin von Zweigbergk
t3406 is supposed to test messages from rebase operation, so let's move tests in t3400 that fit that description into 3406. Most of the functionality they tested, except for the messages, has now been subsumed by t3420. --- t/t3400-rebase.sh | 22 --

[PATCH v5 0/7] Rebase topology test

2013-06-03 Thread Martin von Zweigbergk
The only change since v4 should be that t3420 was renamed t3421. Martin von Zweigbergk (7): add simple tests of consistency across rebase types add tests for rebasing with patch-equivalence present add tests for rebasing of empty commits add tests for rebasing root add tests

[PATCH v5 2/7] add tests for rebasing with patch-equivalence present

2013-06-03 Thread Martin von Zweigbergk
--- t/lib-rebase.sh | 17 t/t3421-rebase-topology-linear.sh | 85 +++ 2 files changed, 102 insertions(+) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 62b3887..16eeb1c 100644 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@

[PATCH v5 3/7] add tests for rebasing of empty commits

2013-06-03 Thread Martin von Zweigbergk
--- t/t3401-rebase-partial.sh | 24 t/t3421-rebase-topology-linear.sh | 58 +++ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh index 58f4823..7ba1797 100755 ---

[PATCH v5 6/7] t3406: modernize style

2013-06-03 Thread Martin von Zweigbergk
Update the following: - Quote 'setup' - Remove blank lines within test case body - Use test_commit instead of custom quick_one - Create branch topic from tag created by test_commit --- t/t3406-rebase-message.sh | 30 +- 1 file changed, 9 insertions(+), 21

[PATCH v5 4/7] add tests for rebasing root

2013-06-03 Thread Martin von Zweigbergk
--- t/t3421-rebase-topology-linear.sh | 129 ++ 1 file changed, 129 insertions(+) diff --git a/t/t3421-rebase-topology-linear.sh b/t/t3421-rebase-topology-linear.sh index 81e3d59..659a7b3 100755 --- a/t/t3421-rebase-topology-linear.sh +++

[PATCH v5 1/7] add simple tests of consistency across rebase types

2013-06-03 Thread Martin von Zweigbergk
Helped-by: Johannes Sixt j...@kdbg.org --- t/lib-rebase.sh | 15 t/t3421-rebase-topology-linear.sh | 78 +++ 2 files changed, 93 insertions(+) create mode 100755 t/t3421-rebase-topology-linear.sh diff --git a/t/lib-rebase.sh

[PATCH v5 5/7] add tests for rebasing merged history

2013-06-03 Thread Martin von Zweigbergk
--- t/t3400-rebase.sh | 31 + t/t3401-rebase-partial.sh | 45 --- t/t3404-rebase-interactive.sh | 10 +- t/t3409-rebase-preserve-merges.sh | 53 t/t3425-rebase-topology-merges.sh | 258 ++ 5 files changed, 260

Re: [PATCH v5 1/7] add simple tests of consistency across rebase types

2013-06-03 Thread Martin von Zweigbergk
On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano gits...@pobox.com wrote: + +# checks that the revisions in $2 represent a linear range with the +# subjects in $1 +test_linear_range () { + ! { git log --format=%p $2 | sane_grep ;} An interesting way to spell: test $(git rev-list

[PATCH v4 5/7] add tests for rebasing merged history

2013-06-01 Thread Martin von Zweigbergk
--- The reason is that this check is incomplete: test_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD Nice catch! This should fix it. I couldn't use the method you suggested because of how test_revision_subjects works (repeated revisions are ignored), but this makes the check stricter

[PATCH v3 0/7] Rebase topology test

2013-05-31 Thread Martin von Zweigbergk
Patches are now expected to be dropped iff they are on upstream. I've also followed all of Johannes's other suggestions except for the one about topo-order. Martin von Zweigbergk (7): add simple tests of consistency across rebase types add tests for rebasing with patch-equivalence present

[PATCH v3 1/7] add simple tests of consistency across rebase types

2013-05-31 Thread Martin von Zweigbergk
Helped-by: Johannes Sixt j...@kdbg.org --- t/lib-rebase.sh | 15 t/t3420-rebase-topology-linear.sh | 78 +++ 2 files changed, 93 insertions(+) create mode 100755 t/t3420-rebase-topology-linear.sh diff --git a/t/lib-rebase.sh

[PATCH v3 3/7] add tests for rebasing of empty commits

2013-05-31 Thread Martin von Zweigbergk
--- t/t3401-rebase-partial.sh | 24 t/t3420-rebase-topology-linear.sh | 58 +++ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh index 58f4823..7ba1797 100755 ---

[PATCH v3 2/7] add tests for rebasing with patch-equivalence present

2013-05-31 Thread Martin von Zweigbergk
--- t/lib-rebase.sh | 17 t/t3420-rebase-topology-linear.sh | 85 +++ 2 files changed, 102 insertions(+) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 62b3887..16eeb1c 100644 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@

[PATCH v3 7/7] tests: move test for rebase messages from t3400 to t3406

2013-05-31 Thread Martin von Zweigbergk
t3406 is supposed to test messages from rebase operation, so let's move tests in t3400 that fit that description into 3406. Most of the functionality they tested, except for the messages, has now been subsumed by t3420. --- t/t3400-rebase.sh | 22 --

[PATCH v3 5/7] add tests for rebasing merged history

2013-05-31 Thread Martin von Zweigbergk
--- t/t3400-rebase.sh | 31 + t/t3401-rebase-partial.sh | 45 --- t/t3404-rebase-interactive.sh | 10 +- t/t3409-rebase-preserve-merges.sh | 53 t/t3425-rebase-topology-merges.sh | 252 ++ 5 files changed, 254

[PATCH v3 4/7] add tests for rebasing root

2013-05-31 Thread Martin von Zweigbergk
--- t/t3420-rebase-topology-linear.sh | 129 ++ 1 file changed, 129 insertions(+) diff --git a/t/t3420-rebase-topology-linear.sh b/t/t3420-rebase-topology-linear.sh index 81e3d59..659a7b3 100755 --- a/t/t3420-rebase-topology-linear.sh +++

[PATCH v3 6/7] t3406: modernize style

2013-05-31 Thread Martin von Zweigbergk
Update the following: - Quote 'setup' - Remove blank lines within test case body - Use test_commit instead of custom quick_one - Create branch topic from tag created by test_commit --- t/t3406-rebase-message.sh | 30 +- 1 file changed, 9 insertions(+), 21

Re: [PATCH v2 2/7] add tests for rebasing with patch-equivalence present

2013-05-30 Thread Martin von Zweigbergk
On Wed, May 29, 2013 at 10:41 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Thu, May 30, 2013 at 12:30 AM, Martin von Zweigbergk martinv...@gmail.com wrote: On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/29/2013 8:39, schrieb Martin von Zweigbergk

Re: [PATCH v2 2/7] add tests for rebasing with patch-equivalence present

2013-05-30 Thread Martin von Zweigbergk
On Wed, May 29, 2013 at 11:40 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Thu, May 30, 2013 at 1:14 AM, Martin von Zweigbergk martinv...@gmail.com wrote: On Wed, May 29, 2013 at 10:41 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Thu, May 30, 2013 at 12:30 AM, Martin

Re: [PATCH v2 2/7] add tests for rebasing with patch-equivalence present

2013-05-30 Thread Martin von Zweigbergk
On Thu, May 30, 2013 at 5:54 AM, Johannes Sixt j...@kdbg.org wrote: Am 30.05.2013 07:30, schrieb Martin von Zweigbergk: On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/29/2013 8:39, schrieb Martin von Zweigbergk: +# f +# / +# a---b---c---g---h

Re: [PATCH v2 5/7] add tests for rebasing merged history

2013-05-30 Thread Martin von Zweigbergk
On Wed, May 29, 2013 at 12:57 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/29/2013 8:39, schrieb Martin von Zweigbergk: +# a---b---c +# \ \ +# d---e \ +#\ \ \ +# n---o---w---v +# \ +# z +#TODO

Re: [RFC/PATCH v2 3/8] rebase: cherry-pick: fix sequence continuation

2013-05-29 Thread Martin von Zweigbergk
:-) On Tue, May 28, 2013 at 11:05 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, May 29, 2013 at 12:51 AM, Martin von Zweigbergk martinv...@gmail.com wrote: On Tue, May 28, 2013 at 10:41 PM, Felipe Contreras felipe.contre...@gmail.com wrote: One change splits, the other

[PATCH v2 3/7] add tests for rebasing of empty commits

2013-05-29 Thread Martin von Zweigbergk
--- t/t3401-rebase-partial.sh | 24 t/t3420-rebase-topology-linear.sh | 58 +++ 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh index 58f4823..7ba1797 100755 ---

[PATCH v2 6/7] t3406: modernize style

2013-05-29 Thread Martin von Zweigbergk
Update the following: - Quote 'setup' - Remove blank lines within test case body - Use test_commit instead of custom quick_one - Create branch topic from tag created by test_commit --- t/t3406-rebase-message.sh | 30 +- 1 file changed, 9 insertions(+), 21

[PATCH v2 1/7] add simple tests of consistency across rebase types

2013-05-29 Thread Martin von Zweigbergk
Helped-by: Johannes Sixt j...@kdbg.org --- t/lib-rebase.sh | 15 t/t3420-rebase-topology-linear.sh | 78 +++ 2 files changed, 93 insertions(+) create mode 100755 t/t3420-rebase-topology-linear.sh diff --git a/t/lib-rebase.sh

[PATCH v2 4/7] add tests for rebasing root

2013-05-29 Thread Martin von Zweigbergk
--- t/t3420-rebase-topology-linear.sh | 129 ++ 1 file changed, 129 insertions(+) diff --git a/t/t3420-rebase-topology-linear.sh b/t/t3420-rebase-topology-linear.sh index 40fe264..2429aa8 100755 --- a/t/t3420-rebase-topology-linear.sh +++

[PATCH v2 7/7] tests: move test for rebase messages from t3400 to t3406

2013-05-29 Thread Martin von Zweigbergk
t3406 is supposed to test messages from rebase operation, so let's move tests in t3400 that fit that description into 3406. Most of the functionality they tested, except for the messages, has now been subsumed by t3420. --- t/t3400-rebase.sh | 22 --

[PATCH v2 5/7] add tests for rebasing merged history

2013-05-29 Thread Martin von Zweigbergk
--- t/t3400-rebase.sh | 31 + t/t3401-rebase-partial.sh | 45 --- t/t3404-rebase-interactive.sh | 10 +- t/t3409-rebase-preserve-merges.sh | 53 t/t3425-rebase-topology-merges.sh | 250 ++ 5 files changed, 252

[PATCH v2 2/7] add tests for rebasing with patch-equivalence present

2013-05-29 Thread Martin von Zweigbergk
--- t/lib-rebase.sh | 17 t/t3420-rebase-topology-linear.sh | 85 +++ 2 files changed, 102 insertions(+) diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh index 62b3887..16eeb1c 100644 --- a/t/lib-rebase.sh +++ b/t/lib-rebase.sh @@

[PATCH v2 0/7] Rebase topology test

2013-05-29 Thread Martin von Zweigbergk
After way too long, here is finally a new version of the tests I sent at: http://thread.gmane.org/gmane.comp.version-control.git/205796. I have split the test up into two files. They stil take quite some time to run. Martin von Zweigbergk (7): add simple tests of consistency across rebase

Re: [PATCH v2 2/7] add tests for rebasing with patch-equivalence present

2013-05-29 Thread Martin von Zweigbergk
On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/29/2013 8:39, schrieb Martin von Zweigbergk: +# f +# / +# a---b---c---g---h +# \ +# d---G---i ... +test_run_rebase () { + result=$1 + shift + test_expect_$result rebase

Re: [PATCH v2 4/7] add tests for rebasing root

2013-05-29 Thread Martin von Zweigbergk
On Wed, May 29, 2013 at 12:31 AM, Johannes Sixt j.s...@viscovery.net wrote: Am 5/29/2013 8:39, schrieb Martin von Zweigbergk: +test_run_rebase () { + result=$1 + shift + test_expect_$result rebase $* --onto --root with merge-base does not go to root + reset_rebase

Re: [PATCH 0/5] rebase: improve the keep-empty

2013-05-28 Thread Martin von Zweigbergk
Hi, I think I have some patches at home that instead teach 'git am' the --keep-empty flag. Does that make sense? It's been a while since I looked at it, but I'll try to take a look tonight (PST). Martin On Tue, May 28, 2013 at 6:29 AM, Felipe Contreras felipe.contre...@gmail.com wrote: Hi,

Re: [RFC/PATCH v2 3/8] rebase: cherry-pick: fix sequence continuation

2013-05-28 Thread Martin von Zweigbergk
As Junio asked in the previous iteration, shouldn't this have been in the first patch? On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras felipe.contre...@gmail.com wrote: We are not in am mode. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- git-rebase--cherrypick.sh | 10

Re: [RFC/PATCH v2 4/8] rebase: cherry-pick: fix abort of cherry mode

2013-05-28 Thread Martin von Zweigbergk
Same here: should this have been in the first patch? If not, do you know for how long it has been broken (since which commit)? On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras felipe.contre...@gmail.com wrote: Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- git-rebase.sh | 1 +

Re: [RFC/PATCH v2 2/8] rebase: cherry-pick: fix mode storage

2013-05-28 Thread Martin von Zweigbergk
Actually, are all of 2/8 - 7/8 fixes for things that broke in patch 1/8? On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras felipe.contre...@gmail.com wrote: We don't use the 'rebase-apply'. Signed-off-by: Felipe Contreras felipe.contre...@gmail.com --- git-rebase--cherrypick.sh | 4

Re: [RFC/PATCH v2 3/8] rebase: cherry-pick: fix sequence continuation

2013-05-28 Thread Martin von Zweigbergk
On Tue, May 28, 2013 at 10:41 PM, Felipe Contreras felipe.contre...@gmail.com wrote: On Wed, May 29, 2013 at 12:33 AM, Martin von Zweigbergk martinv...@gmail.com wrote: As Junio asked in the previous iteration, shouldn't this have been in the first patch? No, the first patch is splitting

Re: [PATCH 1/7] am: suppress error output from a conditional

2013-04-23 Thread Martin von Zweigbergk
On Tue, Apr 23, 2013 at 7:01 AM, Ramkumar Ramachandra artag...@gmail.com wrote: When testing if the $dotest directory exists, and if $next is greater than $last When can that happen? If one edits the todo? -- To unsubscribe from this list: send the line unsubscribe git in the body of a message

Re: [PATCH 2/7] rebase -i: don't error out if $state_dir already exists

2013-04-23 Thread Martin von Zweigbergk
On Tue, Apr 23, 2013 at 7:01 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Practically speaking, the only reason why a `mkdir $state_dir` would fail is because $state_dir already exists. Would we ever get to this point in the code if it already exists? Also, I had the feeling that the

Re: [PATCH 5/7] rebase -i: return control to the caller, for housekeeping

2013-04-23 Thread Martin von Zweigbergk
On Tue, Apr 23, 2013 at 7:02 AM, Ramkumar Ramachandra artag...@gmail.com wrote: diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index cc3a9a7..9514e31 100644 --- a/git-rebase--interactive.sh +++ b/git-rebase--interactive.sh @@ -597,7 +597,7 @@ do_next () {

Re: `git checkout --orpan` leaves a dirty worktree

2013-02-08 Thread Martin von Zweigbergk
I'm curious what your use case is. The behavior has been inconvenient for me too, but I have only used it in test cases; I have no real use case where I wanted to create an unborn/orphan branch. On Fri, Feb 8, 2013 at 11:50 AM, Ramkumar Ramachandra artag...@gmail.com wrote: Hi, Why should I

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-02-02 Thread Martin von Zweigbergk
On Fri, Feb 1, 2013 at 1:05 PM, Phil Hord ho...@cisco.com wrote: This is probably right, but it is not exactly the case that caused my itch. I think my branch looked like [...] That also makes sense. I'll add tests for both cases. Your patch makes both of them pass. # a---b---c # \ \

Re: [PATCH] rebase --preserve-merges keeps empty merge commits

2013-02-01 Thread Martin von Zweigbergk
I'm working on a re-roll of http://thread.gmane.org/gmane.comp.version-control.git/205796 and finally got around to including test cases for what you fixed in this patch. I want to make sure I'm testing what you fixed here. See questions below. On Sat, Jan 12, 2013 at 12:46 PM, Phil Hord

Re: [PATCH 1/3] git-am: record full index line in the patch used while rebasing

2013-01-31 Thread Martin von Zweigbergk
On Thu, Jan 31, 2013 at 8:32 PM, Junio C Hamano gits...@pobox.com wrote: Earlier, a230949 (am --rebasing: get patch body from commit, not from mailbox, 2012-06-26) learned to regenerate patch body from the commit object while rebasing, instead of reading from the rebase-am front-end. While

Re: [PATCH v3 08/31] parse_pathspec: add PATHSPEC_EMPTY_MATCH_ALL

2013-01-21 Thread Martin von Zweigbergk
Hi, I was tempted to ask this before, and the recent thread regarding add -u/A [1] convinced me to. On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy pclo...@gmail.com wrote: We have two ways of dealing with empty pathspec: 1. limit it to current prefix 2. match the entire working

Re: [RFC] git rm -u

2013-01-20 Thread Martin von Zweigbergk
On Sun, Jan 20, 2013 at 1:27 PM, Junio C Hamano gits...@pobox.com wrote: Junio C Hamano gits...@pobox.com writes: Matthieu Moy matthieu@grenoble-inp.fr writes: git add -u is one of the only exceptions (with git grep). I consider this as a bug, and think this should be changed. This has

[PATCH v2 17/19] fixup! reset $sha1 $pathspec: require $sha1 only to be treeish

2013-01-16 Thread Martin von Zweigbergk
--- Sorry, I forgot the documentation updates. I hope this looks ok. Can you squash this in, Junio? Thanks. I don't think any documentation update is necessary for the reset on unborn branch patch. Let me know if you think differently. Documentation/git-reset.txt | 18 +-

Re: [PATCH v2 17/19] fixup! reset $sha1 $pathspec: require $sha1 only to be treeish

2013-01-16 Thread Martin von Zweigbergk
On Wed, Jan 16, 2013 at 10:00 AM, Martin von Zweigbergk martinv...@gmail.com wrote: --- Sorry, I forgot the documentation updates. I hope this looks ok. Can you squash this in, Junio? Thanks. I see the series just entered 'next', so I guess it would have to go on top then. Perhaps

Re: [PATCH v2 06/19] reset.c: remove unnecessary variable 'i'

2013-01-15 Thread Martin von Zweigbergk
I suppose this was meant for everyone. Adding back the others. On Tue, Jan 15, 2013 at 10:27 AM, Holding, Lawrence (NZ) lawrence.hold...@cubic.com wrote: Maybe use *argv instead of argv[0]? Sure. Everywhere? Also in the lines added in patch 17/19 that refer to both argv[0] and argv[1], such as

Re: [PATCH] builtin/reset.c: Fix a sparse warning

2013-01-14 Thread Martin von Zweigbergk
On Mon, Jan 14, 2013 at 11:28 AM, Ramsay Jones ram...@ramsay1.demon.co.uk wrote: In particular, sparse issues an symbol not declared. Should it be static? warning for the 'parse_args' function. Since this function does not require greater than file visibility, we suppress this warning by

[PATCH v2 03/19] reset.c: pass pathspec around instead of (prefix, argv) pair

2013-01-14 Thread Martin von Zweigbergk
) It lets us use the (arguably clearer) if (pathspec) in place of if (i argc). Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 27 ++- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index

[PATCH v2 04/19] reset: don't allow git reset -- $pathspec in bare repo

2013-01-14 Thread Martin von Zweigbergk
changes after reset: D .gitattributes D .gitignore D .mailmap ... This happens because the check for is_bare_repository() happens after we branch off into read_from_tree() to reset with paths. Fix by moving the branching point after the check. Signed-off-by: Martin von

[PATCH v2 01/19] reset $pathspec: no need to discard index

2013-01-14 Thread Martin von Zweigbergk
0m0.040s0m0.020s sys 0m0.050s0m0.050s Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 915cc9f..8cc7c72 100644 --- a/builtin

[PATCH v2 02/19] reset $pathspec: exit with code 0 if successful

2013-01-14 Thread Martin von Zweigbergk
that non-zero indicates an error. This makes the 4 disambiguation test cases in t7102 clearer since they all used to fail, 3 of which failed due to changes in the work tree. Now only the ambiguous one fails. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c

[PATCH v2 17/19] reset $sha1 $pathspec: require $sha1 only to be treeish

2013-01-14 Thread Martin von Zweigbergk
() will resolve to a tree. This is fine since interactive_reset only needs the parameter to be a treeish and doesn't use it for display purposes. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 48 +++- t/t7102-reset.sh | 8

[PATCH v2 19/19] reset [--mixed]: use diff-based reset whether or not pathspec was given

2013-01-14 Thread Martin von Zweigbergk
). Timing git reset shows that it indeed becomes as fast as git reset . after this patch. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- It seems like a better solution would be for unpack_trees() learn the same tricks as do_diff_cache(). I'm leaving that a challange for the reader

[PATCH v2 18/19] reset: allow reset on unborn branch

2013-01-14 Thread Martin von Zweigbergk
. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c| 16 - t/t7106-reset-unborn-branch.sh | 52 ++ 2 files changed, 62 insertions(+), 6 deletions(-) create mode 100755 t/t7106-reset-unborn-branch.sh diff

[PATCH v2 15/19] reset.c: finish entire cmd_reset() whether or not pathspec is given

2013-01-14 Thread Martin von Zweigbergk
von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 42 ++ 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index e8a3e41..c316d9b 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -309,19 +309,6

[PATCH v2 13/19] reset.c: move lock, write and commit out of update_index_refresh()

2013-01-14 Thread Martin von Zweigbergk
leave it for now. In the process, we expose and fix the minor UI bug that makes us print Could not refresh index when we fail to write the index file when invoked with a pathspec. Copy the error message from the pathspec-less codepath (Could not write new index file.). Signed-off-by: Martin von

[PATCH v2 10/19] reset: avoid redundant error message

2013-01-14 Thread Martin von Zweigbergk
If writing or committing the new index file fails, we print Could not write new index file. followed by Could not reset index file to revision $rev.. The first message seems to imply the second, so print only the first message. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com

[PATCH v2 14/19] reset [--mixed]: only write index file once

2013-01-14 Thread Martin von Zweigbergk
-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index c1d6ef2..e8a3e41 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -336,6 +336,11 @@ int cmd_reset(int

[PATCH v2 05/19] reset.c: extract function for parsing arguments

2013-01-14 Thread Martin von Zweigbergk
Declutter cmd_reset() a bit by moving out the argument parsing to its own function. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 70 +++-- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git

[PATCH v2 11/19] reset.c: replace switch by if-else

2013-01-14 Thread Martin von Zweigbergk
-overs. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 97fa9f7..c3eb2eb 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -349,18 +349,11

[PATCH v2 16/19] reset.c: inline update_index_refresh()

2013-01-14 Thread Martin von Zweigbergk
Now that there is only one caller left to the single-line method update_index_refresh(), inline it. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c

[PATCH v2 07/19] reset.c: extract function for updating {ORIG_,}HEAD

2013-01-14 Thread Martin von Zweigbergk
By extracting the code for updating the HEAD and ORIG_HEAD symbolic references to a separate function, we declutter cmd_reset() a bit and we make it clear that e.g. the four variables {,sha1_}{,old_}orig are only used by this code. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com

[PATCH v2 09/19] reset --keep: only write index file once

2013-01-14 Thread Martin von Zweigbergk
state. As a bonus, we speed up git reset --keep a little on the linux-2.6 repo (best of five, warm cache): Before After real0m0.315s0m0.296s user0m0.290s0m0.280s sys 0m0.020s0m0.010s Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c

[PATCH v2 00/19] reset improvements

2013-01-14 Thread Martin von Zweigbergk
update_index_refresh() - Incorporated fixes from Junio's repo - Provided some motivation for replace switch by if-else amd moved the patch later in the series. Thanks for reviewing! Martin von Zweigbergk (19): reset $pathspec: no need to discard index reset $pathspec: exit with code 0

[PATCH v2 12/19] reset.c: move update_index_refresh() call out of read_from_tree()

2013-01-14 Thread Martin von Zweigbergk
() out of read_from_tree for symmetry with the 'else' block, making read_from_tree() and reset_index() closer in functionality. Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git

[PATCH v2 08/19] reset.c: share call to die_if_unmerged_cache()

2013-01-14 Thread Martin von Zweigbergk
) err = f(); (which is equivalent since we only care whether exit code is 0) Signed-off-by: Martin von Zweigbergk martinv...@gmail.com --- builtin/reset.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 2187d64..4e34195

  1   2   3   >