[PATCH v6 1/1] contrib/subtree: Add a test for subtree rebase that loses commits

2016-06-28 Thread David Greene
From: David A. Greene This test merges an external tree in as a subtree, makes some commits on top of it and splits it back out. In the process the added commits are lost or the rebase aborts with an internal error. The tests are marked to expect failure so that we don't forget to fix it. Sign

[PATCH 7/7] contrib/subtree: Handle '--prefix' argument with a slash appended

2015-11-05 Thread David Greene
From: Techlive Zheng 'git subtree merge' will fail if the argument of '--prefix' has a slash appended. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/git-subtree.sh | 2 +- contrib/subtree/t/t7900-subtree.sh | 20 2 files changed, 21

[no subject]

2015-11-05 Thread David Greene
I'm processing some old patches I have lying around. These clean up git-subtree's test base and refactor the test code so that each test is independent of the others. This greatly aids debugging and post-mortem analysis. I have rebased these old patches on master, ensuring that new tests that ha

[PATCH 3/7] contrib/subtree: Add tests for subtree add

2015-11-05 Thread David Greene
From: Techlive Zheng Add some tests to check various options to subtree add. These test various combinations of --message, --prefix and --squash. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 19 +++ 1 file changed, 19 i

[PATCH 6/7] contrib/subtree: Make each test self-contained

2015-11-05 Thread David Greene
From: Techlive Zheng Each test runs a full repository creation and any subtree actions needed to perform the test. Each test starts with a clean slate, making debugging and post-mortem analysis much easier. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7

[PATCH 1/7] contrib/subtree: Clean and refactor test code

2015-11-05 Thread David Greene
From: Techlive Zheng Mostly prepare for the later tests refactoring. This moves some common code to helper functions and generally cleans things up to be more presentable. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/Makefile | 31 --- c

[PATCH 2/7] contrib/subtree: Add test for missing subtree

2015-11-05 Thread David Greene
From: Techlive Zheng Test that a merge from a non-existant subtree fails. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 4 1 file changed, 4 insertions(+) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-s

[PATCH 5/7] contrib/subtree: Add split tests

2015-11-05 Thread David Greene
From: Techlive Zheng Add tests to check various options to split. Check combinations of --prefix, --message, --annotate, --branch and --rejoin. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 17 +++-- 1 file changed, 15 inser

[PATCH 4/7] contrib/subtree: Add merge tests

2015-11-05 Thread David Greene
From: Techlive Zheng Add some tests for various merge operations. Test combinations of merge with --message, --prefix and --squash. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 13 - 1 file changed, 12 insertions(+), 1 dele

[PATCH 2/7] contrib/subtree: Add test for missing subtree

2015-11-12 Thread David Greene
From: Techlive Zheng Test that a merge from a non-existant subtree fails. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 4 1 file changed, 4 insertions(+) diff --git a/contrib/subtree/t/t7900-subtree.sh b/contrib/subtree/t/t7900-s

[PATCH 0/7] contrib/subtree: Testsuite cleanup

2015-11-12 Thread David Greene
Sending again with a proper From: address after rebasing on latest master. Copying the maintainers because the origin patchset didn't get any comments and I'm unsure of how to proceed. These are some old changes I have lying around that should get applied to clean up git-subtree's testbase. With

[PATCH 5/7] contrib/subtree: Add split tests

2015-11-12 Thread David Greene
From: Techlive Zheng Add tests to check various options to split. Check combinations of --prefix, --message, --annotate, --branch and --rejoin. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 17 +++-- 1 file changed, 15 inser

[PATCH 4/7] contrib/subtree: Add merge tests

2015-11-12 Thread David Greene
From: Techlive Zheng Add some tests for various merge operations. Test combinations of merge with --message, --prefix and --squash. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 13 - 1 file changed, 12 insertions(+), 1 dele

[PATCH 3/7] contrib/subtree: Add tests for subtree add

2015-11-12 Thread David Greene
From: Techlive Zheng Add some tests to check various options to subtree add. These test various combinations of --message, --prefix and --squash. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7900-subtree.sh | 19 +++ 1 file changed, 19 i

