|
@@ -10,12 +10,12 @@ warn() {
|
10
|
10
|
|
11
|
11
|
die() {
|
12
|
12
|
warn "$@"
|
13
|
|
- exit 1
|
|
13
|
+ exit 3
|
14
|
14
|
}
|
15
|
15
|
|
16
|
16
|
usage() {
|
17
|
17
|
warn "usage: git $(basename "$0") [-v|--verbose] REMOTE"
|
18
|
|
- exit 0
|
|
18
|
+ exit 2
|
19
|
19
|
}
|
20
|
20
|
|
21
|
21
|
think() {
|
|
@@ -39,6 +39,10 @@ main() {
|
39
|
39
|
think "remote='$remote'"
|
40
|
40
|
oldurl=$(git remote get-url "$remote") \
|
41
|
41
|
|| die "failed to get old URL"
|
|
42
|
+ test "$newurl" == "$oldurl" && {
|
|
43
|
+ warn "URL was not changed"
|
|
44
|
+ return 1
|
|
45
|
+ }
|
42
|
46
|
think "oldurl='$oldurl'"
|
43
|
47
|
think "EDITOR='$EDITOR'"
|
44
|
48
|
think "VISUAL='$VISUAL'"
|