-
Notifications
You must be signed in to change notification settings - Fork 440
/
Copy pathsubtree-split
executable file
·94 lines (81 loc) · 2.69 KB
/
subtree-split
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/usr/bin/env bash
set -e
set -x
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
function split()
{
# split_new_repo $1 $2
SHA1=`./bin/splitsh-lite --prefix=$1`
git push $2 "$SHA1:refs/heads/$CURRENT_BRANCH"
}
function split_new_repo()
{
TMP_DIR="/tmp/enqueue-repo"
REMOTE_URL=`git remote get-url $2`
rm -rf $TMP_DIR;
mkdir $TMP_DIR;
(
cd $TMP_DIR;
git clone $REMOTE_URL .;
git checkout -b master;
touch foo;
git add foo;
git commit -m "foo";
git push origin master;
);
SHA1=`./bin/splitsh-lite --prefix=$1`
git fetch $2
git push $2 "$SHA1:$CURRENT_BRANCH" -f
}
function remote()
{
git remote add $1 $2 || true
}
remote enqueue [email protected]:php-enqueue/enqueue.git
remote simple-client [email protected]:php-enqueue/simple-client.git
remote stomp [email protected]:php-enqueue/stomp.git
remote amqp-ext [email protected]:php-enqueue/amqp-ext.git
remote amqp-lib [email protected]:php-enqueue/amqp-lib.git
remote amqp-bunny [email protected]:php-enqueue/amqp-bunny.git
remote amqp-tools [email protected]:php-enqueue/amqp-tools.git
remote pheanstalk [email protected]:php-enqueue/pheanstalk.git
remote gearman [email protected]:php-enqueue/gearman.git
remote fs [email protected]:php-enqueue/fs.git
remote redis [email protected]:php-enqueue/redis.git
remote rdkafka [email protected]:php-enqueue/rdkafka.git
remote dbal [email protected]:php-enqueue/dbal.git
remote null [email protected]:php-enqueue/null.git
remote sqs [email protected]:php-enqueue/sqs.git
remote gps [email protected]:php-enqueue/gps.git
remote enqueue-bundle [email protected]:php-enqueue/enqueue-bundle.git
remote job-queue [email protected]:php-enqueue/job-queue.git
remote test [email protected]:php-enqueue/test.git
remote async-event-dispatcher [email protected]:php-enqueue/async-event-dispatcher.git
remote async-command [email protected]:php-enqueue/async-command.git
remote mongodb [email protected]:php-enqueue/mongodb.git
remote dsn [email protected]:php-enqueue/dsn.git
remote wamp [email protected]:php-enqueue/wamp.git
split 'pkg/enqueue' enqueue
split 'pkg/simple-client' simple-client
split 'pkg/stomp' stomp
split 'pkg/amqp-ext' amqp-ext
split 'pkg/amqp-lib' amqp-lib
split 'pkg/amqp-bunny' amqp-bunny
split 'pkg/amqp-tools' amqp-tools
split 'pkg/pheanstalk' pheanstalk
split 'pkg/gearman' gearman
split 'pkg/rdkafka' rdkafka
split 'pkg/fs' fs
split 'pkg/redis' redis
split 'pkg/dbal' dbal
split 'pkg/null' null
split 'pkg/sqs' sqs
split 'pkg/gps' gps
split 'pkg/enqueue-bundle' enqueue-bundle
split 'pkg/job-queue' job-queue
split 'pkg/test' test
split 'pkg/async-event-dispatcher' async-event-dispatcher
split 'pkg/async-command' async-command
split 'pkg/mongodb' mongodb
split 'pkg/dsn' dsn
split 'pkg/wamp' wamp