[PATCH 1/7] contrib/subtree: Clean and refactor test code

2015-11-12 Thread David Greene
From: Techlive Zheng Mostly prepare for the later tests refactoring. This moves some common code to helper functions and generally cleans things up to be more presentable. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/Makefile | 31 --- c

[PATCH 7/7] contrib/subtree: Handle '--prefix' argument with a slash appended

2015-11-12 Thread David Greene
From: Techlive Zheng 'git subtree merge' will fail if the argument of '--prefix' has a slash appended. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/git-subtree.sh | 2 +- contrib/subtree/t/t7900-subtree.sh | 20 2 files changed, 21

[PATCH 6/7] contrib/subtree: Make each test self-contained

2015-11-12 Thread David Greene
From: Techlive Zheng Each test runs a full repository creation and any subtree actions needed to perform the test. Each test starts with a clean slate, making debugging and post-mortem analysis much easier. Signed-off-by: Techlive Zheng Signed-off-by: David A. Greene --- contrib/subtree/t/t7

[no subject]

2015-12-15 Thread David Greene
This patch isn't ready for prime-time yet but I wanted to get it out for some discussion. While cleaning up and enhancing git-subtree, I've come across the need to have rebase behave nicely in the case of empty and redundant commits. There's a case in pick_one_preserving_merges where git-cherry

[PATCH] Support rebase --keep-empty and --keep-redundant

2015-12-15 Thread David Greene
From: "David A. Greene" Teach rebase how to invoke cherry-pick to keep empty commits. Add a new option --keep-redundant equivalent to cherry-pick's --keep-redundant-commits. With this option, rebase will preserve empty commits generated as a result of the merging process. Signed-off-by: David

Re: (unknown)

2015-12-18 Thread David Greene
Patrick Steinhardt writes: > On Tue, Dec 15, 2015 at 09:57:50PM -0800, Junio C Hamano wrote: >> David Greene writes: >> >> > - If new option --keep-redundant is specified, invoke cherry-pick with >> > --keep-redundant-commits. >> >> This came up

Remote subtree split --annotate

2016-01-02 Thread David Greene
This is a fairly simple patch to remove subtree's split --annotate option. The intent of the option is to mark commits split from a subdirectory but git has other tools more suitable for editing commit messages. Given --annotate an --unannotate feature seems obvious and in fact was requested at o

[PATCH] contrib/subtree: Remove --annotate

2016-01-02 Thread David Greene
From: "David A. Greene" Remove --annotate. This obviates the need for an --unannotate command, which is both an obvious addition and difficult to define due to the numerous ways one might want to specify how to edit commit messages. git has other tools more suited to rewriting commit messages a

[PATCH v2] Remote subtree split --annotate

2016-01-04 Thread David Greene
Here's a re-roll with the commit message change suggested by Sebastian. Please apply. Thanks! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] contrib/subtree: Remove --annotate

2016-01-04 Thread David Greene
From: "David A. Greene" Remove --annotate. This obviates the need for an --unannotate command, which is both an obvious addition and difficult to define due to the numerous ways one might want to specify how to edit commit messages. git has other tools more suited to rewriting commit messages a

[PATCH] Test rebase -Xsubtree

2016-01-04 Thread David Greene
Here is a test that finds a bug in rebase -Xsubtree. With --preserve-merges, commits are lost. -David -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majord

[PATCH] Add a test for subtree rebase that loses commits

2016-01-04 Thread David Greene
From: "David A. Greene" This test merges an external tree in as a subtree, makes some commits on top of it and splits it back out. In the process the added commits are lost. This is marked to expect failure so that we don't forget to fix it. Signed-off-by: David A. Greene --- t/t3427-rebase-

Re: Detecting redundant commits

2016-01-05 Thread David Greene
On January 4, 2016 10:00:26 PM CST, Jeff King wrote: >Or do you mean commits that, when applied, we find turn out to have >empty changes (e.g., because we have a set of commits that have >different patch-ids, but do roughly the same thing)? I don't think you >can find that with a straight end-t