Commit Graph

16 Commits

Author SHA1 Message Date
Avery Pennarun
6f2012cdc0 If someone provides a --prefix that ends with slash, strip the slash.
Prefixes that differ only in the trailing slash should be considered
identical.

Also update the test to check that this works.
2009-10-02 16:08:58 -04:00
Avery Pennarun
227f781147 Fix behaviour if you have a branch named the same as your --prefix
We were trying to 'git checkout $prefix', which is ambiguous if $prefix
names a directory *and* a branch.  Do 'git checkout -- $prefix' instead.

The main place this appeared was in 'git subtree add'.

Reported by several people.
2009-08-26 10:45:13 -04:00
Amiel Martin
558e7a57e2 sort assertion to make it more generic 2009-08-12 15:38:00 -07:00
Amiel Martin
e1a5b9d3e7 fixed order of assertion in tests 2009-08-12 15:25:18 -07:00
Avery Pennarun
34a82bda77 test.sh: oops, never intended to count the raw number of commits.
Just needed to make sure the count was non-zero.
2009-04-26 18:05:49 -04:00
Avery Pennarun
fa16ab36ad test.sh: make sure no commit changes more than one file at a time. 2009-04-26 17:43:53 -04:00
Avery Pennarun
a64f3a7286 Trim some extra merge commits that don't need to go into the split tree.
...and update test.sh to test for this.
2009-04-26 16:53:57 -04:00
Avery Pennarun
a046c7b124 test.sh tweak 2009-04-26 16:33:38 -04:00
Avery Pennarun
1490e1546a Add some basic assertions to test.sh. 2009-04-26 16:31:27 -04:00
Avery Pennarun
0ad3dd8534 Add a 'create' helper function in test.sh. 2009-04-26 15:55:56 -04:00
Avery Pennarun
d0eb1b1417 Add --annotate option, and create recognizable file content during tests. 2009-04-26 08:59:12 -04:00
Avery Pennarun
a13a299996 Change test.sh to test the new add, merge, and pull commands. 2009-04-25 00:07:04 -04:00
Avery Pennarun
9a8821ff33 Pass the path using the --prefix option instead of on the command line.
I like this better.  It's more like git-read-tree and some other commands.
2009-04-24 22:57:14 -04:00
Avery Pennarun
96db2c0448 Okay, that was a little too aggressive.
Now we only prune out a commit if it has exactly one remaining parent and
that parent's tree is identical to ours.

But I also changed the test to create the initial "-s ours" merge in one
step instead of two, and that merge can be eliminated since one of its
parents doesn't affect the subdir at all, and is thus deleted.
2009-04-24 22:38:58 -04:00
Avery Pennarun
d691265880 Even more aggressive commit trimming.
Now we cut out a commit if any of its parents had the same tree; just use
that parent in its place.  This makes the history look nice, but I don't
think it's quite right...
2009-04-24 22:05:30 -04:00
Avery Pennarun
847e868167 Quick test script for generating reasonably complex merge scenarios. 2009-04-24 21:35:50 -04:00