Rewrite "git-frotz" to "git frotz"
This uses the remove-dashes target to replace "git-frotz" to "git frotz". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Jul 2, 2007 at 22:52 UTC
5be60078c935ed08ee8eb5a32680bdfb6bb5bdf3
142 files changed
+2094
-2094
Documentation/install-doc-quick.sh
+4
-4
@@ -10,7 +10,7 @@ USAGE='<refname> <target directory>'
10
export GIT_DIR
11
12
test -z "$mandir" && usage
13
-if ! git-rev-parse --verify "$head^0" >/dev/null; then
13
+if ! git rev-parse --verify "$head^0" >/dev/null; then
14
echo >&2 "head: $head does not exist in the current repository"
15
usage
16
fi
@@ -18,12 +18,12 @@ fi
18
GIT_INDEX_FILE=`pwd`/.quick-doc.index
19
export GIT_INDEX_FILE
20
rm -f "$GIT_INDEX_FILE"
21
-git-read-tree $head
22
-git-checkout-index -a -f --prefix="$mandir"/
21
+git read-tree $head
22
+git checkout-index -a -f --prefix="$mandir"/
23
24
if test -n "$GZ"; then
25
cd "$mandir"
26
- for i in `git-ls-tree -r --name-only $head`
26
+ for i in `git ls-tree -r --name-only $head`
27
do
28
gzip < $i > $i.gz && rm $i
29
done
contrib/examples/git-gc.sh
+4
-4
@@ -30,8 +30,8 @@ notbare|"")
30
esac
31
32
test "true" != "$pack_refs" ||
33
-git-pack-refs --prune &&
34
-git-reflog expire --all &&
33
+git pack-refs --prune &&
34
+git reflog expire --all &&
35
git-repack -a -d -l &&
36
-$no_prune git-prune &&
37
-git-rerere gc || exit
36
+$no_prune git prune &&
37
+git rerere gc || exit
contrib/examples/git-resolve.sh
+17
-17
@@ -17,8 +17,8 @@ dropheads() {
17
"$GIT_DIR/LAST_MERGE" || exit 1
18
}
19
20
-head=$(git-rev-parse --verify "$1"^0) &&
21
-merge=$(git-rev-parse --verify "$2"^0) &&
20
+head=$(git rev-parse --verify "$1"^0) &&
21
+merge=$(git rev-parse --verify "$2"^0) &&
22
merge_name="$2" &&
23
merge_msg="$3" || usage
24
@@ -34,7 +34,7 @@ dropheads
34
echo $head > "$GIT_DIR"/ORIG_HEAD
35
echo $merge > "$GIT_DIR"/LAST_MERGE
36
37
-common=$(git-merge-base $head $merge)
37
+common=$(git merge-base $head $merge)
38
if [ -z "$common" ]; then
39
die "Unable to find common commit between" $merge $head
40
fi
@@ -46,11 +46,11 @@ case "$common" in
46
exit 0
47
;;
48
"$head")
49
- echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $merge)"
50
- git-read-tree -u -m $head $merge || exit 1
51
- git-update-ref -m "resolve $merge_name: Fast forward" \
49
+ echo "Updating $(git rev-parse --short $head)..$(git rev-parse --short $merge)"
50
+ git read-tree -u -m $head $merge || exit 1
51
+ git update-ref -m "resolve $merge_name: Fast forward" \
52
HEAD "$merge" "$head"
53
- git-diff-tree -p $head $merge | git-apply --stat
53
+ git diff-tree -p $head $merge | git apply --stat
54
dropheads
55
exit 0
56
;;
@@ -62,7 +62,7 @@ git var GIT_COMMITTER_IDENT >/dev/null || exit
62
# Find an optimum merge base if there are more than one candidates.
63
LF='
64
'
65
-common=$(git-merge-base -a $head $merge)
65
+common=$(git merge-base -a $head $merge)
66
case "$common" in
67
?*"$LF"?*)
68
echo "Trying to find the optimum merge base."
@@ -72,10 +72,10 @@ case "$common" in
72
for c in $common
73
do
74
rm -f $G
75
- GIT_INDEX_FILE=$G git-read-tree -m $c $head $merge \
75
+ GIT_INDEX_FILE=$G git read-tree -m $c $head $merge \
76
2>/dev/null || continue
77
# Count the paths that are unmerged.
78
- cnt=`GIT_INDEX_FILE=$G git-ls-files --unmerged | wc -l`
78
+ cnt=`GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l`
79
if test $best_cnt -le 0 -o $cnt -le $best_cnt
80
then
81
best=$c
@@ -92,9 +92,9 @@ case "$common" in
92
esac
93
94
echo "Trying to merge $merge into $head using $common."
95
-git-update-index --refresh 2>/dev/null
96
-git-read-tree -u -m $common $head $merge || exit 1
97
-result_tree=$(git-write-tree 2> /dev/null)
95
+git update-index --refresh 2>/dev/null
96
+git read-tree -u -m $common $head $merge || exit 1
97
+result_tree=$(git write-tree 2> /dev/null)
98
if [ $? -ne 0 ]; then
99
echo "Simple merge failed, trying Automatic merge"
100
git-merge-index -o git-merge-one-file -a
@@ -102,11 +102,11 @@ if [ $? -ne 0 ]; then
102
echo $merge > "$GIT_DIR"/MERGE_HEAD
103
die "Automatic merge failed, fix up by hand"
104
fi
105
- result_tree=$(git-write-tree) || exit 1
105
+ result_tree=$(git write-tree) || exit 1
106
fi
107
-result_commit=$(echo "$merge_msg" | git-commit-tree $result_tree -p $head -p $merge)
107
+result_commit=$(echo "$merge_msg" | git commit-tree $result_tree -p $head -p $merge)
108
echo "Committed merge $result_commit"
109
-git-update-ref -m "resolve $merge_name: In-index merge" \
109
+git update-ref -m "resolve $merge_name: In-index merge" \
110
HEAD "$result_commit" "$head"
111
-git-diff-tree -p $head $result_commit | git-apply --stat
111
+git diff-tree -p $head $result_commit | git apply --stat
112
dropheads
contrib/remotes2config.sh
+2
-2
@@ -26,8 +26,8 @@ if [ -d "$GIT_DIR"/remotes ]; then
26
mv "$GIT_DIR"/remotes "$GIT_DIR"/remotes.old
27
fi ;;
28
*)
29
- echo "git-config $key "$value" $regex"
30
- git-config $key "$value" $regex || error=1 ;;
29
+ echo "git config $key "$value" $regex"
30
+ git config $key "$value" $regex || error=1 ;;
31
esac
32
done
33
fi
git-am.sh
+20
-20
@@ -60,17 +60,17 @@ fall_back_3way () {
60
mkdir "$dotest/patch-merge-tmp-dir"
61
62
# First see if the patch records the index info that we can use.
63
- git-apply -z --index-info "$dotest/patch" \
63
+ git apply -z --index-info "$dotest/patch" \
64
>"$dotest/patch-merge-index-info" &&
65
GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
66
- git-update-index -z --index-info <"$dotest/patch-merge-index-info" &&
66
+ git update-index -z --index-info <"$dotest/patch-merge-index-info" &&
67
GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
68
- git-write-tree >"$dotest/patch-merge-base+" ||
68
+ git write-tree >"$dotest/patch-merge-base+" ||
69
cannot_fallback "Repository lacks necessary blobs to fall back on 3-way merge."
70
71
echo Using index info to reconstruct a base tree...
72
if GIT_INDEX_FILE="$dotest/patch-merge-tmp-index" \
73
- git-apply $binary --cached <"$dotest/patch"
73
+ git apply $binary --cached <"$dotest/patch"
74
then
75
mv "$dotest/patch-merge-base+" "$dotest/patch-merge-base"
76
mv "$dotest/patch-merge-tmp-index" "$dotest/patch-merge-index"
@@ -80,7 +80,7 @@ It does not apply to blobs recorded in its index."
80
fi
81
82
test -f "$dotest/patch-merge-index" &&
83
- his_tree=$(GIT_INDEX_FILE="$dotest/patch-merge-index" git-write-tree) &&
83
+ his_tree=$(GIT_INDEX_FILE="$dotest/patch-merge-index" git write-tree) &&
84
orig_tree=$(cat "$dotest/patch-merge-base") &&
85
rm -fr "$dotest"/patch-merge-* || exit 1
86
@@ -97,7 +97,7 @@ It does not apply to blobs recorded in its index."
97
git-merge-recursive $orig_tree -- HEAD $his_tree || {
98
if test -d "$GIT_DIR/rr-cache"
99
then
100
- git-rerere
100
+ git rerere
101
fi
102
echo Failed to merge in the changes.
103
exit 1
@@ -198,7 +198,7 @@ else
198
# Start afresh.
199
mkdir -p "$dotest" || exit
200
201
- git-mailsplit -d"$prec" -o"$dotest" -b -- "$@" > "$dotest/last" || {
201
+ git mailsplit -d"$prec" -o"$dotest" -b -- "$@" > "$dotest/last" || {
202
rm -fr "$dotest"
203
exit 1
204
}
@@ -216,7 +216,7 @@ fi
216
217
case "$resolved" in
218
'')
219
- files=$(git-diff-index --cached --name-only HEAD) || exit
219
+ files=$(git diff-index --cached --name-only HEAD) || exit
220
if [ "$files" ]; then
221
echo "Dirty index: cannot apply patches (dirty: $files)" >&2
222
exit 1
@@ -254,7 +254,7 @@ if test "$skip" = t
254
then
255
if test -d "$GIT_DIR/rr-cache"
256
then
257
- git-rerere clear
257
+ git rerere clear
258
fi
259
this=`expr "$this" + 1`
260
resume=
@@ -287,14 +287,14 @@ do
287
# by the user, or the user can tell us to do so by --resolved flag.
288
case "$resume" in
289
'')
290
- git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \
290
+ git mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \
291
<"$dotest/$msgnum" >"$dotest/info" ||
292
stop_here $this
293
test -s $dotest/patch || {
294
echo "Patch is empty. Was it split wrong?"
295
stop_here $this
296
}
297
- git-stripspace < "$dotest/msg" > "$dotest/msg-clean"
297
+ git stripspace < "$dotest/msg" > "$dotest/msg-clean"
298
;;
299
esac
300
@@ -347,7 +347,7 @@ do
347
case "$resolved$interactive" in
348
tt)
349
# This is used only for interactive view option.
350
- git-diff-index -p --cached HEAD >"$dotest/patch"
350
+ git diff-index -p --cached HEAD >"$dotest/patch"
351
;;
352
esac
353
esac
@@ -399,7 +399,7 @@ do
399
400
case "$resolved" in
401
'')
402
- git-apply $git_apply_opt $binary --index "$dotest/patch"
402
+ git apply $git_apply_opt $binary --index "$dotest/patch"
403
apply_status=$?
404
;;
405
t)
@@ -408,11 +408,11 @@ do
408
# trust what the user has in the index file and the
409
# working tree.
410
resolved=
411
- git-diff-index --quiet --cached HEAD && {
411
+ git diff-index --quiet --cached HEAD && {
412
echo "No changes - did you forget to use 'git add'?"
413
stop_here_user_resolve $this
414
}
415
- unmerged=$(git-ls-files -u)
415
+ unmerged=$(git ls-files -u)
416
if test -n "$unmerged"
417
then
418
echo "You still have unmerged paths in your index"
@@ -433,7 +433,7 @@ do
433
then
434
# Applying the patch to an earlier tree and merging the
435
# result may have produced the same tree as ours.
436
- git-diff-index --quiet --cached HEAD && {
436
+ git diff-index --quiet --cached HEAD && {
437
echo No changes -- Patch already applied.
438
go_next
439
continue
@@ -453,12 +453,12 @@ do
453
"$GIT_DIR"/hooks/pre-applypatch || stop_here $this
454
fi
455
456
- tree=$(git-write-tree) &&
456
+ tree=$(git write-tree) &&
457
echo Wrote tree $tree &&
458
- parent=$(git-rev-parse --verify HEAD) &&
459
- commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") &&
458
+ parent=$(git rev-parse --verify HEAD) &&
459
+ commit=$(git commit-tree $tree -p $parent <"$dotest/final-commit") &&
460
echo Committed: $commit &&
461
- git-update-ref -m "$GIT_REFLOG_ACTION: $SUBJECT" HEAD $commit $parent ||
461
+ git update-ref -m "$GIT_REFLOG_ACTION: $SUBJECT" HEAD $commit $parent ||
462
stop_here $this
463
464
if test -x "$GIT_DIR"/hooks/post-applypatch
git-bisect.sh
+17
-17
@@ -56,7 +56,7 @@ bisect_start() {
56
# Verify HEAD. If we were bisecting before this, reset to the
57
# top-of-line master first!
58
#
59
- head=$(GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD) ||
59
+ head=$(GIT_DIR="$GIT_DIR" git symbolic-ref HEAD) ||
60
die "Bad HEAD - I need a symbolic ref"
61
case "$head" in
62
refs/heads/bisect)
@@ -99,7 +99,7 @@ bisect_start() {
99
break
100
;;
101
*)
102
- rev=$(git-rev-parse --verify "$arg^{commit}" 2>/dev/null) || {
102
+ rev=$(git rev-parse --verify "$arg^{commit}" 2>/dev/null) || {
103
test $has_double_dash -eq 1 &&
104
die "'$arg' does not appear to be a valid revision"
105
break
@@ -124,9 +124,9 @@ bisect_bad() {
124
bisect_autostart
125
case "$#" in
126
0)
127
- rev=$(git-rev-parse --verify HEAD) ;;
127
+ rev=$(git rev-parse --verify HEAD) ;;
128
1)
129
- rev=$(git-rev-parse --verify "$1^{commit}") ;;
129
+ rev=$(git rev-parse --verify "$1^{commit}") ;;
130
*)
131
usage ;;
132
esac || exit
@@ -138,19 +138,19 @@ bisect_bad() {
138
bisect_write_bad() {
139
rev="$1"
140
echo "$rev" >"$GIT_DIR/refs/bisect/bad"
141
- echo "# bad: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
141
+ echo "# bad: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
142
}
143
144
bisect_good() {
145
bisect_autostart
146
case "$#" in
147
- 0) revs=$(git-rev-parse --verify HEAD) || exit ;;
148
- *) revs=$(git-rev-parse --revs-only --no-flags "$@") &&
147
+ 0) revs=$(git rev-parse --verify HEAD) || exit ;;
148
+ *) revs=$(git rev-parse --revs-only --no-flags "$@") &&
149
test '' != "$revs" || die "Bad rev input: $@" ;;
150
esac
151
for rev in $revs
152
do
153
- rev=$(git-rev-parse --verify "$rev^{commit}") || exit
153
+ rev=$(git rev-parse --verify "$rev^{commit}") || exit
154
bisect_write_good "$rev"
155
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
156
@@ -161,7 +161,7 @@ bisect_good() {
161
bisect_write_good() {
162
rev="$1"
163
echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
164
- echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
164
+ echo "# good: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
165
}
166
167
bisect_next_check() {
@@ -211,10 +211,10 @@ bisect_next() {
211
bisect_autostart
212
bisect_next_check good
213
214
- bad=$(git-rev-parse --verify refs/bisect/bad) &&
214
+ bad=$(git rev-parse --verify refs/bisect/bad) &&
215
good=$(git for-each-ref --format='^%(objectname)' \
216
"refs/bisect/good-*" | tr '[\012]' ' ') &&
217
- eval="git-rev-list --bisect-vars $good $bad --" &&
217
+ eval="git rev-list --bisect-vars $good $bad --" &&
218
eval="$eval $(cat "$GIT_DIR/BISECT_NAMES")" &&
219
eval=$(eval "$eval") &&
220
eval "$eval" || exit
@@ -225,7 +225,7 @@ bisect_next() {
225
fi
226
if [ "$bisect_rev" = "$bad" ]; then
227
echo "$bisect_rev is first bad commit"
228
- git-diff-tree --pretty $bisect_rev
228
+ git diff-tree --pretty $bisect_rev
229
exit 0
230
fi
231
@@ -233,8 +233,8 @@ bisect_next() {
233
echo "$bisect_rev" >"$GIT_DIR/refs/heads/new-bisect"
234
git checkout -q new-bisect || exit
235
mv "$GIT_DIR/refs/heads/new-bisect" "$GIT_DIR/refs/heads/bisect" &&
236
- GIT_DIR="$GIT_DIR" git-symbolic-ref HEAD refs/heads/bisect
237
- git-show-branch "$bisect_rev"
236
+ GIT_DIR="$GIT_DIR" git symbolic-ref HEAD refs/heads/bisect
237
+ git show-branch "$bisect_rev"
238
}
239
240
bisect_visualize() {
@@ -250,7 +250,7 @@ bisect_reset() {
250
else
251
branch=master
252
fi ;;
253
- 1) git-show-ref --verify --quiet -- "refs/heads/$1" || {
253
+ 1) git show-ref --verify --quiet -- "refs/heads/$1" || {
254
echo >&2 "$1 does not seem to be a valid branch"
255
exit 1
256
}
@@ -288,12 +288,12 @@ bisect_replay () {
288
;;
289
good)
290
echo "$rev" >"$GIT_DIR/refs/bisect/good-$rev"
291
- echo "# good: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
291
+ echo "# good: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
292
echo "git-bisect good $rev" >>"$GIT_DIR/BISECT_LOG"
293
;;
294
bad)
295
echo "$rev" >"$GIT_DIR/refs/bisect/bad"
296
- echo "# bad: "$(git-show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
296
+ echo "# bad: "$(git show-branch $rev) >>"$GIT_DIR/BISECT_LOG"
297
echo "git-bisect bad $rev" >>"$GIT_DIR/BISECT_LOG"
298
;;
299
*)
git-checkout.sh
+20
-20
@@ -6,8 +6,8 @@ SUBDIRECTORY_OK=Sometimes
6
require_work_tree
7
8
old_name=HEAD
9
-old=$(git-rev-parse --verify $old_name 2>/dev/null)
10
-oldbranch=$(git-symbolic-ref $old_name 2>/dev/null)
9
+old=$(git rev-parse --verify $old_name 2>/dev/null)
10
+oldbranch=$(git symbolic-ref $old_name 2>/dev/null)
11
new=
12
new_name=
13
force=
@@ -29,9 +29,9 @@ while [ "$#" != "0" ]; do
29
shift
30
[ -z "$newbranch" ] &&
31
die "git checkout: -b needs a branch name"
32
- git-show-ref --verify --quiet -- "refs/heads/$newbranch" &&
32
+ git show-ref --verify --quiet -- "refs/heads/$newbranch" &&
33
die "git checkout: branch $newbranch already exists"
34
- git-check-ref-format "heads/$newbranch" ||
34
+ git check-ref-format "heads/$newbranch" ||
35
die "git checkout: we do not like '$newbranch' as a branch name."
36
;;
37
"-l")
@@ -57,20 +57,20 @@ while [ "$#" != "0" ]; do
57
usage
58
;;
59
*)
60
- if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
60
+ if rev=$(git rev-parse --verify "$arg^0" 2>/dev/null)
61
then
62
if [ -z "$rev" ]; then
63
echo "unknown flag $arg"
64
exit 1
65
fi
66
new_name="$arg"
67
- if git-show-ref --verify --quiet -- "refs/heads/$arg"
67
+ if git show-ref --verify --quiet -- "refs/heads/$arg"
68
then
69
- rev=$(git-rev-parse --verify "refs/heads/$arg^0")
69
+ rev=$(git rev-parse --verify "refs/heads/$arg^0")
70
branch="$arg"
71
fi
72
new="$rev"
73
- elif rev=$(git-rev-parse --verify "$arg^{tree}" 2>/dev/null)
73
+ elif rev=$(git rev-parse --verify "$arg^{tree}" 2>/dev/null)
74
then
75
# checking out selected paths from a tree-ish.
76
new="$rev"
@@ -129,14 +129,14 @@ Did you intend to checkout '$@' which can not be resolved as commit?"
129
# from a specific tree-ish; note that this is for
130
# rescuing paths and is never meant to remove what
131
# is not in the named tree-ish.
132
- git-ls-tree --full-name -r "$new" "$@" |
133
- git-update-index --index-info || exit $?
132
+ git ls-tree --full-name -r "$new" "$@" |
133
+ git update-index --index-info || exit $?
134
fi
135
136
# Make sure the request is about existing paths.
137
- git-ls-files --error-unmatch -- "$@" >/dev/null || exit
138
- git-ls-files -- "$@" |
139
- git-checkout-index -f -u --stdin
137
+ git ls-files --error-unmatch -- "$@" >/dev/null || exit
138
+ git ls-files -- "$@" |
139
+ git checkout-index -f -u --stdin
140
exit $?
141
else
142
# Make sure we did not fall back on $arg^{tree} codepath
@@ -144,7 +144,7 @@ else
144
# but switching branches.
145
if test '' != "$new"
146
then
147
- git-rev-parse --verify "$new^{commit}" >/dev/null 2>&1 ||
147
+ git rev-parse --verify "$new^{commit}" >/dev/null 2>&1 ||
148
die "Cannot switch branch to a non-commit."
149
fi
150
fi
@@ -200,10 +200,10 @@ fi
200
201
if [ "$force" ]
202
then
203
- git-read-tree $v --reset -u $new
203
+ git read-tree $v --reset -u $new
204
else
205
- git-update-index --refresh >/dev/null
206
- merge_error=$(git-read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
205
+ git update-index --refresh >/dev/null
206
+ merge_error=$(git read-tree -m -u --exclude-per-directory=.gitignore $old $new 2>&1) || (
207
case "$merge" in
208
'')
209
echo >&2 "$merge_error"
@@ -254,12 +254,12 @@ fi
254
#
255
if [ "$?" -eq 0 ]; then
256
if [ "$newbranch" ]; then
257
- git-branch $track $newbranch_log "$newbranch" "$new_name" || exit
257
+ git branch $track $newbranch_log "$newbranch" "$new_name" || exit
258
branch="$newbranch"
259
fi
260
if test -n "$branch"
261
then
262
- GIT_DIR="$GIT_DIR" git-symbolic-ref -m "checkout: moving to $branch" HEAD "refs/heads/$branch"
262
+ GIT_DIR="$GIT_DIR" git symbolic-ref -m "checkout: moving to $branch" HEAD "refs/heads/$branch"
263
if test -n "$quiet"
264
then
265
true # nothing
@@ -271,7 +271,7 @@ if [ "$?" -eq 0 ]; then
271
fi
272
elif test -n "$detached"
273
then
274
- git-update-ref --no-deref -m "checkout: moving to $arg" HEAD "$detached" ||
274
+ git update-ref --no-deref -m "checkout: moving to $arg" HEAD "$detached" ||
275
die "Cannot detach HEAD"
276
if test -n "$detach_warn"
277
then
git-clean.sh
+2
-2
@@ -20,7 +20,7 @@ require_work_tree
20
ignored=
21
ignoredonly=
22
cleandir=
23
-disabled="`git-config --bool clean.requireForce`"
23
+disabled="`git config --bool clean.requireForce`"
24
rmf="rm -f --"
25
rmrf="rm -rf --"
26
rm_refuse="echo Not removing"
@@ -83,7 +83,7 @@ if [ -z "$ignored" ]; then
83
fi
84
fi
85
86
-git-ls-files --others --directory $excl ${excl_info:+"$excl_info"} -- "$@" |
86
+git ls-files --others --directory $excl ${excl_info:+"$excl_info"} -- "$@" |
87
while read -r file; do
88
if [ -d "$file" -a ! -L "$file" ]; then
89
if [ -z "$cleandir" ]; then
git-clone.sh
+13
-13
@@ -43,7 +43,7 @@ clone_dumb_http () {
43
clone_tmp="$GIT_DIR/clone-tmp" &&
44
mkdir -p "$clone_tmp" || exit 1
45
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
46
- "`git-config --bool http.noEPSV`" = true ]; then
46
+ "`git config --bool http.noEPSV`" = true ]; then
47
curl_extra_args="${curl_extra_args} --disable-epsv"
48
fi
49
http_fetch "$1/info/refs" "$clone_tmp/refs" ||
@@ -132,7 +132,7 @@ while
132
*/*)
133
die "'$2' is not suitable for an origin name"
134
esac
135
- git-check-ref-format "heads/$2" ||
135
+ git check-ref-format "heads/$2" ||
136
die "'$2' is not suitable for a branch name"
137
test -z "$origin_override" ||
138
die "Do not give more than one --origin options."
@@ -195,7 +195,7 @@ yes)
195
GIT_DIR="$D" ;;
196
*)
197
GIT_DIR="$D/.git" ;;
198
-esac && export GIT_DIR && git-init $quiet ${template+"$template"} || usage
198
+esac && export GIT_DIR && git init $quiet ${template+"$template"} || usage
199
200
if test -n "$reference"
201
then
@@ -345,7 +345,7 @@ then
345
*)
346
continue ;;
347
esac
348
- git-update-ref -m "clone: from $repo" "$destname" "$sha1" ""
348
+ git update-ref -m "clone: from $repo" "$destname" "$sha1" ""
349
done < "$GIT_DIR/CLONE_HEAD"
350
fi
351
@@ -389,31 +389,31 @@ then
389
)
390
391
# Upstream URL
392
- git-config remote."$origin".url "$repo" &&
392
+ git config remote."$origin".url "$repo" &&
393
394
# Set up the mappings to track the remote branches.
395
- git-config remote."$origin".fetch \
395
+ git config remote."$origin".fetch \
396
"+refs/heads/*:$remote_top/*" '^$' &&
397
398
# Write out remote.$origin config, and update our "$head_points_at".
399
case "$head_points_at" in
400
?*)
401
# Local default branch
402
- git-symbolic-ref HEAD "refs/heads/$head_points_at" &&
402
+ git symbolic-ref HEAD "refs/heads/$head_points_at" &&
403
404
# Tracking branch for the primary branch at the remote.
405
- git-update-ref HEAD "$head_sha1" &&
405
+ git update-ref HEAD "$head_sha1" &&
406
407
rm -f "refs/remotes/$origin/HEAD"
408
- git-symbolic-ref "refs/remotes/$origin/HEAD" \
408
+ git symbolic-ref "refs/remotes/$origin/HEAD" \
409
"refs/remotes/$origin/$head_points_at" &&
410
411
- git-config branch."$head_points_at".remote "$origin" &&
412
- git-config branch."$head_points_at".merge "refs/heads/$head_points_at"
411
+ git config branch."$head_points_at".remote "$origin" &&
412
+ git config branch."$head_points_at".merge "refs/heads/$head_points_at"
413
;;
414
'')
415
# Source had detached HEAD pointing nowhere
416
- git-update-ref --no-deref HEAD "$head_sha1" &&
416
+ git update-ref --no-deref HEAD "$head_sha1" &&
417
rm -f "refs/remotes/$origin/HEAD"
418
;;
419
esac
@@ -421,7 +421,7 @@ then
421
case "$no_checkout" in
422
'')
423
test "z$quiet" = z -a "z$no_progress" = z && v=-v || v=
424
- git-read-tree -m -u $v HEAD HEAD
424
+ git read-tree -m -u $v HEAD HEAD
425
esac
426
fi
427
rm -f "$GIT_DIR/CLONE_HEAD" "$GIT_DIR/REMOTE_HEAD"
git-commit.sh
+25
-25
@@ -8,7 +8,7 @@ SUBDIRECTORY_OK=Yes
8
. git-sh-setup
9
require_work_tree
10
11
-git-rev-parse --verify HEAD >/dev/null 2>&1 || initial_commit=t
11
+git rev-parse --verify HEAD >/dev/null 2>&1 || initial_commit=t
12
13
case "$0" in
14
*status)
@@ -53,7 +53,7 @@ run_status () {
53
t) color= ;;
54
*) color=--nocolor ;;
55
esac
56
- git-runstatus ${color} \
56
+ git runstatus ${color} \
57
${verbose:+--verbose} \
58
${amend:+--amend} \
59
${untracked_files:+--untracked}
@@ -335,20 +335,20 @@ t,)
335
cd_to_toplevel &&
336
GIT_INDEX_FILE="$NEXT_INDEX" &&
337
export GIT_INDEX_FILE &&
338
- git-diff-files --name-only -z |
339
- git-update-index --remove -z --stdin
338
+ git diff-files --name-only -z |
339
+ git update-index --remove -z --stdin
340
) || exit
341
;;
342
,t)
343
save_index &&
344
- git-ls-files --error-unmatch -- "$@" >/dev/null || exit
344
+ git ls-files --error-unmatch -- "$@" >/dev/null || exit
345
346
- git-diff-files --name-only -z -- "$@" |
346
+ git diff-files --name-only -z -- "$@" |
347
(
348
cd_to_toplevel &&
349
GIT_INDEX_FILE="$NEXT_INDEX" &&
350
export GIT_INDEX_FILE &&
351
- git-update-index --remove -z --stdin
351
+ git update-index --remove -z --stdin
352
) || exit
353
;;
354
,)
@@ -364,28 +364,28 @@ t,)
364
refuse_partial "Cannot do a partial commit during a merge."
365
fi
366
TMP_INDEX="$GIT_DIR/tmp-index$$"
367
- commit_only=`git-ls-files --error-unmatch -- "$@"` || exit
367
+ commit_only=`git ls-files --error-unmatch -- "$@"` || exit
368
369
# Build a temporary index and update the real index
370
# the same way.
371
if test -z "$initial_commit"
372
then
373
GIT_INDEX_FILE="$THIS_INDEX" \
374
- git-read-tree --index-output="$TMP_INDEX" -i -m HEAD
374
+ git read-tree --index-output="$TMP_INDEX" -i -m HEAD
375
else
376
rm -f "$TMP_INDEX"
377
fi || exit
378
379
printf '%s\n' "$commit_only" |
380
GIT_INDEX_FILE="$TMP_INDEX" \
381
- git-update-index --add --remove --stdin &&
381
+ git update-index --add --remove --stdin &&
382
383
save_index &&
384
printf '%s\n' "$commit_only" |
385
(
386
GIT_INDEX_FILE="$NEXT_INDEX"
387
export GIT_INDEX_FILE
388
- git-update-index --remove --stdin
388
+ git update-index --remove --stdin
389
) || exit
390
;;
391
esac
@@ -408,12 +408,12 @@ case "$status_only" in
408
t)
409
# This will silently fail in a read-only repository, which is
410
# what we want.
411
- GIT_INDEX_FILE="$USE_INDEX" git-update-index -q --unmerged --refresh
411
+ GIT_INDEX_FILE="$USE_INDEX" git update-index -q --unmerged --refresh
412
run_status
413
exit $?
414
;;
415
'')
416
- GIT_INDEX_FILE="$USE_INDEX" git-update-index -q --refresh || exit
416
+ GIT_INDEX_FILE="$USE_INDEX" git update-index -q --refresh || exit
417
;;
418
esac
419
@@ -454,7 +454,7 @@ then
454
elif test -f "$GIT_DIR/SQUASH_MSG"
455
then
456
cat "$GIT_DIR/SQUASH_MSG"
457
-fi | git-stripspace >"$GIT_DIR"/COMMIT_EDITMSG
457
+fi | git stripspace >"$GIT_DIR"/COMMIT_EDITMSG
458
459
case "$signoff" in
460
t)
@@ -505,12 +505,12 @@ then
505
PARENTS="-p HEAD "`sed -e 's/^/-p /' "$GIT_DIR/MERGE_HEAD"`
506
elif test -n "$amend"; then
507
rloga='commit (amend)'
508
- PARENTS=$(git-cat-file commit HEAD |
508
+ PARENTS=$(git cat-file commit HEAD |
509
sed -n -e '/^$/q' -e 's/^parent /-p /p')
510
fi
511
- current="$(git-rev-parse --verify HEAD)"
511
+ current="$(git rev-parse --verify HEAD)"
512
else
513
- if [ -z "$(git-ls-files)" ]; then
513
+ if [ -z "$(git ls-files)" ]; then
514
echo >&2 'nothing to commit (use "git add file1 file2" to include for commit)'
515
exit 1
516
fi
@@ -577,23 +577,23 @@ then
577
else
578
cat "$GIT_DIR"/COMMIT_EDITMSG
579
fi |
580
-git-stripspace >"$GIT_DIR"/COMMIT_MSG
580
+git stripspace >"$GIT_DIR"/COMMIT_MSG
581
582
if cnt=`grep -v -i '^Signed-off-by' "$GIT_DIR"/COMMIT_MSG |
583
- git-stripspace |
583
+ git stripspace |
584
wc -l` &&
585
test 0 -lt $cnt
586
then
587
if test -z "$TMP_INDEX"
588
then
589
- tree=$(GIT_INDEX_FILE="$USE_INDEX" git-write-tree)
589
+ tree=$(GIT_INDEX_FILE="$USE_INDEX" git write-tree)
590
else
591
- tree=$(GIT_INDEX_FILE="$TMP_INDEX" git-write-tree) &&
591
+ tree=$(GIT_INDEX_FILE="$TMP_INDEX" git write-tree) &&
592
rm -f "$TMP_INDEX"
593
fi &&
594
- commit=$(cat "$GIT_DIR"/COMMIT_MSG | git-commit-tree $tree $PARENTS) &&
594
+ commit=$(cat "$GIT_DIR"/COMMIT_MSG | git commit-tree $tree $PARENTS) &&
595
rlogm=$(sed -e 1q "$GIT_DIR"/COMMIT_MSG) &&
596
- git-update-ref -m "$GIT_REFLOG_ACTION: $rlogm" HEAD $commit "$current" &&
596
+ git update-ref -m "$GIT_REFLOG_ACTION: $rlogm" HEAD $commit "$current" &&
597
rm -f -- "$GIT_DIR/MERGE_HEAD" "$GIT_DIR/MERGE_MSG" &&
598
if test -f "$NEXT_INDEX"
599
then
@@ -612,7 +612,7 @@ cd_to_toplevel
612
613
if test -d "$GIT_DIR/rr-cache"
614
then
615
- git-rerere
615
+ git rerere
616
fi
617
618
if test "$ret" = 0
@@ -623,7 +623,7 @@ then
623
fi
624
if test -z "$quiet"
625
then
626
- commit=`git-diff-tree --always --shortstat --pretty="format:%h: %s"\
626
+ commit=`git diff-tree --always --shortstat --pretty="format:%h: %s"\
627
--summary --root HEAD --`
628
echo "Created${initial_commit:+ initial} commit $commit"
629
fi
git-fetch.sh
+18
-18
@@ -117,20 +117,20 @@ append_fetch_head () {
117
test -n "$verbose" && flags="$flags$LF-v"
118
test -n "$force$single_force" && flags="$flags$LF-f"
119
GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION" \
120
- git-fetch--tool $flags append-fetch-head "$@"
120
+ git fetch--tool $flags append-fetch-head "$@"
121
}
122
123
# updating the current HEAD with git-fetch in a bare
124
# repository is always fine.
125
if test -z "$update_head_ok" && test $(is_bare_repository) = false
126
then
127
- orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
127
+ orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
128
fi
129
130
# Allow --notags from remote.$1.tagopt
131
case "$tags$no_tags" in
132
'')
133
- case "$(git-config --get "remote.$1.tagopt")" in
133
+ case "$(git config --get "remote.$1.tagopt")" in
134
--no-tags)
135
no_tags=t ;;
136
esac
@@ -146,7 +146,7 @@ if test "$tags"
146
then
147
taglist=`IFS=' ' &&
148
echo "$ls_remote_result" |
149
- git-show-ref --exclude-existing=refs/tags/ |
149
+ git show-ref --exclude-existing=refs/tags/ |
150
while read sha1 name
151
do
152
echo ".${name}:${name}"
@@ -163,18 +163,18 @@ fi
163
164
fetch_all_at_once () {
165
166
- eval=$(echo "$1" | git-fetch--tool parse-reflist "-")
166
+ eval=$(echo "$1" | git fetch--tool parse-reflist "-")
167
eval "$eval"
168
169
( : subshell because we muck with IFS
170
IFS=" $LF"
171
(
172
if test "$remote" = . ; then
173
- git-show-ref $rref || echo failed "$remote"
173
+ git show-ref $rref || echo failed "$remote"
174
elif test -f "$remote" ; then
175
test -n "$shallow_depth" &&
176
die "shallow clone with bundle is not supported"
177
- git-bundle unbundle "$remote" $rref ||
177
+ git bundle unbundle "$remote" $rref ||
178
echo failed "$remote"
179
else
180
if test -d "$remote" &&
@@ -190,16 +190,16 @@ fetch_all_at_once () {
190
# connected to our repository's tips, in which
191
# case we do not have to do any fetch.
192
theirs=$(echo "$ls_remote_result" | \
193
- git-fetch--tool -s pick-rref "$rref" "-") &&
193
+ git fetch--tool -s pick-rref "$rref" "-") &&
194
195
# This will barf when $theirs reach an object that
196
# we do not have in our repository. Otherwise,
197
# we already have everything the fetch would bring in.
198
- git-rev-list --objects $theirs --not --all \
198
+ git rev-list --objects $theirs --not --all \
199
>/dev/null 2>/dev/null
200
then
201
echo "$ls_remote_result" | \
202
- git-fetch--tool pick-rref "$rref" "-"
202
+ git fetch--tool pick-rref "$rref" "-"
203
else
204
flags=
205
case $verbose in
@@ -218,7 +218,7 @@ fetch_all_at_once () {
218
test -n "$verbose" && flags="$flags -v"
219
test -n "$force" && flags="$flags -f"
220
GIT_REFLOG_ACTION="$GIT_REFLOG_ACTION" \
221
- git-fetch--tool $flags native-store \
221
+ git fetch--tool $flags native-store \
222
"$remote" "$remote_nick" "$refs"
223
)
224
) || exit
@@ -265,13 +265,13 @@ fetch_per_ref () {
265
curl_extra_args="-k"
266
fi
267
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
268
- "`git-config --bool http.noEPSV`" = true ]; then
268
+ "`git config --bool http.noEPSV`" = true ]; then
269
noepsv_opt="--disable-epsv"
270
fi
271
272
# Find $remote_name from ls-remote output.
273
head=$(echo "$ls_remote_result" | \
274
- git-fetch--tool -s pick-rref "$remote_name" "-")
274
+ git fetch--tool -s pick-rref "$remote_name" "-")
275
expr "z$head" : "z$_x40\$" >/dev/null ||
276
die "No such ref $remote_name at $remote"
277
echo >&2 "Fetching $remote_name from $remote using $proto"
@@ -283,7 +283,7 @@ fetch_per_ref () {
283
die "shallow clone with rsync not supported"
284
TMP_HEAD="$GIT_DIR/TMP_HEAD"
285
rsync -L -q "$remote/$remote_name" "$TMP_HEAD" || exit 1
286
- head=$(git-rev-parse --verify TMP_HEAD)
286
+ head=$(git rev-parse --verify TMP_HEAD)
287
rm -f "$TMP_HEAD"
288
case "$quiet" in '') v=-v ;; *) v= ;; esac
289
test "$rsync_slurped_objects" || {
@@ -342,10 +342,10 @@ case "$no_tags$tags" in
342
# using local tracking branch.
343
taglist=$(IFS=' ' &&
344
echo "$ls_remote_result" |
345
- git-show-ref --exclude-existing=refs/tags/ |
345
+ git show-ref --exclude-existing=refs/tags/ |
346
while read sha1 name
347
do
348
- git-cat-file -t "$sha1" >/dev/null 2>&1 || continue
348
+ git cat-file -t "$sha1" >/dev/null 2>&1 || continue
349
echo >&2 "Auto-following $name"
350
echo ".${name}:${name}"
351
done)
@@ -365,10 +365,10 @@ case "$orig_head" in
365
'')
366
;;
367
?*)
368
- curr_head=$(git-rev-parse --verify HEAD 2>/dev/null)
368
+ curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
369
if test "$curr_head" != "$orig_head"
370
then
371
- git-update-ref \
371
+ git update-ref \
372
-m "$GIT_REFLOG_ACTION: Undoing incorrectly fetched HEAD." \
373
HEAD "$orig_head"
374
die "Cannot fetch into the current branch."
git-filter-branch.sh
+25
-25
@@ -81,7 +81,7 @@
81
# This is the filter for rewriting the commit's parent list.
82
# It will receive the parent string on stdin and shall output
83
# the new parent string on stdout. The parent string is in
84
-# format accepted by `git-commit-tree`: empty for initial
84
+# format accepted by `git commit-tree`: empty for initial
85
# commit, "-p parent" for a normal commit and "-p parent1
86
# -p parent2 -p parent3 ..." for a merge commit.
87
#
@@ -93,7 +93,7 @@
93
#
94
# --commit-filter COMMAND:: The filter for performing the commit
95
# If this filter is passed, it will be called instead of the
96
-# `git-commit-tree` command, with those arguments:
96
+# `git commit-tree` command, with those arguments:
97
#
98
# TREE_ID [-p PARENT_COMMIT_ID]...
99
#
@@ -132,7 +132,7 @@
132
#
133
# A significantly faster version:
134
#
135
-# git-filter-branch --index-filter 'git-update-index --remove filename' newbranch
135
+# git-filter-branch --index-filter 'git update-index --remove filename' newbranch
136
#
137
# Now, you will get the rewritten history saved in the branch 'newbranch'
138
# (your current branch is left untouched).
@@ -151,7 +151,7 @@
151
#
152
# To remove commits authored by "Darl McBribe" from the history:
153
#
154
-# git-filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Darl McBribe" ]; then shift; while [ -n "$1" ]; do shift; echo "$1"; shift; done; else git-commit-tree "$@"; fi' newbranch
154
+# git-filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Darl McBribe" ]; then shift; while [ -n "$1" ]; do shift; echo "$1"; shift; done; else git commit-tree "$@"; fi' newbranch
155
#
156
# (the shift magic first throws away the tree id and then the -p
157
# parameters). Note that this handles merges properly! In case Darl
@@ -182,9 +182,9 @@
182
# To move the whole tree into a subdirectory, or remove it from there:
183
#
184
# git-filter-branch --index-filter \
185
-# 'git-ls-files -s | sed "s-\t-&newsubdir/-" |
185
+# 'git ls-files -s | sed "s-\t-&newsubdir/-" |
186
# GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
187
-# git-update-index --index-info &&
187
+# git update-index --index-info &&
188
# mv $GIT_INDEX_FILE.new $GIT_INDEX_FILE' directorymoved
189
190
# Testsuite: TODO
@@ -240,7 +240,7 @@ filter_tree=
240
filter_index=
241
filter_parent=
242
filter_msg=cat
243
-filter_commit='git-commit-tree "$@"'
243
+filter_commit='git commit-tree "$@"'
244
filter_tag_name=
245
filter_subdir=
246
while case "$#" in 0) usage;; esac
@@ -300,7 +300,7 @@ done
300
dstbranch="$1"
301
shift
302
test -n "$dstbranch" || die "missing branch name"
303
-git-show-ref "refs/heads/$dstbranch" 2> /dev/null &&
303
+git show-ref "refs/heads/$dstbranch" 2> /dev/null &&
304
die "branch $dstbranch already exists"
305
306
test ! -e "$tempdir" || die "$tempdir already exists, please remove it"
@@ -318,7 +318,7 @@ esac
318
export GIT_DIR GIT_WORK_TREE=.
319
320
export GIT_INDEX_FILE="$(pwd)/../index"
321
-git-read-tree # seed the index file
321
+git read-tree # seed the index file
322
323
ret=0
324
@@ -327,11 +327,11 @@ mkdir ../map # map old->new commit ids for rewriting parents
327
328
case "$filter_subdir" in
329
"")
330
- git-rev-list --reverse --topo-order --default HEAD \
330
+ git rev-list --reverse --topo-order --default HEAD \
331
--parents "$@"
332
;;
333
*)
334
- git-rev-list --reverse --topo-order --default HEAD \
334
+ git rev-list --reverse --topo-order --default HEAD \
335
--parents --full-history "$@" -- "$filter_subdir"
336
esac > ../revs
337
commits=$(cat ../revs | wc -l | tr -d " ")
@@ -345,29 +345,29 @@ while read commit parents; do
345
346
case "$filter_subdir" in
347
"")
348
- git-read-tree -i -m $commit
348
+ git read-tree -i -m $commit
349
;;
350
*)
351
- git-read-tree -i -m $commit:"$filter_subdir"
351
+ git read-tree -i -m $commit:"$filter_subdir"
352
esac
353
354
export GIT_COMMIT=$commit
355
- git-cat-file commit "$commit" >../commit
355
+ git cat-file commit "$commit" >../commit
356
357
eval "$(set_ident AUTHOR <../commit)"
358
eval "$(set_ident COMMITTER <../commit)"
359
eval "$filter_env" < /dev/null
360
361
if [ "$filter_tree" ]; then
362
- git-checkout-index -f -u -a
362
+ git checkout-index -f -u -a
363
# files that $commit removed are now still in the working tree;
364
# remove them, else they would be added again
365
- git-ls-files -z --others | xargs -0 rm -f
365
+ git ls-files -z --others | xargs -0 rm -f
366
eval "$filter_tree" < /dev/null
367
- git-diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
368
- xargs -0 git-update-index --add --replace --remove
369
- git-ls-files -z --others | \
370
- xargs -0 git-update-index --add --replace --remove
367
+ git diff-index -r $commit | cut -f 2- | tr '\n' '\0' | \
368
+ xargs -0 git update-index --add --replace --remove
369
+ git ls-files -z --others | \
370
+ xargs -0 git update-index --add --replace --remove
371
fi
372
373
eval "$filter_index" < /dev/null
@@ -384,7 +384,7 @@ while read commit parents; do
384
385
sed -e '1,/^$/d' <../commit | \
386
eval "$filter_msg" | \
387
- sh -c "$filter_commit" "git-commit-tree" $(git-write-tree) $parentstr | \
387
+ sh -c "$filter_commit" "git commit-tree" $(git write-tree) $parentstr | \
388
tee ../map/$commit
389
done <../revs
390
@@ -395,7 +395,7 @@ case "$target_head" in
395
echo Nothing rewritten
396
;;
397
*)
398
- git-update-ref refs/heads/"$dstbranch" $target_head
398
+ git update-ref refs/heads/"$dstbranch" $target_head
399
if [ $(cat ../map/$src_head | wc -l) -gt 1 ]; then
400
echo "WARNING: Your commit filter caused the head commit to expand to several rewritten commits. Only the first such commit was recorded as the current $dstbranch head but you will need to resolve the situation now (probably by manually merging the other commits). These are all the commits:" >&2
401
sed 's/^/ /' ../map/$src_head >&2
@@ -405,7 +405,7 @@ case "$target_head" in
405
esac
406
407
if [ "$filter_tag_name" ]; then
408
- git-for-each-ref --format='%(objectname) %(objecttype) %(refname)' refs/tags |
408
+ git for-each-ref --format='%(objectname) %(objecttype) %(refname)' refs/tags |
409
while read sha1 type ref; do
410
ref="${ref#refs/tags/}"
411
# XXX: Rewrite tagged trees as well?
@@ -416,7 +416,7 @@ if [ "$filter_tag_name" ]; then
416
if [ "$type" = "tag" ]; then
417
# Dereference to a commit
418
sha1t="$sha1"
419
- sha1="$(git-rev-parse "$sha1"^{commit} 2>/dev/null)" || continue
419
+ sha1="$(git rev-parse "$sha1"^{commit} 2>/dev/null)" || continue
420
fi
421
422
[ -f "../map/$sha1" ] || continue
@@ -431,7 +431,7 @@ if [ "$filter_tag_name" ]; then
431
warn "unreferencing tag object $sha1t"
432
fi
433
434
- git-update-ref "refs/tags/$new_ref" "$new_sha1"
434
+ git update-ref "refs/tags/$new_ref" "$new_sha1"
435
done
436
fi
437
git-lost-found.sh
+2
-2
@@ -17,10 +17,10 @@ while read dangling type sha1
17
do
18
case "$dangling" in
19
dangling)
20
- if git-rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null
20
+ if git rev-parse --verify "$sha1^0" >/dev/null 2>/dev/null
21
then
22
dir="$laf/commit"
23
- git-show-branch "$sha1"
23
+ git show-branch "$sha1"
24
else
25
dir="$laf/other"
26
fi
git-ls-remote.sh
+1
-1
@@ -58,7 +58,7 @@ http://* | https://* | ftp://* )
58
curl_extra_args="-k"
59
fi
60
if [ -n "$GIT_CURL_FTP_NO_EPSV" -o \
61
- "`git-config --bool http.noEPSV`" = true ]; then
61
+ "`git config --bool http.noEPSV`" = true ]; then
62
curl_extra_args="${curl_extra_args} --disable-epsv"
63
fi
64
curl -nsf $curl_extra_args --header "Pragma: no-cache" "$peek_repo/info/refs" ||
git-merge-octopus.sh
+7
-7
@@ -45,7 +45,7 @@ esac
45
# MRT is the current "merge result tree"
46
47
MRC=$head MSG= PARENT="-p $head"
48
-MRT=$(git-write-tree)
48
+MRT=$(git write-tree)
49
CNT=1 ;# counting our head
50
NON_FF_MERGE=0
51
OCTOPUS_FAILURE=0
@@ -61,7 +61,7 @@ do
61
exit 2
62
esac
63
64
- common=$(git-merge-base --all $MRC $SHA1) ||
64
+ common=$(git merge-base --all $MRC $SHA1) ||
65
die "Unable to find common commit with $SHA1"
66
67
case "$LF$common$LF" in
@@ -82,22 +82,22 @@ do
82
# We still need to count this as part of the parent set.
83
84
echo "Fast forwarding to: $SHA1"
85
- git-read-tree -u -m $head $SHA1 || exit
86
- MRC=$SHA1 MRT=$(git-write-tree)
85
+ git read-tree -u -m $head $SHA1 || exit
86
+ MRC=$SHA1 MRT=$(git write-tree)
87
continue
88
fi
89
90
NON_FF_MERGE=1
91
92
echo "Trying simple merge with $SHA1"
93
- git-read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
94
- next=$(git-write-tree 2>/dev/null)
93
+ git read-tree -u -m --aggressive $common $MRT $SHA1 || exit 2
94
+ next=$(git write-tree 2>/dev/null)
95
if test $? -ne 0
96
then
97
echo "Simple merge did not work, trying automatic merge."
98
git-merge-index -o git-merge-one-file -a ||
99
OCTOPUS_FAILURE=1
100
- next=$(git-write-tree 2>/dev/null)
100
+ next=$(git write-tree 2>/dev/null)
101
fi
102
103
# We have merged the other branch successfully. Ideally
git-merge-one-file.sh
+11
-11
@@ -13,7 +13,7 @@
13
# $7 - file in branch2 mode (or empty)
14
#
15
# Handle some trivial cases.. The _really_ trivial cases have
16
-# been handled already by git-read-tree, but that one doesn't
16
+# been handled already by git read-tree, but that one doesn't
17
# do any merges that might change the tree layout.
18
19
case "${1:-.}${2:-.}${3:-.}" in
@@ -34,7 +34,7 @@ case "${1:-.}${2:-.}${3:-.}" in
34
rm -f -- "$4" &&
35
rmdir -p "$(expr "z$4" : 'z\(.*\)/')" 2>/dev/null || :
36
fi &&
37
- exec git-update-index --remove -- "$4"
37
+ exec git update-index --remove -- "$4"
38
;;
39
40
#
@@ -50,8 +50,8 @@ case "${1:-.}${2:-.}${3:-.}" in
50
echo "ERROR: untracked $4 is overwritten by the merge."
51
exit 1
52
}
53
- git-update-index --add --cacheinfo "$6$7" "$2$3" "$4" &&
54
- exec git-checkout-index -u -f -- "$4"
53
+ git update-index --add --cacheinfo "$6$7" "$2$3" "$4" &&
54
+ exec git checkout-index -u -f -- "$4"
55
;;
56
57
#
@@ -64,8 +64,8 @@ case "${1:-.}${2:-.}${3:-.}" in
64
exit 1
65
fi
66
echo "Adding $4"
67
- git-update-index --add --cacheinfo "$6" "$2" "$4" &&
68
- exec git-checkout-index -u -f -- "$4"
67
+ git update-index --add --cacheinfo "$6" "$2" "$4" &&
68
+ exec git checkout-index -u -f -- "$4"
69
;;
70
71
#
@@ -84,11 +84,11 @@ case "${1:-.}${2:-.}${3:-.}" in
84
case "$1" in
85
'')
86
echo "Added $4 in both, but differently."
87
- # This extracts OUR file in $orig, and uses git-apply to
87
+ # This extracts OUR file in $orig, and uses git apply to
88
# remove lines that are unique to ours.
89
orig=`git-unpack-file $2`
90
sz0=`wc -c <"$orig"`
91
- diff -u -La/$orig -Lb/$orig $orig $src2 | git-apply --no-add
91
+ diff -u -La/$orig -Lb/$orig $orig $src2 | git apply --no-add
92
sz1=`wc -c <"$orig"`
93
94
# If we do not have enough common material, it is not
@@ -104,12 +104,12 @@ case "${1:-.}${2:-.}${3:-.}" in
104
# Be careful for funny filename such as "-L" in "$4", which
105
# would confuse "merge" greatly.
106
src1=`git-unpack-file $2`
107
- git-merge-file "$src1" "$orig" "$src2"
107
+ git merge-file "$src1" "$orig" "$src2"
108
ret=$?
109
110
# Create the working tree file, using "our tree" version from the
111
# index, and then store the result of the merge.
112
- git-checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4"
112
+ git checkout-index -f --stage=2 -- "$4" && cat "$src1" >"$4"
113
rm -f -- "$orig" "$src1" "$src2"
114
115
if [ "$6" != "$7" ]; then
@@ -124,7 +124,7 @@ case "${1:-.}${2:-.}${3:-.}" in
124
echo "ERROR: Merge conflict in $4"
125
exit 1
126
fi
127
- exec git-update-index -- "$4"
127
+ exec git update-index -- "$4"
128
;;
129
130
*)
git-merge-ours.sh
+1
-1
@@ -9,6 +9,6 @@
9
# because the current index is what we will be committing as the
10
# merge result.
11
12
-git-diff-index --quiet --cached HEAD || exit 2
12
+git diff-index --quiet --cached HEAD || exit 2
13
14
exit 0
git-merge-resolve.sh
+3
-3
@@ -37,10 +37,10 @@ then
37
exit 2
38
fi
39
40
-git-update-index --refresh 2>/dev/null
41
-git-read-tree -u -m --aggressive $bases $head $remotes || exit 2
40
+git update-index --refresh 2>/dev/null
41
+git read-tree -u -m --aggressive $bases $head $remotes || exit 2
42
echo "Trying simple merge."
43
-if result_tree=$(git-write-tree 2>/dev/null)
43
+if result_tree=$(git write-tree 2>/dev/null)
44
then
45
exit 0
46
else
git-merge-stupid.sh
+5
-5
@@ -40,10 +40,10 @@ case "$bases" in
40
for c in $bases
41
do
42
rm -f $G
43
- GIT_INDEX_FILE=$G git-read-tree -m $c $head $remotes \
43
+ GIT_INDEX_FILE=$G git read-tree -m $c $head $remotes \
44
2>/dev/null || continue
45
# Count the paths that are unmerged.
46
- cnt=`GIT_INDEX_FILE=$G git-ls-files --unmerged | wc -l`
46
+ cnt=`GIT_INDEX_FILE=$G git ls-files --unmerged | wc -l`
47
if test $best_cnt -le 0 -o $cnt -le $best_cnt
48
then
49
best=$c
@@ -63,10 +63,10 @@ case "$bases" in
63
;;
64
esac
65
66
-git-update-index --refresh 2>/dev/null
67
-git-read-tree -u -m $common $head $remotes || exit 2
66
+git update-index --refresh 2>/dev/null
67
+git read-tree -u -m $common $head $remotes || exit 2
68
echo "Trying simple merge."
69
-if result_tree=$(git-write-tree 2>/dev/null)
69
+if result_tree=$(git write-tree 2>/dev/null)
70
then
71
exit 0
72
else
git-merge.sh
+36
-36
@@ -31,7 +31,7 @@ dropsave() {
31
32
savestate() {
33
# Stash away any local modifications.
34
- git-diff-index -z --name-only $head |
34
+ git diff-index -z --name-only $head |
35
cpio -0 -o >"$GIT_DIR/MERGE_SAVE"
36
}
37
@@ -40,7 +40,7 @@ restorestate() {
40
then
41
git reset --hard $head >/dev/null
42
cpio -iuv <"$GIT_DIR/MERGE_SAVE"
43
- git-update-index --refresh >/dev/null
43
+ git update-index --refresh >/dev/null
44
fi
45
}
46
@@ -57,7 +57,7 @@ finish_up_to_date () {
57
squash_message () {
58
echo Squashed commit of the following:
59
echo
60
- git-log --no-merges ^"$head" $remote
60
+ git log --no-merges ^"$head" $remote
61
}
62
63
finish () {
@@ -79,7 +79,7 @@ finish () {
79
echo "No merge message -- not updating HEAD"
80
;;
81
*)
82
- git-update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
82
+ git update-ref -m "$rlogm" HEAD "$1" "$head" || exit 1
83
;;
84
esac
85
;;
@@ -91,7 +91,7 @@ finish () {
91
if test "$show_diffstat" = t
92
then
93
# We want color (if set), but no pager
94
- GIT_PAGER='' git-diff --stat --summary -M "$head" "$1"
94
+ GIT_PAGER='' git diff --stat --summary -M "$head" "$1"
95
fi
96
;;
97
esac
@@ -99,13 +99,13 @@ finish () {
99
100
merge_name () {
101
remote="$1"
102
- rh=$(git-rev-parse --verify "$remote^0" 2>/dev/null) || return
103
- bh=$(git-show-ref -s --verify "refs/heads/$remote" 2>/dev/null)
102
+ rh=$(git rev-parse --verify "$remote^0" 2>/dev/null) || return
103
+ bh=$(git show-ref -s --verify "refs/heads/$remote" 2>/dev/null)
104
if test "$rh" = "$bh"
105
then
106
echo "$rh branch '$remote' of ."
107
elif truname=$(expr "$remote" : '\(.*\)~[1-9][0-9]*$') &&
108
- git-show-ref -q --verify "refs/heads/$truname" 2>/dev/null
108
+ git show-ref -q --verify "refs/heads/$truname" 2>/dev/null
109
then
110
echo "$rh branch '$truname' (early part) of ."
111
elif test "$remote" = "FETCH_HEAD" -a -r "$GIT_DIR/FETCH_HEAD"
@@ -170,7 +170,7 @@ do
170
done
171
172
if test -z "$show_diffstat"; then
173
- test "$(git-config --bool merge.diffstat)" = false && show_diffstat=false
173
+ test "$(git config --bool merge.diffstat)" = false && show_diffstat=false
174
test -z "$show_diffstat" && show_diffstat=t
175
fi
176
@@ -181,15 +181,15 @@ fi
181
# have "-m" so it is an additional safety measure to check for it.
182
183
if test -z "$have_message" &&
184
- second_token=$(git-rev-parse --verify "$2^0" 2>/dev/null) &&
185
- head_commit=$(git-rev-parse --verify "HEAD" 2>/dev/null) &&
184
+ second_token=$(git rev-parse --verify "$2^0" 2>/dev/null) &&
185
+ head_commit=$(git rev-parse --verify "HEAD" 2>/dev/null) &&
186
test "$second_token" = "$head_commit"
187
then
188
merge_msg="$1"
189
shift
190
head_arg="$1"
191
shift
192
-elif ! git-rev-parse --verify HEAD >/dev/null 2>&1
192
+elif ! git rev-parse --verify HEAD >/dev/null 2>&1
193
then
194
# If the merged head is a valid one there is no reason to
195
# forbid "git merge" into a branch yet to be born. We do
@@ -203,8 +203,8 @@ then
203
rh=$(git rev-parse --verify "$1^0") ||
204
die "$1 - not something we can merge"
205
206
- git-update-ref -m "initial pull" HEAD "$rh" "" &&
207
- git-read-tree --reset -u HEAD
206
+ git update-ref -m "initial pull" HEAD "$rh" "" &&
207
+ git read-tree --reset -u HEAD
208
exit
209
210
else
@@ -219,11 +219,11 @@ else
219
merge_name=$(for remote
220
do
221
merge_name "$remote"
222
- done | git-fmt-merge-msg
222
+ done | git fmt-merge-msg
223
)
224
merge_msg="${merge_msg:+$merge_msg$LF$LF}$merge_name"
225
fi
226
-head=$(git-rev-parse --verify "$head_arg"^0) || usage
226
+head=$(git rev-parse --verify "$head_arg"^0) || usage
227
228
# All the rest are remote heads
229
test "$#" = 0 && usage ;# we need at least one remote head.
@@ -232,7 +232,7 @@ set_reflog_action "merge $*"
232
remoteheads=
233
for remote
234
do
235
- remotehead=$(git-rev-parse --verify "$remote"^0 2>/dev/null) ||
235
+ remotehead=$(git rev-parse --verify "$remote"^0 2>/dev/null) ||
236
die "$remote - not something we can merge"
237
remoteheads="${remoteheads}$remotehead "
238
eval GITHEAD_$remotehead='"$remote"'
@@ -244,7 +244,7 @@ case "$use_strategies" in
244
'')
245
case "$#" in
246
1)
247
- var="`git-config --get pull.twohead`"
247
+ var="`git config --get pull.twohead`"
248
if test -n "$var"
249
then
250
use_strategies="$var"
@@ -252,7 +252,7 @@ case "$use_strategies" in
252
use_strategies="$default_twohead_strategies"
253
fi ;;
254
*)
255
- var="`git-config --get pull.octopus`"
255
+ var="`git config --get pull.octopus`"
256
if test -n "$var"
257
then
258
use_strategies="$var"
@@ -278,10 +278,10 @@ done
278
279
case "$#" in
280
1)
281
- common=$(git-merge-base --all $head "$@")
281
+ common=$(git merge-base --all $head "$@")
282
;;
283
*)
284
- common=$(git-show-branch --merge-base $head "$@")
284
+ common=$(git show-branch --merge-base $head "$@")
285
;;
286
esac
287
echo "$head" >"$GIT_DIR/ORIG_HEAD"
@@ -301,15 +301,15 @@ f,*)
301
;;
302
?,1,"$head",*)
303
# Again the most common case of merging one remote.
304
- echo "Updating $(git-rev-parse --short $head)..$(git-rev-parse --short $1)"
305
- git-update-index --refresh 2>/dev/null
304
+ echo "Updating $(git rev-parse --short $head)..$(git rev-parse --short $1)"
305
+ git update-index --refresh 2>/dev/null
306
msg="Fast forward"
307
if test -n "$have_message"
308
then
309
msg="$msg (no commit created; -m option ignored)"
310
fi
311
- new_head=$(git-rev-parse --verify "$1^0") &&
312
- git-read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
311
+ new_head=$(git rev-parse --verify "$1^0") &&
312
+ git read-tree -v -m -u --exclude-per-directory=.gitignore $head "$new_head" &&
313
finish "$new_head" "$msg" || exit
314
dropsave
315
exit 0
@@ -321,7 +321,7 @@ f,*)
321
?,1,*,)
322
# We are not doing octopus, not fast forward, and have only
323
# one common.
324
- git-update-index --refresh 2>/dev/null
324
+ git update-index --refresh 2>/dev/null
325
case " $use_strategies " in
326
*' recursive '*|*' recur '*)
327
: run merge later
@@ -330,13 +330,13 @@ f,*)
330
# See if it is really trivial.
331
git var GIT_COMMITTER_IDENT >/dev/null || exit
332
echo "Trying really trivial in-index merge..."
333
- if git-read-tree --trivial -m -u -v $common $head "$1" &&
334
- result_tree=$(git-write-tree)
333
+ if git read-tree --trivial -m -u -v $common $head "$1" &&
334
+ result_tree=$(git write-tree)
335
then
336
echo "Wonderful."
337
result_commit=$(
338
printf '%s\n' "$merge_msg" |
339
- git-commit-tree $result_tree -p HEAD -p "$1"
339
+ git commit-tree $result_tree -p HEAD -p "$1"
340
) || exit
341
finish "$result_commit" "In-index merge"
342
dropsave
@@ -350,7 +350,7 @@ f,*)
350
up_to_date=t
351
for remote
352
do
353
- common_one=$(git-merge-base --all $head $remote)
353
+ common_one=$(git merge-base --all $head $remote)
354
if test "$common_one" != "$remote"
355
then
356
up_to_date=f
@@ -419,8 +419,8 @@ do
419
if test "$exit" -eq 1
420
then
421
cnt=`{
422
- git-diff-files --name-only
423
- git-ls-files --unmerged
422
+ git diff-files --name-only
423
+ git ls-files --unmerged
424
} | wc -l`
425
if test $best_cnt -le 0 -o $cnt -le $best_cnt
426
then
@@ -432,15 +432,15 @@ do
432
}
433
434
# Automerge succeeded.
435
- result_tree=$(git-write-tree) && break
435
+ result_tree=$(git write-tree) && break
436
done
437
438
# If we have a resulting tree, that means the strategy module
439
# auto resolved the merge cleanly.
440
if test '' != "$result_tree"
441
then
442
- parents=$(git-show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
443
- result_commit=$(printf '%s\n' "$merge_msg" | git-commit-tree $result_tree $parents) || exit
442
+ parents=$(git show-branch --independent "$head" "$@" | sed -e 's/^/-p /')
443
+ result_commit=$(printf '%s\n' "$merge_msg" | git commit-tree $result_tree $parents) || exit
444
finish "$result_commit" "Merge made by $wt_strategy."
445
dropsave
446
exit 0
@@ -498,7 +498,7 @@ Conflicts:
498
} >>"$GIT_DIR/MERGE_MSG"
499
if test -d "$GIT_DIR/rr-cache"
500
then
501
- git-rerere
501
+ git rerere
502
fi
503
die "Automatic merge failed; fix conflicts and then commit the result."
504
fi
git-mergetool.sh
+8
-8
@@ -65,14 +65,14 @@ resolve_symlink_merge () {
65
read ans
66
case "$ans" in
67
[lL]*)
68
- git-checkout-index -f --stage=2 -- "$path"
69
- git-add -- "$path"
68
+ git checkout-index -f --stage=2 -- "$path"
69
+ git add -- "$path"
70
cleanup_temp_files --save-backup
71
return
72
;;
73
[rR]*)
74
- git-checkout-index -f --stage=3 -- "$path"
75
- git-add -- "$path"
74
+ git checkout-index -f --stage=3 -- "$path"
75
+ git add -- "$path"
76
cleanup_temp_files --save-backup
77
return
78
;;
@@ -93,12 +93,12 @@ resolve_deleted_merge () {
93
read ans
94
case "$ans" in
95
[mMcC]*)
96
- git-add -- "$path"
96
+ git add -- "$path"
97
cleanup_temp_files --save-backup
98
return
99
;;
100
[dD]*)
101
- git-rm -- "$path" > /dev/null
101
+ git rm -- "$path" > /dev/null
102
cleanup_temp_files
103
return
104
;;
@@ -140,7 +140,7 @@ remove_backup () {
140
merge_file () {
141
path="$1"
142
143
- f=`git-ls-files -u -- "$path"`
143
+ f=`git ls-files -u -- "$path"`
144
if test -z "$f" ; then
145
if test ! -f "$path" ; then
146
echo "$path: file not found"
@@ -297,7 +297,7 @@ do
297
done
298
299
if test -z "$merge_tool"; then
300
- merge_tool=`git-config merge.tool`
300
+ merge_tool=`git config merge.tool`
301
case "$merge_tool" in
302
kdiff3 | tkdiff | xxdiff | meld | opendiff | emerge | vimdiff | gvimdiff | "")
303
;; # happy
git-parse-remote.sh
+12
-12
@@ -2,7 +2,7 @@
2
3
# git-ls-remote could be called from outside a git managed repository;
4
# this would fail in that case and would issue an error message.
5
-GIT_DIR=$(git-rev-parse --git-dir 2>/dev/null) || :;
5
+GIT_DIR=$(git rev-parse --git-dir 2>/dev/null) || :;
6
7
get_data_source () {
8
case "$1" in
@@ -13,7 +13,7 @@ get_data_source () {
13
echo self
14
;;
15
*)
16
- if test "$(git-config --get "remote.$1.url")"
16
+ if test "$(git config --get "remote.$1.url")"
17
then
18
echo config
19
elif test -f "$GIT_DIR/remotes/$1"
@@ -38,7 +38,7 @@ get_remote_url () {
38
echo "$1"
39
;;
40
config)
41
- git-config --get "remote.$1.url"
41
+ git config --get "remote.$1.url"
42
;;
43
remotes)
44
sed -ne '/^URL: */{
@@ -55,8 +55,8 @@ get_remote_url () {
55
}
56
57
get_default_remote () {
58
- curr_branch=$(git-symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
59
- origin=$(git-config --get "branch.$curr_branch.remote")
58
+ curr_branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||')
59
+ origin=$(git config --get "branch.$curr_branch.remote")
60
echo ${origin:-origin}
61
}
62
@@ -66,7 +66,7 @@ get_remote_default_refs_for_push () {
66
'' | branches | self)
67
;; # no default push mapping, just send matching refs.
68
config)
69
- git-config --get-all "remote.$1.push" ;;
69
+ git config --get-all "remote.$1.push" ;;
70
remotes)
71
sed -ne '/^Push: */{
72
s///p
@@ -107,9 +107,9 @@ canon_refs_list_for_fetch () {
107
shift
108
if test "$remote" = "$(get_default_remote)"
109
then
110
- curr_branch=$(git-symbolic-ref -q HEAD | \
110
+ curr_branch=$(git symbolic-ref -q HEAD | \
111
sed -e 's|^refs/heads/||')
112
- merge_branches=$(git-config \
112
+ merge_branches=$(git config \
113
--get-all "branch.${curr_branch}.merge")
114
fi
115
if test -z "$merge_branches" && test $is_explicit != explicit
@@ -156,7 +156,7 @@ canon_refs_list_for_fetch () {
156
157
if local_ref_name=$(expr "z$local" : 'zrefs/\(.*\)')
158
then
159
- git-check-ref-format "$local_ref_name" ||
159
+ git check-ref-format "$local_ref_name" ||
160
die "* refusing to create funny ref '$local_ref_name' locally"
161
fi
162
echo "${dot_prefix}${force}${remote}:${local}"
@@ -171,11 +171,11 @@ get_remote_default_refs_for_fetch () {
171
echo "HEAD:" ;;
172
self)
173
canon_refs_list_for_fetch -d "$1" \
174
- $(git-for-each-ref --format='%(refname):')
174
+ $(git for-each-ref --format='%(refname):')
175
;;
176
config)
177
canon_refs_list_for_fetch -d "$1" \
178
- $(git-config --get-all "remote.$1.fetch") ;;
178
+ $(git config --get-all "remote.$1.fetch") ;;
179
branches)
180
remote_branch=$(sed -ne '/#/s/.*#//p' "$GIT_DIR/branches/$1")
181
case "$remote_branch" in '') remote_branch=master ;; esac
@@ -254,7 +254,7 @@ get_uploadpack () {
254
data_source=$(get_data_source "$1")
255
case "$data_source" in
256
config)
257
- uplp=$(git-config --get "remote.$1.uploadpack")
257
+ uplp=$(git config --get "remote.$1.uploadpack")
258
echo ${uplp:-git-upload-pack}
259
;;
260
*)
git-pull.sh
+8
-8
@@ -54,10 +54,10 @@ do
54
shift
55
done
56
57
-orig_head=$(git-rev-parse --verify HEAD 2>/dev/null)
57
+orig_head=$(git rev-parse --verify HEAD 2>/dev/null)
58
git-fetch --update-head-ok "$@" || exit 1
59
60
-curr_head=$(git-rev-parse --verify HEAD 2>/dev/null)
60
+curr_head=$(git rev-parse --verify HEAD 2>/dev/null)
61
if test "$curr_head" != "$orig_head"
62
then
63
# The fetch involved updating the current branch.
@@ -69,8 +69,8 @@ then
69
echo >&2 "Warning: fetch updated the current branch head."
70
echo >&2 "Warning: fast forwarding your working tree from"
71
echo >&2 "Warning: commit $orig_head."
72
- git-update-index --refresh 2>/dev/null
73
- git-read-tree -u -m "$orig_head" "$curr_head" ||
72
+ git update-index --refresh 2>/dev/null
73
+ git read-tree -u -m "$orig_head" "$curr_head" ||
74
die 'Cannot fast-forward your working tree.
75
After making sure that you saved anything precious from
76
$ git diff '$orig_head'
@@ -86,7 +86,7 @@ merge_head=$(sed -e '/ not-for-merge /d' \
86
87
case "$merge_head" in
88
'')
89
- curr_branch=$(git-symbolic-ref -q HEAD)
89
+ curr_branch=$(git symbolic-ref -q HEAD)
90
case $? in
91
0) ;;
92
1) echo >&2 "You are not currently on a branch; you must explicitly"
@@ -113,11 +113,11 @@ esac
113
114
if test -z "$orig_head"
115
then
116
- git-update-ref -m "initial pull" HEAD $merge_head "" &&
117
- git-read-tree --reset -u HEAD || exit 1
116
+ git update-ref -m "initial pull" HEAD $merge_head "" &&
117
+ git read-tree --reset -u HEAD || exit 1
118
exit
119
fi
120
121
-merge_name=$(git-fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
121
+merge_name=$(git fmt-merge-msg <"$GIT_DIR/FETCH_HEAD") || exit
122
exec git-merge $no_summary $no_commit $squash $strategy_args \
123
"$merge_name" HEAD $merge_head
git-quiltimport.sh
+6
-6
@@ -67,12 +67,12 @@ tmp_info="$tmp_dir/info"
67
68
69
# Find the intial commit
70
-commit=$(git-rev-parse HEAD)
70
+commit=$(git rev-parse HEAD)
71
72
mkdir $tmp_dir || exit 2
73
for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
74
echo $patch_name
75
- (cat $QUILT_PATCHES/$patch_name | git-mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
75
+ (cat $QUILT_PATCHES/$patch_name | git mailinfo "$tmp_msg" "$tmp_patch" > "$tmp_info") || exit 3
76
test -s .dotest/patch || {
77
echo "Patch is empty. Was it split wrong?"
78
exit 1
@@ -113,10 +113,10 @@ for patch_name in $(cat "$QUILT_PATCHES/series" | grep -v '^#'); do
113
fi
114
115
if [ -z "$dry_run" ] ; then
116
- git-apply --index -C1 "$tmp_patch" &&
117
- tree=$(git-write-tree) &&
118
- commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git-commit-tree $tree -p $commit) &&
119
- git-update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
116
+ git apply --index -C1 "$tmp_patch" &&
117
+ tree=$(git write-tree) &&
118
+ commit=$( (echo "$SUBJECT"; echo; cat "$tmp_msg") | git commit-tree $tree -p $commit) &&
119
+ git update-ref -m "quiltimport: $patch_name" HEAD $commit || exit 4
120
fi
121
done
122
rm -rf $tmp_dir || exit 5
git-rebase.sh
+19
-19
@@ -51,7 +51,7 @@ continue_merge () {
51
test -n "$prev_head" || die "prev_head must be defined"
52
test -d "$dotest" || die "$dotest directory does not exist"
53
54
- unmerged=$(git-ls-files -u)
54
+ unmerged=$(git ls-files -u)
55
if test -n "$unmerged"
56
then
57
echo "You still have unmerged paths in your index"
@@ -59,7 +59,7 @@ continue_merge () {
59
die "$RESOLVEMSG"
60
fi
61
62
- if ! git-diff-index --quiet HEAD
62
+ if ! git diff-index --quiet HEAD
63
then
64
if ! git-commit -C "`cat $dotest/current`"
65
then
@@ -71,10 +71,10 @@ continue_merge () {
71
else
72
printf "Already applied: %0${prec}d" $msgnum
73
fi
74
- echo ' '`git-rev-list --pretty=oneline -1 HEAD | \
74
+ echo ' '`git rev-list --pretty=oneline -1 HEAD | \
75
sed 's/^[a-f0-9]\+ //'`
76
77
- prev_head=`git-rev-parse HEAD^0`
77
+ prev_head=`git rev-parse HEAD^0`
78
# save the resulting commit so we can read-tree on it later
79
echo "$prev_head" > "$dotest/prev_head"
80
@@ -86,8 +86,8 @@ continue_merge () {
86
call_merge () {
87
cmt="$(cat $dotest/cmt.$1)"
88
echo "$cmt" > "$dotest/current"
89
- hd=$(git-rev-parse --verify HEAD)
90
- cmt_name=$(git-symbolic-ref HEAD)
89
+ hd=$(git rev-parse --verify HEAD)
90
+ cmt_name=$(git symbolic-ref HEAD)
91
msgnum=$(cat $dotest/msgnum)
92
end=$(cat $dotest/end)
93
eval GITHEAD_$cmt='"${cmt_name##refs/heads/}~$(($end - $msgnum))"'
@@ -101,7 +101,7 @@ call_merge () {
101
return
102
;;
103
1)
104
- test -d "$GIT_DIR/rr-cache" && git-rerere
104
+ test -d "$GIT_DIR/rr-cache" && git rerere
105
die "$RESOLVEMSG"
106
;;
107
2)
@@ -134,7 +134,7 @@ while case "$#" in 0) break ;; esac
134
do
135
case "$1" in
136
--continue)
137
- git-diff-files --quiet || {
137
+ git diff-files --quiet || {
138
echo "You must edit all merge conflicts and then"
139
echo "mark them as resolved using git add"
140
exit 1
@@ -162,7 +162,7 @@ do
162
then
163
if test -d "$GIT_DIR/rr-cache"
164
then
165
- git-rerere clear
165
+ git rerere clear
166
fi
167
prev_head="`cat $dotest/prev_head`"
168
end="`cat $dotest/end`"
@@ -183,7 +183,7 @@ do
183
--abort)
184
if test -d "$GIT_DIR/rr-cache"
185
then
186
- git-rerere clear
186
+ git rerere clear
187
fi
188
if test -d "$dotest"
189
then
@@ -259,8 +259,8 @@ else
259
fi
260
261
# The tree must be really really clean.
262
-git-update-index --refresh || exit
263
-diff=$(git-diff-index --cached --name-status -r HEAD)
262
+git update-index --refresh || exit
263
+diff=$(git diff-index --cached --name-status -r HEAD)
264
case "$diff" in
265
?*) echo "cannot rebase: your index is not up-to-date"
266
echo "$diff"
@@ -275,7 +275,7 @@ upstream=`git rev-parse --verify "${upstream_name}^0"` ||
275
276
# Make sure the branch to rebase onto is valid.
277
onto_name=${newbase-"$upstream_name"}
278
-onto=$(git-rev-parse --verify "${onto_name}^0") || exit
278
+onto=$(git rev-parse --verify "${onto_name}^0") || exit
279
280
# If a hook exists, give it a chance to interrupt
281
if test -x "$GIT_DIR/hooks/pre-rebase"
@@ -301,13 +301,13 @@ case "$#" in
301
fi
302
;;
303
esac
304
-branch=$(git-rev-parse --verify "${branch_name}^0") || exit
304
+branch=$(git rev-parse --verify "${branch_name}^0") || exit
305
306
# Now we are rebasing commits $upstream..$branch on top of $onto
307
308
# Check if we are already based on $onto, but this should be
309
# done only when upstream and onto are the same.
310
-mb=$(git-merge-base "$onto" "$branch")
310
+mb=$(git merge-base "$onto" "$branch")
311
if test "$upstream" = "$onto" && test "$mb" = "$onto"
312
then
313
echo >&2 "Current branch $branch_name is up to date."
@@ -318,7 +318,7 @@ if test -n "$verbose"
318
then
319
echo "Changes from $mb to $onto:"
320
# We want color (if set), but no pager
321
- GIT_PAGER='' git-diff --stat --summary "$mb" "$onto"
321
+ GIT_PAGER='' git diff --stat --summary "$mb" "$onto"
322
fi
323
324
# Rewind the head to "$onto"; this saves our current head in ORIG_HEAD.
@@ -335,7 +335,7 @@ fi
335
336
if test -z "$do_merge"
337
then
338
- git-format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD |
338
+ git format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD |
339
git am $git_am_opt --binary -3 -k --resolvemsg="$RESOLVEMSG"
340
exit $?
341
fi
@@ -346,11 +346,11 @@ fi
346
mkdir -p "$dotest"
347
echo "$onto" > "$dotest/onto"
348
echo "$onto_name" > "$dotest/onto_name"
349
-prev_head=`git-rev-parse HEAD^0`
349
+prev_head=`git rev-parse HEAD^0`
350
echo "$prev_head" > "$dotest/prev_head"
351
352
msgnum=0
353
-for cmt in `git-rev-list --reverse --no-merges "$upstream"..ORIG_HEAD`
353
+for cmt in `git rev-list --reverse --no-merges "$upstream"..ORIG_HEAD`
354
do
355
msgnum=$(($msgnum + 1))
356
echo "$cmt" > "$dotest/cmt.$msgnum"
git-repack.sh
+2
-2
@@ -63,7 +63,7 @@ case ",$all_into_one," in
63
esac
64
65
args="$args $local $quiet $no_reuse$extra"
66
-names=$(git-pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
66
+names=$(git pack-objects --non-empty --all --reflog $args </dev/null "$PACKTMP") ||
67
exit 1
68
if [ -z "$names" ]; then
69
echo Nothing new to pack.
@@ -113,7 +113,7 @@ then
113
done
114
)
115
fi
116
- git-prune-packed $quiet
116
+ git prune-packed $quiet
117
fi
118
119
case "$no_update_info" in
git-request-pull.sh
+2
-2
@@ -18,8 +18,8 @@ head=${3-HEAD}
18
[ "$base" ] || usage
19
[ "$url" ] || usage
20
21
-baserev=`git-rev-parse --verify "$base"^0` &&
22
-headrev=`git-rev-parse --verify "$head"^0` || exit
21
+baserev=`git rev-parse --verify "$base"^0` &&
22
+headrev=`git rev-parse --verify "$head"^0` || exit
23
24
merge_base=`git merge-base $baserev $headrev` ||
25
die "fatal: No commits in common between $base and $head"
git-reset.sh
+8
-8
@@ -24,7 +24,7 @@ do
24
usage
25
;;
26
*)
27
- rev=$(git-rev-parse --verify "$1") || exit
27
+ rev=$(git rev-parse --verify "$1") || exit
28
shift
29
break
30
;;
@@ -33,7 +33,7 @@ do
33
done
34
35
: ${rev=HEAD}
36
-rev=$(git-rev-parse --verify $rev^0) || exit
36
+rev=$(git rev-parse --verify $rev^0) || exit
37
38
# Skip -- in "git reset HEAD -- foo" and "git reset -- foo".
39
case "$1" in --) shift ;; esac
@@ -46,7 +46,7 @@ then
46
test "$reset_type" = "--mixed" ||
47
die "Cannot do partial $reset_type reset."
48
49
- git-diff-index --cached $rev -- "$@" |
49
+ git diff-index --cached $rev -- "$@" |
50
sed -e 's/^:\([0-7][0-7]*\) [0-7][0-7]* \([0-9a-f][0-9a-f]*\) [0-9a-f][0-9a-f]* [A-Z] \(.*\)$/\1 \2 \3/' |
51
git update-index --add --remove --index-info || exit
52
git update-index --refresh
@@ -66,22 +66,22 @@ fi
66
if test "$reset_type" = "--soft"
67
then
68
if test -f "$GIT_DIR/MERGE_HEAD" ||
69
- test "" != "$(git-ls-files --unmerged)"
69
+ test "" != "$(git ls-files --unmerged)"
70
then
71
die "Cannot do a soft reset in the middle of a merge."
72
fi
73
else
74
- git-read-tree -v --reset $update "$rev" || exit
74
+ git read-tree -v --reset $update "$rev" || exit
75
fi
76
77
# Any resets update HEAD to the head being switched to.
78
-if orig=$(git-rev-parse --verify HEAD 2>/dev/null)
78
+if orig=$(git rev-parse --verify HEAD 2>/dev/null)
79
then
80
echo "$orig" >"$GIT_DIR/ORIG_HEAD"
81
else
82
rm -f "$GIT_DIR/ORIG_HEAD"
83
fi
84
-git-update-ref -m "$GIT_REFLOG_ACTION" HEAD "$rev"
84
+git update-ref -m "$GIT_REFLOG_ACTION" HEAD "$rev"
85
update_ref_status=$?
86
87
case "$reset_type" in
@@ -96,7 +96,7 @@ case "$reset_type" in
96
;; # Nothing else to do
97
--mixed )
98
# Report what has not been updated.
99
- git-update-index --refresh
99
+ git update-index --refresh
100
;;
101
esac
102
git-sh-setup.sh
+6
-6
@@ -29,11 +29,11 @@ set_reflog_action() {
29
}
30
31
is_bare_repository () {
32
- git-rev-parse --is-bare-repository
32
+ git rev-parse --is-bare-repository
33
}
34
35
cd_to_toplevel () {
36
- cdup=$(git-rev-parse --show-cdup)
36
+ cdup=$(git rev-parse --show-cdup)
37
if test ! -z "$cdup"
38
then
39
cd "$cdup" || {
@@ -44,8 +44,8 @@ cd_to_toplevel () {
44
}
45
46
require_work_tree () {
47
- test $(git-rev-parse --is-inside-work-tree) = true &&
48
- test $(git-rev-parse --is-inside-git-dir) = false ||
47
+ test $(git rev-parse --is-inside-work-tree) = true &&
48
+ test $(git rev-parse --is-inside-git-dir) = false ||
49
die "fatal: $0 cannot be used without a working tree."
50
}
51
@@ -95,12 +95,12 @@ esac
95
if [ -z "$SUBDIRECTORY_OK" ]
96
then
97
: ${GIT_DIR=.git}
98
- GIT_DIR=$(GIT_DIR="$GIT_DIR" git-rev-parse --git-dir) || {
98
+ GIT_DIR=$(GIT_DIR="$GIT_DIR" git rev-parse --git-dir) || {
99
exit=$?
100
echo >&2 "You need to run this command from the toplevel of the working tree."
101
exit $exit
102
}
103
else
104
- GIT_DIR=$(git-rev-parse --git-dir) || exit
104
+ GIT_DIR=$(git rev-parse --git-dir) || exit
105
fi
106
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
git-stash.sh
+27
-27
@@ -12,8 +12,8 @@ trap 'rm -f "$TMP-*"' 0
12
ref_stash=refs/stash
13
14
no_changes () {
15
- git-diff-index --quiet --cached HEAD &&
16
- git-diff-files --quiet
15
+ git diff-index --quiet --cached HEAD &&
16
+ git diff-files --quiet
17
}
18
19
clear_stash () {
@@ -32,14 +32,14 @@ save_stash () {
32
clear_stash || die "Cannot initialize stash"
33
34
# state of the base commit
35
- if b_commit=$(git-rev-parse --verify HEAD)
35
+ if b_commit=$(git rev-parse --verify HEAD)
36
then
37
- head=$(git-log --abbrev-commit --pretty=oneline -n 1 HEAD)
37
+ head=$(git log --abbrev-commit --pretty=oneline -n 1 HEAD)
38
else
39
die "You do not have the initial commit yet"
40
fi
41
42
- if branch=$(git-symbolic-ref -q HEAD)
42
+ if branch=$(git symbolic-ref -q HEAD)
43
then
44
branch=${branch#refs/heads/}
45
else
@@ -48,9 +48,9 @@ save_stash () {
48
msg=$(printf '%s: %s' "$branch" "$head")
49
50
# state of the index
51
- i_tree=$(git-write-tree) &&
51
+ i_tree=$(git write-tree) &&
52
i_commit=$(printf 'index on %s' "$msg" |
53
- git-commit-tree $i_tree -p $b_commit) ||
53
+ git commit-tree $i_tree -p $b_commit) ||
54
die "Cannot save the current index state"
55
56
# state of the working tree
@@ -59,57 +59,57 @@ save_stash () {
59
export GIT_INDEX_FILE &&
60
61
rm -f "$TMP-index" &&
62
- git-read-tree $i_tree &&
63
- git-add -u &&
64
- git-write-tree &&
62
+ git read-tree $i_tree &&
63
+ git add -u &&
64
+ git write-tree &&
65
rm -f "$TMP-index"
66
) ) ||
67
die "Cannot save the current worktree state"
68
69
# create the stash
70
w_commit=$(printf 'WIP on %s' "$msg" |
71
- git-commit-tree $w_tree -p $b_commit -p $i_commit) ||
71
+ git commit-tree $w_tree -p $b_commit -p $i_commit) ||
72
die "Cannot record working tree state"
73
74
- git-update-ref -m "$msg" $ref_stash $w_commit ||
74
+ git update-ref -m "$msg" $ref_stash $w_commit ||
75
die "Cannot save the current status"
76
printf >&2 'Saved WIP on %s\n' "$msg"
77
}
78
79
have_stash () {
80
- git-rev-parse --verify $ref_stash >/dev/null 2>&1
80
+ git rev-parse --verify $ref_stash >/dev/null 2>&1
81
}
82
83
list_stash () {
84
have_stash || return 0
85
- git-log --pretty=oneline -g "$@" $ref_stash |
85
+ git log --pretty=oneline -g "$@" $ref_stash |
86
sed -n -e 's/^[.0-9a-f]* refs\///p'
87
}
88
89
show_stash () {
90
- flags=$(git-rev-parse --no-revs --flags "$@")
90
+ flags=$(git rev-parse --no-revs --flags "$@")
91
if test -z "$flags"
92
then
93
flags=--stat
94
fi
95
- s=$(git-rev-parse --revs-only --no-flags --default $ref_stash "$@")
95
+ s=$(git rev-parse --revs-only --no-flags --default $ref_stash "$@")
96
97
- w_commit=$(git-rev-parse --verify "$s") &&
98
- b_commit=$(git-rev-parse --verify "$s^") &&
99
- git-diff $flags $b_commit $w_commit
97
+ w_commit=$(git rev-parse --verify "$s") &&
98
+ b_commit=$(git rev-parse --verify "$s^") &&
99
+ git diff $flags $b_commit $w_commit
100
}
101
102
apply_stash () {
103
- git-diff-files --quiet ||
103
+ git diff-files --quiet ||
104
die 'Cannot restore on top of a dirty state'
105
106
# current index state
107
- c_tree=$(git-write-tree) ||
107
+ c_tree=$(git write-tree) ||
108
die 'Cannot apply a stash in the middle of a merge'
109
110
- s=$(git-rev-parse --revs-only --no-flags --default $ref_stash "$@") &&
111
- w_tree=$(git-rev-parse --verify "$s:") &&
112
- b_tree=$(git-rev-parse --verify "$s^:") ||
110
+ s=$(git rev-parse --revs-only --no-flags --default $ref_stash "$@") &&
111
+ w_tree=$(git rev-parse --verify "$s:") &&
112
+ b_tree=$(git rev-parse --verify "$s^:") ||
113
die "$*: no valid stashed state found"
114
115
eval "
@@ -123,9 +123,9 @@ apply_stash () {
123
then
124
# No conflict
125
a="$TMP-added" &&
126
- git-diff --cached --name-only --diff-filter=A $c_tree >"$a" &&
127
- git-read-tree --reset $c_tree &&
128
- git-update-index --add --stdin <"$a" ||
126
+ git diff --cached --name-only --diff-filter=A $c_tree >"$a" &&
127
+ git read-tree --reset $c_tree &&
128
+ git update-index --add --stdin <"$a" ||
129
die "Cannot unstage modified files"
130
git-status
131
rm -f "$a"
git-submodule.sh
+13
-13
@@ -46,7 +46,7 @@ get_repo_base() {
46
#
47
module_name()
48
{
49
- name=$(GIT_CONFIG=.gitmodules git-config --get-regexp '^submodule\..*\.path$' "$1" |
49
+ name=$(GIT_CONFIG=.gitmodules git config --get-regexp '^submodule\..*\.path$' "$1" |
50
sed -nre 's/^submodule\.(.+)\.path .+$/\1/p')
51
test -z "$name" &&
52
die "No submodule mapping found in .gitmodules for path '$path'"
@@ -116,7 +116,7 @@ module_add()
116
test -e "$path" &&
117
die "'$path' already exists"
118
119
- git-ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
119
+ git ls-files --error-unmatch "$path" > /dev/null 2>&1 &&
120
die "'$path' already exists in the index"
121
122
module_clone "$path" "$repo" || exit
@@ -143,14 +143,14 @@ modules_init()
143
do
144
# Skip already registered paths
145
name=$(module_name "$path") || exit
146
- url=$(git-config submodule."$name".url)
146
+ url=$(git config submodule."$name".url)
147
test -z "$url" || continue
148
149
- url=$(GIT_CONFIG=.gitmodules git-config submodule."$name".url)
149
+ url=$(GIT_CONFIG=.gitmodules git config submodule."$name".url)
150
test -z "$url" &&
151
die "No url found for submodule path '$path' in .gitmodules"
152
153
- git-config submodule."$name".url "$url" ||
153
+ git config submodule."$name".url "$url" ||
154
die "Failed to register url for submodule path '$path'"
155
156
say "Submodule '$name' ($url) registered for path '$path'"
@@ -168,7 +168,7 @@ modules_update()
168
while read mode sha1 stage path
169
do
170
name=$(module_name "$path") || exit
171
- url=$(git-config submodule."$name".url)
171
+ url=$(git config submodule."$name".url)
172
if test -z "$url"
173
then
174
# Only mention uninitialized submodules when its
@@ -184,7 +184,7 @@ modules_update()
184
subsha1=
185
else
186
subsha1=$(unset GIT_DIR && cd "$path" &&
187
- git-rev-parse --verify HEAD) ||
187
+ git rev-parse --verify HEAD) ||
188
die "Unable to find current revision in submodule path '$path'"
189
fi
190
@@ -203,9 +203,9 @@ set_name_rev () {
203
revname=$( (
204
unset GIT_DIR &&
205
cd "$1" && {
206
- git-describe "$2" 2>/dev/null ||
207
- git-describe --tags "$2" 2>/dev/null ||
208
- git-describe --contains --tags "$2"
206
+ git describe "$2" 2>/dev/null ||
207
+ git describe --tags "$2" 2>/dev/null ||
208
+ git describe --contains --tags "$2"
209
}
210
) )
211
test -z "$revname" || revname=" ($revname)"
@@ -227,13 +227,13 @@ modules_list()
227
while read mode sha1 stage path
228
do
229
name=$(module_name "$path") || exit
230
- url=$(git-config submodule."$name".url)
230
+ url=$(git config submodule."$name".url)
231
if test -z "url" || ! test -d "$path"/.git
232
then
233
say "-$sha1 $path"
234
continue;
235
fi
236
- revname=$(unset GIT_DIR && cd "$path" && git-describe --tags $sha1)
236
+ revname=$(unset GIT_DIR && cd "$path" && git describe --tags $sha1)
237
set_name_rev "$path" $"sha1"
238
if git diff-files --quiet -- "$path"
239
then
@@ -241,7 +241,7 @@ modules_list()
241
else
242
if test -z "$cached"
243
then
244
- sha1=$(unset GIT_DIR && cd "$path" && git-rev-parse --verify HEAD)
244
+ sha1=$(unset GIT_DIR && cd "$path" && git rev-parse --verify HEAD)
245
set_name_rev "$path" $"sha1"
246
fi
247
say "+$sha1 $path$revname"
git-tag.sh
+9
-9
@@ -118,12 +118,12 @@ do
118
had_error=0
119
for tag
120
do
121
- cur=$(git-show-ref --verify --hash -- "refs/tags/$tag") || {
121
+ cur=$(git show-ref --verify --hash -- "refs/tags/$tag") || {
122
echo >&2 "Seriously, what tag are you talking about?"
123
had_error=1
124
continue
125
}
126
- git-update-ref -m 'tag: delete' -d "refs/tags/$tag" "$cur" || {
126
+ git update-ref -m 'tag: delete' -d "refs/tags/$tag" "$cur" || {
127
had_error=1
128
continue
129
}
@@ -134,7 +134,7 @@ do
134
-v)
135
shift
136
tag_name="$1"
137
- tag=$(git-show-ref --verify --hash -- "refs/tags/$tag_name") ||
137
+ tag=$(git show-ref --verify --hash -- "refs/tags/$tag_name") ||
138
die "Seriously, what tag are you talking about?"
139
git-verify-tag -v "$tag"
140
exit $?
@@ -153,21 +153,21 @@ done
153
name="$1"
154
[ "$name" ] || usage
155
prev=0000000000000000000000000000000000000000
156
-if git-show-ref --verify --quiet -- "refs/tags/$name"
156
+if git show-ref --verify --quiet -- "refs/tags/$name"
157
then
158
test -n "$force" || die "tag '$name' already exists"
159
prev=`git rev-parse "refs/tags/$name"`
160
fi
161
shift
162
-git-check-ref-format "tags/$name" ||
162
+git check-ref-format "tags/$name" ||
163
die "we do not like '$name' as a tag name."
164
165
-object=$(git-rev-parse --verify --default HEAD "$@") || exit 1
166
-type=$(git-cat-file -t $object) || exit 1
165
+object=$(git rev-parse --verify --default HEAD "$@") || exit 1
166
+type=$(git cat-file -t $object) || exit 1
167
tagger=$(git-var GIT_COMMITTER_IDENT) || exit 1
168
169
test -n "$username" ||
170
- username=$(git-repo-config user.signingkey) ||
170
+ username=$(git repo-config user.signingkey) ||
171
username=$(expr "z$tagger" : 'z\(.*>\)')
172
173
trap 'rm -f "$GIT_DIR"/TAG_TMP* "$GIT_DIR"/TAG_FINALMSG "$GIT_DIR"/TAG_EDITMSG' 0
@@ -183,7 +183,7 @@ if [ "$annotate" ]; then
183
fi
184
185
grep -v '^#' <"$GIT_DIR"/TAG_EDITMSG |
186
- git-stripspace >"$GIT_DIR"/TAG_FINALMSG
186
+ git stripspace >"$GIT_DIR"/TAG_FINALMSG
187
188
[ -s "$GIT_DIR"/TAG_FINALMSG -o -n "$message_given" ] || {
189
echo >&2 "No tag message?"
git-verify-tag.sh
+3
-3
@@ -21,7 +21,7 @@ then
21
usage
22
fi
23
24
-type="$(git-cat-file -t "$1" 2>/dev/null)" ||
24
+type="$(git cat-file -t "$1" 2>/dev/null)" ||
25
die "$1: no such object."
26
27
test "$type" = tag ||
@@ -29,14 +29,14 @@ test "$type" = tag ||
29
30
case "$verbose" in
31
t)
32
- git-cat-file -p "$1" |
32
+ git cat-file -p "$1" |
33
sed -n -e '/^-----BEGIN PGP SIGNATURE-----/q' -e p
34
;;
35
esac
36
37
trap 'rm -f "$GIT_DIR/.tmp-vtag"' 0
38
39
-git-cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
39
+git cat-file tag "$1" >"$GIT_DIR/.tmp-vtag" || exit 1
40
sed -n -e '
41
/^-----BEGIN PGP SIGNATURE-----$/q
42
p
t/lib-read-tree-m-3way.sh
+29
-29
@@ -10,14 +10,14 @@ do
10
echo This is Z/$p from the original tree. >Z/$p
11
test_expect_success \
12
"adding test file $p and Z/$p" \
13
- 'git-update-index --add $p &&
14
- git-update-index --add Z/$p'
13
+ 'git update-index --add $p &&
14
+ git update-index --add Z/$p'
15
done
16
done
17
echo This is SS from the original tree. >SS
18
test_expect_success \
19
'adding test file SS' \
20
- 'git-update-index --add SS'
20
+ 'git update-index --add SS'
21
cat >TT <<\EOF
22
This is a trivial merge sample text.
23
Branch A is expected to upcase this word, here.
@@ -32,10 +32,10 @@ This concludes the trivial merge sample file.
32
EOF
33
test_expect_success \
34
'adding test file TT' \
35
- 'git-update-index --add TT'
35
+ 'git update-index --add TT'
36
test_expect_success \
37
'prepare initial tree' \
38
- 'tree_O=$(git-write-tree)'
38
+ 'tree_O=$(git write-tree)'
39
40
################################################################
41
# Branch A and B makes the changes according to the above matrix.
@@ -47,14 +47,14 @@ to_remove=$(echo D? Z/D?)
47
rm -f $to_remove
48
test_expect_success \
49
'change in branch A (removal)' \
50
- 'git-update-index --remove $to_remove'
50
+ 'git update-index --remove $to_remove'
51
52
for p in M? Z/M?
53
do
54
echo This is modified $p in the branch A. >$p
55
test_expect_success \
56
'change in branch A (modification)' \
57
- "git-update-index $p"
57
+ "git update-index $p"
58
done
59
60
for p in AN AA Z/AN Z/AA
@@ -62,31 +62,31 @@ do
62
echo This is added $p in the branch A. >$p
63
test_expect_success \
64
'change in branch A (addition)' \
65
- "git-update-index --add $p"
65
+ "git update-index --add $p"
66
done
67
68
echo This is SS from the modified tree. >SS
69
echo This is LL from the modified tree. >LL
70
test_expect_success \
71
'change in branch A (addition)' \
72
- 'git-update-index --add LL &&
73
- git-update-index SS'
72
+ 'git update-index --add LL &&
73
+ git update-index SS'
74
mv TT TT-
75
sed -e '/Branch A/s/word/WORD/g' <TT- >TT
76
rm -f TT-
77
test_expect_success \
78
'change in branch A (edit)' \
79
- 'git-update-index TT'
79
+ 'git update-index TT'
80
81
mkdir DF
82
echo Branch A makes a file at DF/DF, creating a directory DF. >DF/DF
83
test_expect_success \
84
'change in branch A (change file to directory)' \
85
- 'git-update-index --add DF/DF'
85
+ 'git update-index --add DF/DF'
86
87
test_expect_success \
88
'recording branch A tree' \
89
- 'tree_A=$(git-write-tree)'
89
+ 'tree_A=$(git write-tree)'
90
91
################################################################
92
# Branch B
@@ -96,21 +96,21 @@ rm -rf [NDMASLT][NDMASLT] Z DF
96
mkdir Z
97
test_expect_success \
98
'reading original tree and checking out' \
99
- 'git-read-tree $tree_O &&
100
- git-checkout-index -a'
99
+ 'git read-tree $tree_O &&
100
+ git checkout-index -a'
101
102
to_remove=$(echo ?D Z/?D)
103
rm -f $to_remove
104
test_expect_success \
105
'change in branch B (removal)' \
106
- "git-update-index --remove $to_remove"
106
+ "git update-index --remove $to_remove"
107
108
for p in ?M Z/?M
109
do
110
echo This is modified $p in the branch B. >$p
111
test_expect_success \
112
'change in branch B (modification)' \
113
- "git-update-index $p"
113
+ "git update-index $p"
114
done
115
116
for p in NA AA Z/NA Z/AA
@@ -118,41 +118,41 @@ do
118
echo This is added $p in the branch B. >$p
119
test_expect_success \
120
'change in branch B (addition)' \
121
- "git-update-index --add $p"
121
+ "git update-index --add $p"
122
done
123
echo This is SS from the modified tree. >SS
124
echo This is LL from the modified tree. >LL
125
test_expect_success \
126
'change in branch B (addition and modification)' \
127
- 'git-update-index --add LL &&
128
- git-update-index SS'
127
+ 'git update-index --add LL &&
128
+ git update-index SS'
129
mv TT TT-
130
sed -e '/Branch B/s/word/WORD/g' <TT- >TT
131
rm -f TT-
132
test_expect_success \
133
'change in branch B (modification)' \
134
- 'git-update-index TT'
134
+ 'git update-index TT'
135
136
echo Branch B makes a file at DF. >DF
137
test_expect_success \
138
'change in branch B (addition of a file to conflict with directory)' \
139
- 'git-update-index --add DF'
139
+ 'git update-index --add DF'
140
141
test_expect_success \
142
'recording branch B tree' \
143
- 'tree_B=$(git-write-tree)'
143
+ 'tree_B=$(git write-tree)'
144
145
test_expect_success \
146
'keep contents of 3 trees for easy access' \
147
'rm -f .git/index &&
148
- git-read-tree $tree_O &&
148
+ git read-tree $tree_O &&
149
mkdir .orig-O &&
150
- git-checkout-index --prefix=.orig-O/ -f -q -a &&
150
+ git checkout-index --prefix=.orig-O/ -f -q -a &&
151
rm -f .git/index &&
152
- git-read-tree $tree_A &&
152
+ git read-tree $tree_A &&
153
mkdir .orig-A &&
154
- git-checkout-index --prefix=.orig-A/ -f -q -a &&
154
+ git checkout-index --prefix=.orig-A/ -f -q -a &&
155
rm -f .git/index &&
156
- git-read-tree $tree_B &&
156
+ git read-tree $tree_B &&
157
mkdir .orig-B &&
158
- git-checkout-index --prefix=.orig-B/ -f -q -a'
158
+ git checkout-index --prefix=.orig-B/ -f -q -a'
t/t0000-basic.sh
+52
-52
@@ -31,12 +31,12 @@ fi
31
. ./test-lib.sh
32
33
################################################################
34
-# git-init has been done in an empty repository.
34
+# git init has been done in an empty repository.
35
# make sure it is empty.
36
37
find .git/objects -type f -print >should-be-empty
38
test_expect_success \
39
- '.git/objects should be empty after git-init in an empty repo.' \
39
+ '.git/objects should be empty after git init in an empty repo.' \
40
'cmp -s /dev/null should-be-empty'
41
42
# also it should have 2 subdirectories; no fan-out anymore, pack, and info.
@@ -51,17 +51,17 @@ test_expect_success \
51
52
# updating a new file without --add should fail.
53
test_expect_failure \
54
- 'git-update-index without --add should fail adding.' \
55
- 'git-update-index should-be-empty'
54
+ 'git update-index without --add should fail adding.' \
55
+ 'git update-index should-be-empty'
56
57
# and with --add it should succeed, even if it is empty (it used to fail).
58
test_expect_success \
59
- 'git-update-index with --add should succeed.' \
60
- 'git-update-index --add should-be-empty'
59
+ 'git update-index with --add should succeed.' \
60
+ 'git update-index --add should-be-empty'
61
62
test_expect_success \
63
- 'writing tree out with git-write-tree' \
64
- 'tree=$(git-write-tree)'
63
+ 'writing tree out with git write-tree' \
64
+ 'tree=$(git write-tree)'
65
66
# we know the shape and contents of the tree and know the object ID for it.
67
test_expect_success \
@@ -71,17 +71,17 @@ test_expect_success \
71
# Removing paths.
72
rm -f should-be-empty full-of-directories
73
test_expect_failure \
74
- 'git-update-index without --remove should fail removing.' \
75
- 'git-update-index should-be-empty'
74
+ 'git update-index without --remove should fail removing.' \
75
+ 'git update-index should-be-empty'
76
77
test_expect_success \
78
- 'git-update-index with --remove should be able to remove.' \
79
- 'git-update-index --remove should-be-empty'
78
+ 'git update-index with --remove should be able to remove.' \
79
+ 'git update-index --remove should-be-empty'
80
81
# Empty tree can be written with recent write-tree.
82
test_expect_success \
83
- 'git-write-tree should be able to write an empty tree.' \
84
- 'tree=$(git-write-tree)'
83
+ 'git write-tree should be able to write an empty tree.' \
84
+ 'tree=$(git write-tree)'
85
86
test_expect_success \
87
'validate object ID of a known tree.' \
@@ -95,13 +95,13 @@ do
95
ln -s "hello $p" ${p}sym
96
done
97
test_expect_success \
98
- 'adding various types of objects with git-update-index --add.' \
99
- 'find path* ! -type d -print | xargs git-update-index --add'
98
+ 'adding various types of objects with git update-index --add.' \
99
+ 'find path* ! -type d -print | xargs git update-index --add'
100
101
# Show them and see that matches what we expect.
102
test_expect_success \
103
- 'showing stage with git-ls-files --stage' \
104
- 'git-ls-files --stage >current'
103
+ 'showing stage with git ls-files --stage' \
104
+ 'git ls-files --stage >current'
105
106
cat >expected <<\EOF
107
100644 f87290f8eb2cbbea7857214459a0739927eab154 0 path0
@@ -114,19 +114,19 @@ cat >expected <<\EOF
114
120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0 path3/subp3/file3sym
115
EOF
116
test_expect_success \
117
- 'validate git-ls-files output for a known tree.' \
117
+ 'validate git ls-files output for a known tree.' \
118
'diff current expected'
119
120
test_expect_success \
121
- 'writing tree out with git-write-tree.' \
122
- 'tree=$(git-write-tree)'
121
+ 'writing tree out with git write-tree.' \
122
+ 'tree=$(git write-tree)'
123
test_expect_success \
124
'validate object ID for a known tree.' \
125
'test "$tree" = 087704a96baf1c2d1c869a8b084481e121c88b5b'
126
127
test_expect_success \
128
- 'showing tree with git-ls-tree' \
129
- 'git-ls-tree $tree >current'
128
+ 'showing tree with git ls-tree' \
129
+ 'git ls-tree $tree >current'
130
cat >expected <<\EOF
131
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
132
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
@@ -134,14 +134,14 @@ cat >expected <<\EOF
134
040000 tree 21ae8269cacbe57ae09138dcc3a2887f904d02b3 path3
135
EOF
136
test_expect_success \
137
- 'git-ls-tree output for a known tree.' \
137
+ 'git ls-tree output for a known tree.' \
138
'diff current expected'
139
140
# This changed in ls-tree pathspec change -- recursive does
141
# not show tree nodes anymore.
142
test_expect_success \
143
- 'showing tree with git-ls-tree -r' \
144
- 'git-ls-tree -r $tree >current'
143
+ 'showing tree with git ls-tree -r' \
144
+ 'git ls-tree -r $tree >current'
145
cat >expected <<\EOF
146
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
147
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
@@ -153,13 +153,13 @@ cat >expected <<\EOF
153
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
154
EOF
155
test_expect_success \
156
- 'git-ls-tree -r output for a known tree.' \
156
+ 'git ls-tree -r output for a known tree.' \
157
'diff current expected'
158
159
# But with -r -t we can have both.
160
test_expect_success \
161
- 'showing tree with git-ls-tree -r -t' \
162
- 'git-ls-tree -r -t $tree >current'
161
+ 'showing tree with git ls-tree -r -t' \
162
+ 'git ls-tree -r -t $tree >current'
163
cat >expected <<\EOF
164
100644 blob f87290f8eb2cbbea7857214459a0739927eab154 path0
165
120000 blob 15a98433ae33114b085f3eb3bb03b832b3180a01 path0sym
@@ -174,19 +174,19 @@ cat >expected <<\EOF
174
120000 blob 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c path3/subp3/file3sym
175
EOF
176
test_expect_success \
177
- 'git-ls-tree -r output for a known tree.' \
177
+ 'git ls-tree -r output for a known tree.' \
178
'diff current expected'
179
180
test_expect_success \
181
- 'writing partial tree out with git-write-tree --prefix.' \
182
- 'ptree=$(git-write-tree --prefix=path3)'
181
+ 'writing partial tree out with git write-tree --prefix.' \
182
+ 'ptree=$(git write-tree --prefix=path3)'
183
test_expect_success \
184
'validate object ID for a known tree.' \
185
'test "$ptree" = 21ae8269cacbe57ae09138dcc3a2887f904d02b3'
186
187
test_expect_success \
188
- 'writing partial tree out with git-write-tree --prefix.' \
189
- 'ptree=$(git-write-tree --prefix=path3/subp3)'
188
+ 'writing partial tree out with git write-tree --prefix.' \
189
+ 'ptree=$(git write-tree --prefix=path3/subp3)'
190
test_expect_success \
191
'validate object ID for a known tree.' \
192
'test "$ptree" = 3c5e5399f3a333eddecce7a9b9465b63f65f51e2'
@@ -202,24 +202,24 @@ EOF
202
rm .git/index
203
test_expect_success \
204
'put invalid objects into the index.' \
205
- 'git-update-index --index-info < badobjects'
205
+ 'git update-index --index-info < badobjects'
206
207
test_expect_failure \
208
'writing this tree without --missing-ok.' \
209
- 'git-write-tree'
209
+ 'git write-tree'
210
211
test_expect_success \
212
'writing this tree with --missing-ok.' \
213
- 'git-write-tree --missing-ok'
213
+ 'git write-tree --missing-ok'
214
215
216
################################################################
217
rm .git/index
218
test_expect_success \
219
- 'git-read-tree followed by write-tree should be idempotent.' \
220
- 'git-read-tree $tree &&
219
+ 'git read-tree followed by write-tree should be idempotent.' \
220
+ 'git read-tree $tree &&
221
test -f .git/index &&
222
- newtree=$(git-write-tree) &&
222
+ newtree=$(git write-tree) &&
223
test "$newtree" = "$tree"'
224
225
cat >expected <<\EOF
@@ -233,36 +233,36 @@ cat >expected <<\EOF
233
:120000 120000 6649a1ebe9e9f1c553b66f5a6e74136a07ccc57c 0000000000000000000000000000000000000000 M path3/subp3/file3sym
234
EOF
235
test_expect_success \
236
- 'validate git-diff-files output for a know cache/work tree state.' \
237
- 'git-diff-files >current && diff >/dev/null -b current expected'
236
+ 'validate git diff-files output for a know cache/work tree state.' \
237
+ 'git diff-files >current && diff >/dev/null -b current expected'
238
239
test_expect_success \
240
- 'git-update-index --refresh should succeed.' \
241
- 'git-update-index --refresh'
240
+ 'git update-index --refresh should succeed.' \
241
+ 'git update-index --refresh'
242
243
test_expect_success \
244
- 'no diff after checkout and git-update-index --refresh.' \
245
- 'git-diff-files >current && cmp -s current /dev/null'
244
+ 'no diff after checkout and git update-index --refresh.' \
245
+ 'git diff-files >current && cmp -s current /dev/null'
246
247
################################################################
248
P=087704a96baf1c2d1c869a8b084481e121c88b5b
249
test_expect_success \
250
- 'git-commit-tree records the correct tree in a commit.' \
251
- 'commit0=$(echo NO | git-commit-tree $P) &&
250
+ 'git commit-tree records the correct tree in a commit.' \
251
+ 'commit0=$(echo NO | git commit-tree $P) &&
252
tree=$(git show --pretty=raw $commit0 |
253
sed -n -e "s/^tree //p" -e "/^author /q") &&
254
test "z$tree" = "z$P"'
255
256
test_expect_success \
257
- 'git-commit-tree records the correct parent in a commit.' \
258
- 'commit1=$(echo NO | git-commit-tree $P -p $commit0) &&
257
+ 'git commit-tree records the correct parent in a commit.' \
258
+ 'commit1=$(echo NO | git commit-tree $P -p $commit0) &&
259
parent=$(git show --pretty=raw $commit1 |
260
sed -n -e "s/^parent //p" -e "/^author /q") &&
261
test "z$commit0" = "z$parent"'
262
263
test_expect_success \
264
- 'git-commit-tree omits duplicated parent in a commit.' \
265
- 'commit2=$(echo NO | git-commit-tree $P -p $commit0 -p $commit0) &&
264
+ 'git commit-tree omits duplicated parent in a commit.' \
265
+ 'commit2=$(echo NO | git commit-tree $P -p $commit0 -p $commit0) &&
266
parent=$(git show --pretty=raw $commit2 |
267
sed -n -e "s/^parent //p" -e "/^author /q" |
268
sort -u) &&
t/t0030-stripspace.sh
+94
-94
@@ -3,7 +3,7 @@
3
# Copyright (c) 2007 Carlos Rica
4
#
5
6
-test_description='git-stripspace'
6
+test_description='git stripspace'
7
8
. ./test-lib.sh
9
@@ -15,292 +15,292 @@ ttt="$t40$t40$t40$t40$t40$t40$t40$t40$t40$t40" # 400
15
test_expect_success \
16
'long lines without spaces should be unchanged' '
17
echo "$ttt" >expect &&
18
- git-stripspace <expect >actual &&
18
+ git stripspace <expect >actual &&
19
git diff expect actual &&
20
21
echo "$ttt$ttt" >expect &&
22
- git-stripspace <expect >actual &&
22
+ git stripspace <expect >actual &&
23
git diff expect actual &&
24
25
echo "$ttt$ttt$ttt" >expect &&
26
- git-stripspace <expect >actual &&
26
+ git stripspace <expect >actual &&
27
git diff expect actual &&
28
29
echo "$ttt$ttt$ttt$ttt" >expect &&
30
- git-stripspace <expect >actual &&
30
+ git stripspace <expect >actual &&
31
git diff expect actual
32
'
33
34
test_expect_success \
35
'lines with spaces at the beginning should be unchanged' '
36
echo "$sss$ttt" >expect &&
37
- git-stripspace <expect >actual &&
37
+ git stripspace <expect >actual &&
38
git diff expect actual &&
39
40
echo "$sss$sss$ttt" >expect &&
41
- git-stripspace <expect >actual &&
41
+ git stripspace <expect >actual &&
42
git diff expect actual &&
43
44
echo "$sss$sss$sss$ttt" >expect &&
45
- git-stripspace <expect >actual &&
45
+ git stripspace <expect >actual &&
46
git diff expect actual
47
'
48
49
test_expect_success \
50
'lines with intermediate spaces should be unchanged' '
51
echo "$ttt$sss$ttt" >expect &&
52
- git-stripspace <expect >actual &&
52
+ git stripspace <expect >actual &&
53
git diff expect actual &&
54
55
echo "$ttt$sss$sss$ttt" >expect &&
56
- git-stripspace <expect >actual &&
56
+ git stripspace <expect >actual &&
57
git diff expect actual
58
'
59
60
test_expect_success \
61
'consecutive blank lines should be unified' '
62
printf "$ttt\n\n$ttt\n" > expect &&
63
- printf "$ttt\n\n\n\n\n$ttt\n" | git-stripspace >actual &&
63
+ printf "$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
64
git diff expect actual &&
65
66
printf "$ttt$ttt\n\n$ttt\n" > expect &&
67
- printf "$ttt$ttt\n\n\n\n\n$ttt\n" | git-stripspace >actual &&
67
+ printf "$ttt$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
68
git diff expect actual &&
69
70
printf "$ttt$ttt$ttt\n\n$ttt\n" > expect &&
71
- printf "$ttt$ttt$ttt\n\n\n\n\n$ttt\n" | git-stripspace >actual &&
71
+ printf "$ttt$ttt$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
72
git diff expect actual &&
73
74
printf "$ttt\n\n$ttt\n" > expect &&
75
- printf "$ttt\n\n\n\n\n$ttt\n" | git-stripspace >actual &&
75
+ printf "$ttt\n\n\n\n\n$ttt\n" | git stripspace >actual &&
76
git diff expect actual &&
77
78
printf "$ttt\n\n$ttt$ttt\n" > expect &&
79
- printf "$ttt\n\n\n\n\n$ttt$ttt\n" | git-stripspace >actual &&
79
+ printf "$ttt\n\n\n\n\n$ttt$ttt\n" | git stripspace >actual &&
80
git diff expect actual &&
81
82
printf "$ttt\n\n$ttt$ttt$ttt\n" > expect &&
83
- printf "$ttt\n\n\n\n\n$ttt$ttt$ttt\n" | git-stripspace >actual &&
83
+ printf "$ttt\n\n\n\n\n$ttt$ttt$ttt\n" | git stripspace >actual &&
84
git diff expect actual
85
'
86
87
test_expect_success \
88
'consecutive blank lines at the beginning should be removed' '
89
printf "" > expect &&
90
- printf "\n" | git-stripspace >actual &&
90
+ printf "\n" | git stripspace >actual &&
91
git diff expect actual &&
92
93
printf "" > expect &&
94
- printf "\n\n\n" | git-stripspace >actual &&
94
+ printf "\n\n\n" | git stripspace >actual &&
95
git diff expect actual &&
96
97
printf "" > expect &&
98
- printf "$sss\n$sss\n$sss\n" | git-stripspace >actual &&
98
+ printf "$sss\n$sss\n$sss\n" | git stripspace >actual &&
99
git diff expect actual &&
100
101
printf "" > expect &&
102
- printf "$sss$sss\n$sss\n\n" | git-stripspace >actual &&
102
+ printf "$sss$sss\n$sss\n\n" | git stripspace >actual &&
103
git diff expect actual &&
104
105
printf "" > expect &&
106
- printf "\n$sss\n$sss$sss\n" | git-stripspace >actual &&
106
+ printf "\n$sss\n$sss$sss\n" | git stripspace >actual &&
107
git diff expect actual &&
108
109
printf "" > expect &&
110
- printf "$sss$sss$sss$sss\n\n\n" | git-stripspace >actual &&
110
+ printf "$sss$sss$sss$sss\n\n\n" | git stripspace >actual &&
111
git diff expect actual &&
112
113
printf "" > expect &&
114
- printf "\n$sss$sss$sss$sss\n\n" | git-stripspace >actual &&
114
+ printf "\n$sss$sss$sss$sss\n\n" | git stripspace >actual &&
115
git diff expect actual &&
116
117
printf "" > expect &&
118
- printf "\n\n$sss$sss$sss$sss\n" | git-stripspace >actual &&
118
+ printf "\n\n$sss$sss$sss$sss\n" | git stripspace >actual &&
119
git diff expect actual &&
120
121
printf "$ttt\n" > expect &&
122
- printf "\n$ttt\n" | git-stripspace >actual &&
122
+ printf "\n$ttt\n" | git stripspace >actual &&
123
git diff expect actual &&
124
125
printf "$ttt\n" > expect &&
126
- printf "\n\n\n$ttt\n" | git-stripspace >actual &&
126
+ printf "\n\n\n$ttt\n" | git stripspace >actual &&
127
git diff expect actual &&
128
129
printf "$ttt$ttt\n" > expect &&
130
- printf "\n\n\n$ttt$ttt\n" | git-stripspace >actual &&
130
+ printf "\n\n\n$ttt$ttt\n" | git stripspace >actual &&
131
git diff expect actual &&
132
133
printf "$ttt$ttt$ttt\n" > expect &&
134
- printf "\n\n\n$ttt$ttt$ttt\n" | git-stripspace >actual &&
134
+ printf "\n\n\n$ttt$ttt$ttt\n" | git stripspace >actual &&
135
git diff expect actual &&
136
137
printf "$ttt$ttt$ttt$ttt\n" > expect &&
138
- printf "\n\n\n$ttt$ttt$ttt$ttt\n" | git-stripspace >actual &&
138
+ printf "\n\n\n$ttt$ttt$ttt$ttt\n" | git stripspace >actual &&
139
git diff expect actual &&
140
141
printf "$ttt\n" > expect &&
142
- printf "$sss\n$sss\n$sss\n$ttt\n" | git-stripspace >actual &&
142
+ printf "$sss\n$sss\n$sss\n$ttt\n" | git stripspace >actual &&
143
git diff expect actual &&
144
145
printf "$ttt\n" > expect &&
146
- printf "\n$sss\n$sss$sss\n$ttt\n" | git-stripspace >actual &&
146
+ printf "\n$sss\n$sss$sss\n$ttt\n" | git stripspace >actual &&
147
git diff expect actual &&
148
149
printf "$ttt\n" > expect &&
150
- printf "$sss$sss\n$sss\n\n$ttt\n" | git-stripspace >actual &&
150
+ printf "$sss$sss\n$sss\n\n$ttt\n" | git stripspace >actual &&
151
git diff expect actual &&
152
153
printf "$ttt\n" > expect &&
154
- printf "$sss$sss$sss\n\n\n$ttt\n" | git-stripspace >actual &&
154
+ printf "$sss$sss$sss\n\n\n$ttt\n" | git stripspace >actual &&
155
git diff expect actual &&
156
157
printf "$ttt\n" > expect &&
158
- printf "\n$sss$sss$sss\n\n$ttt\n" | git-stripspace >actual &&
158
+ printf "\n$sss$sss$sss\n\n$ttt\n" | git stripspace >actual &&
159
git diff expect actual &&
160
161
printf "$ttt\n" > expect &&
162
- printf "\n\n$sss$sss$sss\n$ttt\n" | git-stripspace >actual &&
162
+ printf "\n\n$sss$sss$sss\n$ttt\n" | git stripspace >actual &&
163
git diff expect actual
164
'
165
166
test_expect_success \
167
'consecutive blank lines at the end should be removed' '
168
printf "$ttt\n" > expect &&
169
- printf "$ttt\n\n" | git-stripspace >actual &&
169
+ printf "$ttt\n\n" | git stripspace >actual &&
170
git diff expect actual &&
171
172
printf "$ttt\n" > expect &&
173
- printf "$ttt\n\n\n\n" | git-stripspace >actual &&
173
+ printf "$ttt\n\n\n\n" | git stripspace >actual &&
174
git diff expect actual &&
175
176
printf "$ttt$ttt\n" > expect &&
177
- printf "$ttt$ttt\n\n\n\n" | git-stripspace >actual &&
177
+ printf "$ttt$ttt\n\n\n\n" | git stripspace >actual &&
178
git diff expect actual &&
179
180
printf "$ttt$ttt$ttt\n" > expect &&
181
- printf "$ttt$ttt$ttt\n\n\n\n" | git-stripspace >actual &&
181
+ printf "$ttt$ttt$ttt\n\n\n\n" | git stripspace >actual &&
182
git diff expect actual &&
183
184
printf "$ttt$ttt$ttt$ttt\n" > expect &&
185
- printf "$ttt$ttt$ttt$ttt\n\n\n\n" | git-stripspace >actual &&
185
+ printf "$ttt$ttt$ttt$ttt\n\n\n\n" | git stripspace >actual &&
186
git diff expect actual &&
187
188
printf "$ttt\n" > expect &&
189
- printf "$ttt\n$sss\n$sss\n$sss\n" | git-stripspace >actual &&
189
+ printf "$ttt\n$sss\n$sss\n$sss\n" | git stripspace >actual &&
190
git diff expect actual &&
191
192
printf "$ttt\n" > expect &&
193
- printf "$ttt\n\n$sss\n$sss$sss\n" | git-stripspace >actual &&
193
+ printf "$ttt\n\n$sss\n$sss$sss\n" | git stripspace >actual &&
194
git diff expect actual &&
195
196
printf "$ttt\n" > expect &&
197
- printf "$ttt\n$sss$sss\n$sss\n\n" | git-stripspace >actual &&
197
+ printf "$ttt\n$sss$sss\n$sss\n\n" | git stripspace >actual &&
198
git diff expect actual &&
199
200
printf "$ttt\n" > expect &&
201
- printf "$ttt\n$sss$sss$sss\n\n\n" | git-stripspace >actual &&
201
+ printf "$ttt\n$sss$sss$sss\n\n\n" | git stripspace >actual &&
202
git diff expect actual &&
203
204
printf "$ttt\n" > expect &&
205
- printf "$ttt\n\n$sss$sss$sss\n\n" | git-stripspace >actual &&
205
+ printf "$ttt\n\n$sss$sss$sss\n\n" | git stripspace >actual &&
206
git diff expect actual &&
207
208
printf "$ttt\n" > expect &&
209
- printf "$ttt\n\n\n$sss$sss$sss\n" | git-stripspace >actual &&
209
+ printf "$ttt\n\n\n$sss$sss$sss\n" | git stripspace >actual &&
210
git diff expect actual
211
'
212
213
test_expect_success \
214
'text without newline at end should end with newline' '
215
- test `printf "$ttt" | git-stripspace | wc -l` -gt 0 &&
216
- test `printf "$ttt$ttt" | git-stripspace | wc -l` -gt 0 &&
217
- test `printf "$ttt$ttt$ttt" | git-stripspace | wc -l` -gt 0 &&
218
- test `printf "$ttt$ttt$ttt$ttt" | git-stripspace | wc -l` -gt 0
215
+ test `printf "$ttt" | git stripspace | wc -l` -gt 0 &&
216
+ test `printf "$ttt$ttt" | git stripspace | wc -l` -gt 0 &&
217
+ test `printf "$ttt$ttt$ttt" | git stripspace | wc -l` -gt 0 &&
218
+ test `printf "$ttt$ttt$ttt$ttt" | git stripspace | wc -l` -gt 0
219
'
220
221
# text plus spaces at the end:
222
223
test_expect_success \
224
'text plus spaces without newline at end should end with newline' '
225
- test `printf "$ttt$sss" | git-stripspace | wc -l` -gt 0 &&
226
- test `printf "$ttt$ttt$sss" | git-stripspace | wc -l` -gt 0 &&
227
- test `printf "$ttt$ttt$ttt$sss" | git-stripspace | wc -l` -gt 0
228
- test `printf "$ttt$sss$sss" | git-stripspace | wc -l` -gt 0 &&
229
- test `printf "$ttt$ttt$sss$sss" | git-stripspace | wc -l` -gt 0 &&
230
- test `printf "$ttt$sss$sss$sss" | git-stripspace | wc -l` -gt 0
225
+ test `printf "$ttt$sss" | git stripspace | wc -l` -gt 0 &&
226
+ test `printf "$ttt$ttt$sss" | git stripspace | wc -l` -gt 0 &&
227
+ test `printf "$ttt$ttt$ttt$sss" | git stripspace | wc -l` -gt 0
228
+ test `printf "$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
229
+ test `printf "$ttt$ttt$sss$sss" | git stripspace | wc -l` -gt 0 &&
230
+ test `printf "$ttt$sss$sss$sss" | git stripspace | wc -l` -gt 0
231
'
232
233
test_expect_failure \
234
'text plus spaces without newline at end should not show spaces' '
235
- printf "$ttt$sss" | git-stripspace | grep -q " " ||
236
- printf "$ttt$ttt$sss" | git-stripspace | grep -q " " ||
237
- printf "$ttt$ttt$ttt$sss" | git-stripspace | grep -q " " ||
238
- printf "$ttt$sss$sss" | git-stripspace | grep -q " " ||
239
- printf "$ttt$ttt$sss$sss" | git-stripspace | grep -q " " ||
240
- printf "$ttt$sss$sss$sss" | git-stripspace | grep -q " "
235
+ printf "$ttt$sss" | git stripspace | grep -q " " ||
236
+ printf "$ttt$ttt$sss" | git stripspace | grep -q " " ||
237
+ printf "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
238
+ printf "$ttt$sss$sss" | git stripspace | grep -q " " ||
239
+ printf "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
240
+ printf "$ttt$sss$sss$sss" | git stripspace | grep -q " "
241
'
242
243
test_expect_success \
244
'text plus spaces without newline should show the correct lines' '
245
printf "$ttt\n" >expect &&
246
- printf "$ttt$sss" | git-stripspace >actual &&
246
+ printf "$ttt$sss" | git stripspace >actual &&
247
git diff expect actual &&
248
249
printf "$ttt\n" >expect &&
250
- printf "$ttt$sss$sss" | git-stripspace >actual &&
250
+ printf "$ttt$sss$sss" | git stripspace >actual &&
251
git diff expect actual &&
252
253
printf "$ttt\n" >expect &&
254
- printf "$ttt$sss$sss$sss" | git-stripspace >actual &&
254
+ printf "$ttt$sss$sss$sss" | git stripspace >actual &&
255
git diff expect actual &&
256
257
printf "$ttt$ttt\n" >expect &&
258
- printf "$ttt$ttt$sss" | git-stripspace >actual &&
258
+ printf "$ttt$ttt$sss" | git stripspace >actual &&
259
git diff expect actual &&
260
261
printf "$ttt$ttt\n" >expect &&
262
- printf "$ttt$ttt$sss$sss" | git-stripspace >actual &&
262
+ printf "$ttt$ttt$sss$sss" | git stripspace >actual &&
263
git diff expect actual &&
264
265
printf "$ttt$ttt$ttt\n" >expect &&
266
- printf "$ttt$ttt$ttt$sss" | git-stripspace >actual &&
266
+ printf "$ttt$ttt$ttt$sss" | git stripspace >actual &&
267
git diff expect actual
268
'
269
270
test_expect_failure \
271
'text plus spaces at end should not show spaces' '
272
- echo "$ttt$sss" | git-stripspace | grep -q " " ||
273
- echo "$ttt$ttt$sss" | git-stripspace | grep -q " " ||
274
- echo "$ttt$ttt$ttt$sss" | git-stripspace | grep -q " " ||
275
- echo "$ttt$sss$sss" | git-stripspace | grep -q " " ||
276
- echo "$ttt$ttt$sss$sss" | git-stripspace | grep -q " " ||
277
- echo "$ttt$sss$sss$sss" | git-stripspace | grep -q " "
272
+ echo "$ttt$sss" | git stripspace | grep -q " " ||
273
+ echo "$ttt$ttt$sss" | git stripspace | grep -q " " ||
274
+ echo "$ttt$ttt$ttt$sss" | git stripspace | grep -q " " ||
275
+ echo "$ttt$sss$sss" | git stripspace | grep -q " " ||
276
+ echo "$ttt$ttt$sss$sss" | git stripspace | grep -q " " ||
277
+ echo "$ttt$sss$sss$sss" | git stripspace | grep -q " "
278
'
279
280
test_expect_success \
281
'text plus spaces at end should be cleaned and newline must remain' '
282
echo "$ttt" >expect &&
283
- echo "$ttt$sss" | git-stripspace >actual &&
283
+ echo "$ttt$sss" | git stripspace >actual &&
284
git diff expect actual &&
285
286
echo "$ttt" >expect &&
287
- echo "$ttt$sss$sss" | git-stripspace >actual &&
287
+ echo "$ttt$sss$sss" | git stripspace >actual &&
288
git diff expect actual &&
289
290
echo "$ttt" >expect &&
291
- echo "$ttt$sss$sss$sss" | git-stripspace >actual &&
291
+ echo "$ttt$sss$sss$sss" | git stripspace >actual &&
292
git diff expect actual &&
293
294
echo "$ttt$ttt" >expect &&
295
- echo "$ttt$ttt$sss" | git-stripspace >actual &&
295
+ echo "$ttt$ttt$sss" | git stripspace >actual &&
296
git diff expect actual &&
297
298
echo "$ttt$ttt" >expect &&
299
- echo "$ttt$ttt$sss$sss" | git-stripspace >actual &&
299
+ echo "$ttt$ttt$sss$sss" | git stripspace >actual &&
300
git diff expect actual &&
301
302
echo "$ttt$ttt$ttt" >expect &&
303
- echo "$ttt$ttt$ttt$sss" | git-stripspace >actual &&
303
+ echo "$ttt$ttt$ttt$sss" | git stripspace >actual &&
304
git diff expect actual
305
'
306
@@ -310,45 +310,45 @@ test_expect_success \
310
'spaces with newline at end should be replaced with empty string' '
311
printf "" >expect &&
312
313
- echo | git-stripspace >actual &&
313
+ echo | git stripspace >actual &&
314
git diff expect actual &&
315
316
- echo "$sss" | git-stripspace >actual &&
316
+ echo "$sss" | git stripspace >actual &&
317
git diff expect actual &&
318
319
- echo "$sss$sss" | git-stripspace >actual &&
319
+ echo "$sss$sss" | git stripspace >actual &&
320
git diff expect actual &&
321
322
- echo "$sss$sss$sss" | git-stripspace >actual &&
322
+ echo "$sss$sss$sss" | git stripspace >actual &&
323
git diff expect actual &&
324
325
- echo "$sss$sss$sss$sss" | git-stripspace >actual &&
325
+ echo "$sss$sss$sss$sss" | git stripspace >actual &&
326
git diff expect actual
327
'
328
329
test_expect_failure \
330
'spaces without newline at end should not show spaces' '
331
- printf "" | git-stripspace | grep -q " " ||
332
- printf "$sss" | git-stripspace | grep -q " " ||
333
- printf "$sss$sss" | git-stripspace | grep -q " " ||
334
- printf "$sss$sss$sss" | git-stripspace | grep -q " " ||
335
- printf "$sss$sss$sss$sss" | git-stripspace | grep -q " "
331
+ printf "" | git stripspace | grep -q " " ||
332
+ printf "$sss" | git stripspace | grep -q " " ||
333
+ printf "$sss$sss" | git stripspace | grep -q " " ||
334
+ printf "$sss$sss$sss" | git stripspace | grep -q " " ||
335
+ printf "$sss$sss$sss$sss" | git stripspace | grep -q " "
336
'
337
338
test_expect_success \
339
'spaces without newline at end should be replaced with empty string' '
340
printf "" >expect &&
341
342
- printf "" | git-stripspace >actual &&
342
+ printf "" | git stripspace >actual &&
343
git diff expect actual
344
345
- printf "$sss$sss" | git-stripspace >actual &&
345
+ printf "$sss$sss" | git stripspace >actual &&
346
git diff expect actual
347
348
- printf "$sss$sss$sss" | git-stripspace >actual &&
348
+ printf "$sss$sss$sss" | git stripspace >actual &&
349
git diff expect actual
350
351
- printf "$sss$sss$sss$sss" | git-stripspace >actual &&
351
+ printf "$sss$sss$sss$sss" | git stripspace >actual &&
352
git diff expect actual
353
'
354
t/t1000-read-tree-m-3way.sh
+86
-86
@@ -130,28 +130,28 @@ _x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
130
_x40="$_x40$_x40$_x40$_x40$_x40$_x40$_x40$_x40"
131
132
check_result () {
133
- git-ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
133
+ git ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
134
git diff expected current
135
}
136
137
# This is done on an empty work directory, which is the normal
138
# merge person behaviour.
139
test_expect_success \
140
- '3-way merge with git-read-tree -m, empty cache' \
140
+ '3-way merge with git read-tree -m, empty cache' \
141
"rm -fr [NDMALTS][NDMALTSF] Z &&
142
rm .git/index &&
143
- git-read-tree -m $tree_O $tree_A $tree_B &&
143
+ git read-tree -m $tree_O $tree_A $tree_B &&
144
check_result"
145
146
# This starts out with the first head, which is the normal
147
# patch submitter behaviour.
148
test_expect_success \
149
- '3-way merge with git-read-tree -m, match H' \
149
+ '3-way merge with git read-tree -m, match H' \
150
"rm -fr [NDMALTS][NDMALTSF] Z &&
151
rm .git/index &&
152
- git-read-tree $tree_A &&
153
- git-checkout-index -f -u -a &&
154
- git-read-tree -m $tree_O $tree_A $tree_B &&
152
+ git read-tree $tree_A &&
153
+ git checkout-index -f -u -a &&
154
+ git read-tree -m $tree_O $tree_A $tree_B &&
155
check_result"
156
157
: <<\END_OF_CASE_TABLE
@@ -160,7 +160,7 @@ We have so far tested only empty index and clean-and-matching-A index
160
case which are trivial. Make sure index requirements are also
161
checked.
162
163
-"git-read-tree -m O A B"
163
+"git read-tree -m O A B"
164
165
O A B result index requirements
166
-------------------------------------------------------------------
@@ -214,87 +214,87 @@ test_expect_failure \
214
'1 - must not have an entry not in A.' \
215
"rm -f .git/index XX &&
216
echo XX >XX &&
217
- git-update-index --add XX &&
218
- git-read-tree -m $tree_O $tree_A $tree_B"
217
+ git update-index --add XX &&
218
+ git read-tree -m $tree_O $tree_A $tree_B"
219
220
test_expect_success \
221
'2 - must match B in !O && !A && B case.' \
222
"rm -f .git/index NA &&
223
cp .orig-B/NA NA &&
224
- git-update-index --add NA &&
225
- git-read-tree -m $tree_O $tree_A $tree_B"
224
+ git update-index --add NA &&
225
+ git read-tree -m $tree_O $tree_A $tree_B"
226
227
test_expect_success \
228
'2 - matching B alone is OK in !O && !A && B case.' \
229
"rm -f .git/index NA &&
230
cp .orig-B/NA NA &&
231
- git-update-index --add NA &&
231
+ git update-index --add NA &&
232
echo extra >>NA &&
233
- git-read-tree -m $tree_O $tree_A $tree_B"
233
+ git read-tree -m $tree_O $tree_A $tree_B"
234
235
test_expect_success \
236
'3 - must match A in !O && A && !B case.' \
237
"rm -f .git/index AN &&
238
cp .orig-A/AN AN &&
239
- git-update-index --add AN &&
240
- git-read-tree -m $tree_O $tree_A $tree_B &&
239
+ git update-index --add AN &&
240
+ git read-tree -m $tree_O $tree_A $tree_B &&
241
check_result"
242
243
test_expect_success \
244
'3 - matching A alone is OK in !O && A && !B case.' \
245
"rm -f .git/index AN &&
246
cp .orig-A/AN AN &&
247
- git-update-index --add AN &&
247
+ git update-index --add AN &&
248
echo extra >>AN &&
249
- git-read-tree -m $tree_O $tree_A $tree_B"
249
+ git read-tree -m $tree_O $tree_A $tree_B"
250
251
test_expect_failure \
252
'3 (fail) - must match A in !O && A && !B case.' \
253
"rm -f .git/index AN &&
254
cp .orig-A/AN AN &&
255
echo extra >>AN &&
256
- git-update-index --add AN &&
257
- git-read-tree -m $tree_O $tree_A $tree_B"
256
+ git update-index --add AN &&
257
+ git read-tree -m $tree_O $tree_A $tree_B"
258
259
test_expect_success \
260
'4 - must match and be up-to-date in !O && A && B && A!=B case.' \
261
"rm -f .git/index AA &&
262
cp .orig-A/AA AA &&
263
- git-update-index --add AA &&
264
- git-read-tree -m $tree_O $tree_A $tree_B &&
263
+ git update-index --add AA &&
264
+ git read-tree -m $tree_O $tree_A $tree_B &&
265
check_result"
266
267
test_expect_failure \
268
'4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
269
"rm -f .git/index AA &&
270
cp .orig-A/AA AA &&
271
- git-update-index --add AA &&
271
+ git update-index --add AA &&
272
echo extra >>AA &&
273
- git-read-tree -m $tree_O $tree_A $tree_B"
273
+ git read-tree -m $tree_O $tree_A $tree_B"
274
275
test_expect_failure \
276
'4 (fail) - must match and be up-to-date in !O && A && B && A!=B case.' \
277
"rm -f .git/index AA &&
278
cp .orig-A/AA AA &&
279
echo extra >>AA &&
280
- git-update-index --add AA &&
281
- git-read-tree -m $tree_O $tree_A $tree_B"
280
+ git update-index --add AA &&
281
+ git read-tree -m $tree_O $tree_A $tree_B"
282
283
test_expect_success \
284
'5 - must match in !O && A && B && A==B case.' \
285
"rm -f .git/index LL &&
286
cp .orig-A/LL LL &&
287
- git-update-index --add LL &&
288
- git-read-tree -m $tree_O $tree_A $tree_B &&
287
+ git update-index --add LL &&
288
+ git read-tree -m $tree_O $tree_A $tree_B &&
289
check_result"
290
291
test_expect_success \
292
'5 - must match in !O && A && B && A==B case.' \
293
"rm -f .git/index LL &&
294
cp .orig-A/LL LL &&
295
- git-update-index --add LL &&
295
+ git update-index --add LL &&
296
echo extra >>LL &&
297
- git-read-tree -m $tree_O $tree_A $tree_B &&
297
+ git read-tree -m $tree_O $tree_A $tree_B &&
298
check_result"
299
300
test_expect_failure \
@@ -302,117 +302,117 @@ test_expect_failure \
302
"rm -f .git/index LL &&
303
cp .orig-A/LL LL &&
304
echo extra >>LL &&
305
- git-update-index --add LL &&
306
- git-read-tree -m $tree_O $tree_A $tree_B"
305
+ git update-index --add LL &&
306
+ git read-tree -m $tree_O $tree_A $tree_B"
307
308
test_expect_failure \
309
'6 - must not exist in O && !A && !B case' \
310
"rm -f .git/index DD &&
311
echo DD >DD
312
- git-update-index --add DD &&
313
- git-read-tree -m $tree_O $tree_A $tree_B"
312
+ git update-index --add DD &&
313
+ git read-tree -m $tree_O $tree_A $tree_B"
314
315
test_expect_failure \
316
'7 - must not exist in O && !A && B && O!=B case' \
317
"rm -f .git/index DM &&
318
cp .orig-B/DM DM &&
319
- git-update-index --add DM &&
320
- git-read-tree -m $tree_O $tree_A $tree_B"
319
+ git update-index --add DM &&
320
+ git read-tree -m $tree_O $tree_A $tree_B"
321
322
test_expect_failure \
323
'8 - must not exist in O && !A && B && O==B case' \
324
"rm -f .git/index DN &&
325
cp .orig-B/DN DN &&
326
- git-update-index --add DN &&
327
- git-read-tree -m $tree_O $tree_A $tree_B"
326
+ git update-index --add DN &&
327
+ git read-tree -m $tree_O $tree_A $tree_B"
328
329
test_expect_success \
330
'9 - must match and be up-to-date in O && A && !B && O!=A case' \
331
"rm -f .git/index MD &&
332
cp .orig-A/MD MD &&
333
- git-update-index --add MD &&
334
- git-read-tree -m $tree_O $tree_A $tree_B &&
333
+ git update-index --add MD &&
334
+ git read-tree -m $tree_O $tree_A $tree_B &&
335
check_result"
336
337
test_expect_failure \
338
'9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
339
"rm -f .git/index MD &&
340
cp .orig-A/MD MD &&
341
- git-update-index --add MD &&
341
+ git update-index --add MD &&
342
echo extra >>MD &&
343
- git-read-tree -m $tree_O $tree_A $tree_B"
343
+ git read-tree -m $tree_O $tree_A $tree_B"
344
345
test_expect_failure \
346
'9 (fail) - must match and be up-to-date in O && A && !B && O!=A case' \
347
"rm -f .git/index MD &&
348
cp .orig-A/MD MD &&
349
echo extra >>MD &&
350
- git-update-index --add MD &&
351
- git-read-tree -m $tree_O $tree_A $tree_B"
350
+ git update-index --add MD &&
351
+ git read-tree -m $tree_O $tree_A $tree_B"
352
353
test_expect_success \
354
'10 - must match and be up-to-date in O && A && !B && O==A case' \
355
"rm -f .git/index ND &&
356
cp .orig-A/ND ND &&
357
- git-update-index --add ND &&
358
- git-read-tree -m $tree_O $tree_A $tree_B &&
357
+ git update-index --add ND &&
358
+ git read-tree -m $tree_O $tree_A $tree_B &&
359
check_result"
360
361
test_expect_failure \
362
'10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
363
"rm -f .git/index ND &&
364
cp .orig-A/ND ND &&
365
- git-update-index --add ND &&
365
+ git update-index --add ND &&
366
echo extra >>ND &&
367
- git-read-tree -m $tree_O $tree_A $tree_B"
367
+ git read-tree -m $tree_O $tree_A $tree_B"
368
369
test_expect_failure \
370
'10 (fail) - must match and be up-to-date in O && A && !B && O==A case' \
371
"rm -f .git/index ND &&
372
cp .orig-A/ND ND &&
373
echo extra >>ND &&
374
- git-update-index --add ND &&
375
- git-read-tree -m $tree_O $tree_A $tree_B"
374
+ git update-index --add ND &&
375
+ git read-tree -m $tree_O $tree_A $tree_B"
376
377
test_expect_success \
378
'11 - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
379
"rm -f .git/index MM &&
380
cp .orig-A/MM MM &&
381
- git-update-index --add MM &&
382
- git-read-tree -m $tree_O $tree_A $tree_B &&
381
+ git update-index --add MM &&
382
+ git read-tree -m $tree_O $tree_A $tree_B &&
383
check_result"
384
385
test_expect_failure \
386
'11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
387
"rm -f .git/index MM &&
388
cp .orig-A/MM MM &&
389
- git-update-index --add MM &&
389
+ git update-index --add MM &&
390
echo extra >>MM &&
391
- git-read-tree -m $tree_O $tree_A $tree_B"
391
+ git read-tree -m $tree_O $tree_A $tree_B"
392
393
test_expect_failure \
394
'11 (fail) - must match and be up-to-date in O && A && B && O!=A && O!=B && A!=B case' \
395
"rm -f .git/index MM &&
396
cp .orig-A/MM MM &&
397
echo extra >>MM &&
398
- git-update-index --add MM &&
399
- git-read-tree -m $tree_O $tree_A $tree_B"
398
+ git update-index --add MM &&
399
+ git read-tree -m $tree_O $tree_A $tree_B"
400
401
test_expect_success \
402
'12 - must match A in O && A && B && O!=A && A==B case' \
403
"rm -f .git/index SS &&
404
cp .orig-A/SS SS &&
405
- git-update-index --add SS &&
406
- git-read-tree -m $tree_O $tree_A $tree_B &&
405
+ git update-index --add SS &&
406
+ git read-tree -m $tree_O $tree_A $tree_B &&
407
check_result"
408
409
test_expect_success \
410
'12 - must match A in O && A && B && O!=A && A==B case' \
411
"rm -f .git/index SS &&
412
cp .orig-A/SS SS &&
413
- git-update-index --add SS &&
413
+ git update-index --add SS &&
414
echo extra >>SS &&
415
- git-read-tree -m $tree_O $tree_A $tree_B &&
415
+ git read-tree -m $tree_O $tree_A $tree_B &&
416
check_result"
417
418
test_expect_failure \
@@ -420,74 +420,74 @@ test_expect_failure \
420
"rm -f .git/index SS &&
421
cp .orig-A/SS SS &&
422
echo extra >>SS &&
423
- git-update-index --add SS &&
424
- git-read-tree -m $tree_O $tree_A $tree_B"
423
+ git update-index --add SS &&
424
+ git read-tree -m $tree_O $tree_A $tree_B"
425
426
test_expect_success \
427
'13 - must match A in O && A && B && O!=A && O==B case' \
428
"rm -f .git/index MN &&
429
cp .orig-A/MN MN &&
430
- git-update-index --add MN &&
431
- git-read-tree -m $tree_O $tree_A $tree_B &&
430
+ git update-index --add MN &&
431
+ git read-tree -m $tree_O $tree_A $tree_B &&
432
check_result"
433
434
test_expect_success \
435
'13 - must match A in O && A && B && O!=A && O==B case' \
436
"rm -f .git/index MN &&
437
cp .orig-A/MN MN &&
438
- git-update-index --add MN &&
438
+ git update-index --add MN &&
439
echo extra >>MN &&
440
- git-read-tree -m $tree_O $tree_A $tree_B &&
440
+ git read-tree -m $tree_O $tree_A $tree_B &&
441
check_result"
442
443
test_expect_success \
444
'14 - must match and be up-to-date in O && A && B && O==A && O!=B case' \
445
"rm -f .git/index NM &&
446
cp .orig-A/NM NM &&
447
- git-update-index --add NM &&
448
- git-read-tree -m $tree_O $tree_A $tree_B &&
447
+ git update-index --add NM &&
448
+ git read-tree -m $tree_O $tree_A $tree_B &&
449
check_result"
450
451
test_expect_success \
452
'14 - may match B in O && A && B && O==A && O!=B case' \
453
"rm -f .git/index NM &&
454
cp .orig-B/NM NM &&
455
- git-update-index --add NM &&
455
+ git update-index --add NM &&
456
echo extra >>NM &&
457
- git-read-tree -m $tree_O $tree_A $tree_B &&
457
+ git read-tree -m $tree_O $tree_A $tree_B &&
458
check_result"
459
460
test_expect_failure \
461
'14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
462
"rm -f .git/index NM &&
463
cp .orig-A/NM NM &&
464
- git-update-index --add NM &&
464
+ git update-index --add NM &&
465
echo extra >>NM &&
466
- git-read-tree -m $tree_O $tree_A $tree_B"
466
+ git read-tree -m $tree_O $tree_A $tree_B"
467
468
test_expect_failure \
469
'14 (fail) - must match and be up-to-date in O && A && B && O==A && O!=B case' \
470
"rm -f .git/index NM &&
471
cp .orig-A/NM NM &&
472
echo extra >>NM &&
473
- git-update-index --add NM &&
474
- git-read-tree -m $tree_O $tree_A $tree_B"
473
+ git update-index --add NM &&
474
+ git read-tree -m $tree_O $tree_A $tree_B"
475
476
test_expect_success \
477
'15 - must match A in O && A && B && O==A && O==B case' \
478
"rm -f .git/index NN &&
479
cp .orig-A/NN NN &&
480
- git-update-index --add NN &&
481
- git-read-tree -m $tree_O $tree_A $tree_B &&
480
+ git update-index --add NN &&
481
+ git read-tree -m $tree_O $tree_A $tree_B &&
482
check_result"
483
484
test_expect_success \
485
'15 - must match A in O && A && B && O==A && O==B case' \
486
"rm -f .git/index NN &&
487
cp .orig-A/NN NN &&
488
- git-update-index --add NN &&
488
+ git update-index --add NN &&
489
echo extra >>NN &&
490
- git-read-tree -m $tree_O $tree_A $tree_B &&
490
+ git read-tree -m $tree_O $tree_A $tree_B &&
491
check_result"
492
493
test_expect_failure \
@@ -495,20 +495,20 @@ test_expect_failure \
495
"rm -f .git/index NN &&
496
cp .orig-A/NN NN &&
497
echo extra >>NN &&
498
- git-update-index --add NN &&
499
- git-read-tree -m $tree_O $tree_A $tree_B"
498
+ git update-index --add NN &&
499
+ git read-tree -m $tree_O $tree_A $tree_B"
500
501
# #16
502
test_expect_success \
503
'16 - A matches in one and B matches in another.' \
504
'rm -f .git/index F16 &&
505
echo F16 >F16 &&
506
- git-update-index --add F16 &&
507
- tree0=`git-write-tree` &&
506
+ git update-index --add F16 &&
507
+ tree0=`git write-tree` &&
508
echo E16 >F16 &&
509
- git-update-index F16 &&
510
- tree1=`git-write-tree` &&
511
- git-read-tree -m $tree0 $tree1 $tree1 $tree0 &&
512
- git-ls-files --stage'
509
+ git update-index F16 &&
510
+ tree1=`git write-tree` &&
511
+ git read-tree -m $tree0 $tree1 $tree1 $tree0 &&
512
+ git ls-files --stage'
513
514
test_done
t/t1001-read-tree-m-2way.sh
+88
-88
@@ -11,7 +11,7 @@ There is the head (called H) and another commit (called M), which is
11
simply ahead of H. The index and the work tree contains a state that
12
is derived from H, but may also have local changes. This test checks
13
all the combinations described in the two-tree merge "carry forward"
14
-rules, found in <Documentation/git-read-tree.txt>.
14
+rules, found in <Documentation/git read-tree.txt>.
15
16
In the test, these paths are used:
17
bozbar - in H, stays in M, modified from bozbar to gnusto
@@ -23,7 +23,7 @@ In the test, these paths are used:
23
. ./test-lib.sh
24
25
read_tree_twoway () {
26
- git-read-tree -m "$1" "$2" && git-ls-files --stage
26
+ git read-tree -m "$1" "$2" && git ls-files --stage
27
}
28
29
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
@@ -37,7 +37,7 @@ compare_change () {
37
}
38
39
check_cache_at () {
40
- clean_if_empty=`git-diff-files -- "$1"`
40
+ clean_if_empty=`git diff-files -- "$1"`
41
case "$clean_if_empty" in
42
'') echo "$1: clean" ;;
43
?*) echo "$1: dirty" ;;
@@ -68,24 +68,24 @@ test_expect_success \
68
cat bozbar-old >bozbar &&
69
echo rezrov >rezrov &&
70
echo yomin >yomin &&
71
- git-update-index --add nitfol bozbar rezrov &&
72
- treeH=`git-write-tree` &&
71
+ git update-index --add nitfol bozbar rezrov &&
72
+ treeH=`git write-tree` &&
73
echo treeH $treeH &&
74
- git-ls-tree $treeH &&
74
+ git ls-tree $treeH &&
75
76
cat bozbar-new >bozbar &&
77
- git-update-index --add frotz bozbar --force-remove rezrov &&
78
- git-ls-files --stage >M.out &&
79
- treeM=`git-write-tree` &&
77
+ git update-index --add frotz bozbar --force-remove rezrov &&
78
+ git ls-files --stage >M.out &&
79
+ treeM=`git write-tree` &&
80
echo treeM $treeM &&
81
- git-ls-tree $treeM &&
82
- git-diff-tree $treeH $treeM'
81
+ git ls-tree $treeM &&
82
+ git diff-tree $treeH $treeM'
83
84
test_expect_success \
85
'1, 2, 3 - no carry forward' \
86
'rm -f .git/index &&
87
read_tree_twoway $treeH $treeM &&
88
- git-ls-files --stage >1-3.out &&
88
+ git ls-files --stage >1-3.out &&
89
git diff M.out 1-3.out &&
90
check_cache_at bozbar dirty &&
91
check_cache_at frotz dirty &&
@@ -96,11 +96,11 @@ echo '+100644 X 0 yomin' >expected
96
test_expect_success \
97
'4 - carry forward local addition.' \
98
'rm -f .git/index &&
99
- git-read-tree $treeH &&
100
- git-checkout-index -u -f -q -a &&
101
- git-update-index --add yomin &&
99
+ git read-tree $treeH &&
100
+ git checkout-index -u -f -q -a &&
101
+ git update-index --add yomin &&
102
read_tree_twoway $treeH $treeM &&
103
- git-ls-files --stage >4.out || return 1
103
+ git ls-files --stage >4.out || return 1
104
git diff M.out 4.out >4diff.out
105
compare_change 4diff.out expected &&
106
check_cache_at yomin clean'
@@ -108,13 +108,13 @@ test_expect_success \
108
test_expect_success \
109
'5 - carry forward local addition.' \
110
'rm -f .git/index &&
111
- git-read-tree $treeH &&
112
- git-checkout-index -u -f -q -a &&
111
+ git read-tree $treeH &&
112
+ git checkout-index -u -f -q -a &&
113
echo yomin >yomin &&
114
- git-update-index --add yomin &&
114
+ git update-index --add yomin &&
115
echo yomin yomin >yomin &&
116
read_tree_twoway $treeH $treeM &&
117
- git-ls-files --stage >5.out || return 1
117
+ git ls-files --stage >5.out || return 1
118
git diff M.out 5.out >5diff.out
119
compare_change 5diff.out expected &&
120
check_cache_at yomin dirty'
@@ -122,83 +122,83 @@ test_expect_success \
122
test_expect_success \
123
'6 - local addition already has the same.' \
124
'rm -f .git/index &&
125
- git-read-tree $treeH &&
126
- git-checkout-index -u -f -q -a &&
127
- git-update-index --add frotz &&
125
+ git read-tree $treeH &&
126
+ git checkout-index -u -f -q -a &&
127
+ git update-index --add frotz &&
128
read_tree_twoway $treeH $treeM &&
129
- git-ls-files --stage >6.out &&
129
+ git ls-files --stage >6.out &&
130
git diff M.out 6.out &&
131
check_cache_at frotz clean'
132
133
test_expect_success \
134
'7 - local addition already has the same.' \
135
'rm -f .git/index &&
136
- git-read-tree $treeH &&
137
- git-checkout-index -u -f -q -a &&
136
+ git read-tree $treeH &&
137
+ git checkout-index -u -f -q -a &&
138
echo frotz >frotz &&
139
- git-update-index --add frotz &&
139
+ git update-index --add frotz &&
140
echo frotz frotz >frotz &&
141
read_tree_twoway $treeH $treeM &&
142
- git-ls-files --stage >7.out &&
142
+ git ls-files --stage >7.out &&
143
git diff M.out 7.out &&
144
check_cache_at frotz dirty'
145
146
test_expect_success \
147
'8 - conflicting addition.' \
148
'rm -f .git/index &&
149
- git-read-tree $treeH &&
150
- git-checkout-index -u -f -q -a &&
149
+ git read-tree $treeH &&
150
+ git checkout-index -u -f -q -a &&
151
echo frotz frotz >frotz &&
152
- git-update-index --add frotz &&
152
+ git update-index --add frotz &&
153
if read_tree_twoway $treeH $treeM; then false; else :; fi'
154
155
test_expect_success \
156
'9 - conflicting addition.' \
157
'rm -f .git/index &&
158
- git-read-tree $treeH &&
159
- git-checkout-index -u -f -q -a &&
158
+ git read-tree $treeH &&
159
+ git checkout-index -u -f -q -a &&
160
echo frotz frotz >frotz &&
161
- git-update-index --add frotz &&
161
+ git update-index --add frotz &&
162
echo frotz >frotz &&
163
if read_tree_twoway $treeH $treeM; then false; else :; fi'
164
165
test_expect_success \
166
'10 - path removed.' \
167
'rm -f .git/index &&
168
- git-read-tree $treeH &&
169
- git-checkout-index -u -f -q -a &&
168
+ git read-tree $treeH &&
169
+ git checkout-index -u -f -q -a &&
170
echo rezrov >rezrov &&
171
- git-update-index --add rezrov &&
171
+ git update-index --add rezrov &&
172
read_tree_twoway $treeH $treeM &&
173
- git-ls-files --stage >10.out &&
173
+ git ls-files --stage >10.out &&
174
git diff M.out 10.out'
175
176
test_expect_success \
177
'11 - dirty path removed.' \
178
'rm -f .git/index &&
179
- git-read-tree $treeH &&
180
- git-checkout-index -u -f -q -a &&
179
+ git read-tree $treeH &&
180
+ git checkout-index -u -f -q -a &&
181
echo rezrov >rezrov &&
182
- git-update-index --add rezrov &&
182
+ git update-index --add rezrov &&
183
echo rezrov rezrov >rezrov &&
184
if read_tree_twoway $treeH $treeM; then false; else :; fi'
185
186
test_expect_success \
187
'12 - unmatching local changes being removed.' \
188
'rm -f .git/index &&
189
- git-read-tree $treeH &&
190
- git-checkout-index -u -f -q -a &&
189
+ git read-tree $treeH &&
190
+ git checkout-index -u -f -q -a &&
191
echo rezrov rezrov >rezrov &&
192
- git-update-index --add rezrov &&
192
+ git update-index --add rezrov &&
193
if read_tree_twoway $treeH $treeM; then false; else :; fi'
194
195
test_expect_success \
196
'13 - unmatching local changes being removed.' \
197
'rm -f .git/index &&
198
- git-read-tree $treeH &&
199
- git-checkout-index -u -f -q -a &&
198
+ git read-tree $treeH &&
199
+ git checkout-index -u -f -q -a &&
200
echo rezrov rezrov >rezrov &&
201
- git-update-index --add rezrov &&
201
+ git update-index --add rezrov &&
202
echo rezrov >rezrov &&
203
if read_tree_twoway $treeH $treeM; then false; else :; fi'
204
@@ -210,12 +210,12 @@ EOF
210
test_expect_success \
211
'14 - unchanged in two heads.' \
212
'rm -f .git/index &&
213
- git-read-tree $treeH &&
214
- git-checkout-index -u -f -q -a &&
213
+ git read-tree $treeH &&
214
+ git checkout-index -u -f -q -a &&
215
echo nitfol nitfol >nitfol &&
216
- git-update-index --add nitfol &&
216
+ git update-index --add nitfol &&
217
read_tree_twoway $treeH $treeM &&
218
- git-ls-files --stage >14.out || return 1
218
+ git ls-files --stage >14.out || return 1
219
git diff M.out 14.out >14diff.out
220
compare_change 14diff.out expected &&
221
check_cache_at nitfol clean'
@@ -223,13 +223,13 @@ test_expect_success \
223
test_expect_success \
224
'15 - unchanged in two heads.' \
225
'rm -f .git/index &&
226
- git-read-tree $treeH &&
227
- git-checkout-index -u -f -q -a &&
226
+ git read-tree $treeH &&
227
+ git checkout-index -u -f -q -a &&
228
echo nitfol nitfol >nitfol &&
229
- git-update-index --add nitfol &&
229
+ git update-index --add nitfol &&
230
echo nitfol nitfol nitfol >nitfol &&
231
read_tree_twoway $treeH $treeM &&
232
- git-ls-files --stage >15.out || return 1
232
+ git ls-files --stage >15.out || return 1
233
git diff M.out 15.out >15diff.out
234
compare_change 15diff.out expected &&
235
check_cache_at nitfol dirty'
@@ -237,66 +237,66 @@ test_expect_success \
237
test_expect_success \
238
'16 - conflicting local change.' \
239
'rm -f .git/index &&
240
- git-read-tree $treeH &&
241
- git-checkout-index -u -f -q -a &&
240
+ git read-tree $treeH &&
241
+ git checkout-index -u -f -q -a &&
242
echo bozbar bozbar >bozbar &&
243
- git-update-index --add bozbar &&
243
+ git update-index --add bozbar &&
244
if read_tree_twoway $treeH $treeM; then false; else :; fi'
245
246
test_expect_success \
247
'17 - conflicting local change.' \
248
'rm -f .git/index &&
249
- git-read-tree $treeH &&
250
- git-checkout-index -u -f -q -a &&
249
+ git read-tree $treeH &&
250
+ git checkout-index -u -f -q -a &&
251
echo bozbar bozbar >bozbar &&
252
- git-update-index --add bozbar &&
252
+ git update-index --add bozbar &&
253
echo bozbar bozbar bozbar >bozbar &&
254
if read_tree_twoway $treeH $treeM; then false; else :; fi'
255
256
test_expect_success \
257
'18 - local change already having a good result.' \
258
'rm -f .git/index &&
259
- git-read-tree $treeH &&
260
- git-checkout-index -u -f -q -a &&
259
+ git read-tree $treeH &&
260
+ git checkout-index -u -f -q -a &&
261
cat bozbar-new >bozbar &&
262
- git-update-index --add bozbar &&
262
+ git update-index --add bozbar &&
263
read_tree_twoway $treeH $treeM &&
264
- git-ls-files --stage >18.out &&
264
+ git ls-files --stage >18.out &&
265
git diff M.out 18.out &&
266
check_cache_at bozbar clean'
267
268
test_expect_success \
269
'19 - local change already having a good result, further modified.' \
270
'rm -f .git/index &&
271
- git-read-tree $treeH &&
272
- git-checkout-index -u -f -q -a &&
271
+ git read-tree $treeH &&
272
+ git checkout-index -u -f -q -a &&
273
cat bozbar-new >bozbar &&
274
- git-update-index --add bozbar &&
274
+ git update-index --add bozbar &&
275
echo gnusto gnusto >bozbar &&
276
read_tree_twoway $treeH $treeM &&
277
- git-ls-files --stage >19.out &&
277
+ git ls-files --stage >19.out &&
278
git diff M.out 19.out &&
279
check_cache_at bozbar dirty'
280
281
test_expect_success \
282
'20 - no local change, use new tree.' \
283
'rm -f .git/index &&
284
- git-read-tree $treeH &&
285
- git-checkout-index -u -f -q -a &&
284
+ git read-tree $treeH &&
285
+ git checkout-index -u -f -q -a &&
286
cat bozbar-old >bozbar &&
287
- git-update-index --add bozbar &&
287
+ git update-index --add bozbar &&
288
read_tree_twoway $treeH $treeM &&
289
- git-ls-files --stage >20.out &&
289
+ git ls-files --stage >20.out &&
290
git diff M.out 20.out &&
291
check_cache_at bozbar dirty'
292
293
test_expect_success \
294
'21 - no local change, dirty cache.' \
295
'rm -f .git/index &&
296
- git-read-tree $treeH &&
297
- git-checkout-index -u -f -q -a &&
296
+ git read-tree $treeH &&
297
+ git checkout-index -u -f -q -a &&
298
cat bozbar-old >bozbar &&
299
- git-update-index --add bozbar &&
299
+ git update-index --add bozbar &&
300
echo gnusto gnusto >bozbar &&
301
if read_tree_twoway $treeH $treeM; then false; else :; fi'
302
@@ -304,10 +304,10 @@ test_expect_success \
304
test_expect_success \
305
'22 - local change cache updated.' \
306
'rm -f .git/index &&
307
- git-read-tree $treeH &&
308
- git-checkout-index -u -f -q -a &&
307
+ git read-tree $treeH &&
308
+ git checkout-index -u -f -q -a &&
309
sed -e "s/such as/SUCH AS/" bozbar-old >bozbar &&
310
- git-update-index --add bozbar &&
310
+ git update-index --add bozbar &&
311
if read_tree_twoway $treeH $treeM; then false; else :; fi'
312
313
# Also make sure we did not break DF vs DF/DF case.
@@ -315,28 +315,28 @@ test_expect_success \
315
'DF vs DF/DF case setup.' \
316
'rm -f .git/index &&
317
echo DF >DF &&
318
- git-update-index --add DF &&
319
- treeDF=`git-write-tree` &&
318
+ git update-index --add DF &&
319
+ treeDF=`git write-tree` &&
320
echo treeDF $treeDF &&
321
- git-ls-tree $treeDF &&
321
+ git ls-tree $treeDF &&
322
323
rm -f DF &&
324
mkdir DF &&
325
echo DF/DF >DF/DF &&
326
- git-update-index --add --remove DF DF/DF &&
327
- treeDFDF=`git-write-tree` &&
326
+ git update-index --add --remove DF DF/DF &&
327
+ treeDFDF=`git write-tree` &&
328
echo treeDFDF $treeDFDF &&
329
- git-ls-tree $treeDFDF &&
330
- git-ls-files --stage >DFDF.out'
329
+ git ls-tree $treeDFDF &&
330
+ git ls-files --stage >DFDF.out'
331
332
test_expect_success \
333
'DF vs DF/DF case test.' \
334
'rm -f .git/index &&
335
rm -fr DF &&
336
echo DF >DF &&
337
- git-update-index --add DF &&
337
+ git update-index --add DF &&
338
read_tree_twoway $treeDF $treeDFDF &&
339
- git-ls-files --stage >DFDFcheck.out &&
339
+ git ls-files --stage >DFDFcheck.out &&
340
git diff DFDF.out DFDFcheck.out &&
341
check_cache_at DF/DF dirty &&
342
:'
t/t1002-read-tree-m-u-2way.sh
+87
-87
@@ -20,7 +20,7 @@ compare_change () {
20
}
21
22
check_cache_at () {
23
- clean_if_empty=`git-diff-files -- "$1"`
23
+ clean_if_empty=`git diff-files -- "$1"`
24
case "$clean_if_empty" in
25
'') echo "$1: clean" ;;
26
?*) echo "$1: dirty" ;;
@@ -39,26 +39,26 @@ test_expect_success \
39
echo nitfol >nitfol &&
40
echo bozbar >bozbar &&
41
echo rezrov >rezrov &&
42
- git-update-index --add nitfol bozbar rezrov &&
43
- treeH=`git-write-tree` &&
42
+ git update-index --add nitfol bozbar rezrov &&
43
+ treeH=`git write-tree` &&
44
echo treeH $treeH &&
45
- git-ls-tree $treeH &&
45
+ git ls-tree $treeH &&
46
47
echo gnusto >bozbar &&
48
- git-update-index --add frotz bozbar --force-remove rezrov &&
49
- git-ls-files --stage >M.out &&
50
- treeM=`git-write-tree` &&
48
+ git update-index --add frotz bozbar --force-remove rezrov &&
49
+ git ls-files --stage >M.out &&
50
+ treeM=`git write-tree` &&
51
echo treeM $treeM &&
52
- git-ls-tree $treeM &&
52
+ git ls-tree $treeM &&
53
sum bozbar frotz nitfol >M.sum &&
54
- git-diff-tree $treeH $treeM'
54
+ git diff-tree $treeH $treeM'
55
56
test_expect_success \
57
'1, 2, 3 - no carry forward' \
58
'rm -f .git/index nitfol bozbar rezrov frotz &&
59
- git-read-tree --reset -u $treeH &&
60
- git-read-tree -m -u $treeH $treeM &&
61
- git-ls-files --stage >1-3.out &&
59
+ git read-tree --reset -u $treeH &&
60
+ git read-tree -m -u $treeH $treeM &&
61
+ git ls-files --stage >1-3.out &&
62
cmp M.out 1-3.out &&
63
sum bozbar frotz nitfol >actual3.sum &&
64
cmp M.sum actual3.sum &&
@@ -69,12 +69,12 @@ test_expect_success \
69
test_expect_success \
70
'4 - carry forward local addition.' \
71
'rm -f .git/index nitfol bozbar rezrov frotz &&
72
- git-read-tree --reset -u $treeH &&
72
+ git read-tree --reset -u $treeH &&
73
echo "+100644 X 0 yomin" >expected &&
74
echo yomin >yomin &&
75
- git-update-index --add yomin &&
76
- git-read-tree -m -u $treeH $treeM &&
77
- git-ls-files --stage >4.out || return 1
75
+ git update-index --add yomin &&
76
+ git read-tree -m -u $treeH $treeM &&
77
+ git ls-files --stage >4.out || return 1
78
diff -U0 M.out 4.out >4diff.out
79
compare_change 4diff.out expected &&
80
check_cache_at yomin clean &&
@@ -87,13 +87,13 @@ test_expect_success \
87
test_expect_success \
88
'5 - carry forward local addition.' \
89
'rm -f .git/index nitfol bozbar rezrov frotz &&
90
- git-read-tree --reset -u $treeH &&
91
- git-read-tree -m -u $treeH &&
90
+ git read-tree --reset -u $treeH &&
91
+ git read-tree -m -u $treeH &&
92
echo yomin >yomin &&
93
- git-update-index --add yomin &&
93
+ git update-index --add yomin &&
94
echo yomin yomin >yomin &&
95
- git-read-tree -m -u $treeH $treeM &&
96
- git-ls-files --stage >5.out || return 1
95
+ git read-tree -m -u $treeH $treeM &&
96
+ git ls-files --stage >5.out || return 1
97
diff -U0 M.out 5.out >5diff.out
98
compare_change 5diff.out expected &&
99
check_cache_at yomin dirty &&
@@ -107,11 +107,11 @@ test_expect_success \
107
test_expect_success \
108
'6 - local addition already has the same.' \
109
'rm -f .git/index nitfol bozbar rezrov frotz &&
110
- git-read-tree --reset -u $treeH &&
110
+ git read-tree --reset -u $treeH &&
111
echo frotz >frotz &&
112
- git-update-index --add frotz &&
113
- git-read-tree -m -u $treeH $treeM &&
114
- git-ls-files --stage >6.out &&
112
+ git update-index --add frotz &&
113
+ git read-tree -m -u $treeH $treeM &&
114
+ git ls-files --stage >6.out &&
115
diff -U0 M.out 6.out &&
116
check_cache_at frotz clean &&
117
sum bozbar frotz nitfol >actual3.sum &&
@@ -123,12 +123,12 @@ test_expect_success \
123
test_expect_success \
124
'7 - local addition already has the same.' \
125
'rm -f .git/index nitfol bozbar rezrov frotz &&
126
- git-read-tree --reset -u $treeH &&
126
+ git read-tree --reset -u $treeH &&
127
echo frotz >frotz &&
128
- git-update-index --add frotz &&
128
+ git update-index --add frotz &&
129
echo frotz frotz >frotz &&
130
- git-read-tree -m -u $treeH $treeM &&
131
- git-ls-files --stage >7.out &&
130
+ git read-tree -m -u $treeH $treeM &&
131
+ git ls-files --stage >7.out &&
132
diff -U0 M.out 7.out &&
133
check_cache_at frotz dirty &&
134
sum bozbar frotz nitfol >actual7.sum &&
@@ -141,28 +141,28 @@ test_expect_success \
141
test_expect_success \
142
'8 - conflicting addition.' \
143
'rm -f .git/index nitfol bozbar rezrov frotz &&
144
- git-read-tree --reset -u $treeH &&
144
+ git read-tree --reset -u $treeH &&
145
echo frotz frotz >frotz &&
146
- git-update-index --add frotz &&
147
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
146
+ git update-index --add frotz &&
147
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
148
149
test_expect_success \
150
'9 - conflicting addition.' \
151
'rm -f .git/index nitfol bozbar rezrov frotz &&
152
- git-read-tree --reset -u $treeH &&
152
+ git read-tree --reset -u $treeH &&
153
echo frotz frotz >frotz &&
154
- git-update-index --add frotz &&
154
+ git update-index --add frotz &&
155
echo frotz >frotz &&
156
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
156
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
157
158
test_expect_success \
159
'10 - path removed.' \
160
'rm -f .git/index nitfol bozbar rezrov frotz &&
161
- git-read-tree --reset -u $treeH &&
161
+ git read-tree --reset -u $treeH &&
162
echo rezrov >rezrov &&
163
- git-update-index --add rezrov &&
164
- git-read-tree -m -u $treeH $treeM &&
165
- git-ls-files --stage >10.out &&
163
+ git update-index --add rezrov &&
164
+ git read-tree -m -u $treeH $treeM &&
165
+ git ls-files --stage >10.out &&
166
cmp M.out 10.out &&
167
sum bozbar frotz nitfol >actual10.sum &&
168
cmp M.sum actual10.sum'
@@ -170,28 +170,28 @@ test_expect_success \
170
test_expect_success \
171
'11 - dirty path removed.' \
172
'rm -f .git/index nitfol bozbar rezrov frotz &&
173
- git-read-tree --reset -u $treeH &&
173
+ git read-tree --reset -u $treeH &&
174
echo rezrov >rezrov &&
175
- git-update-index --add rezrov &&
175
+ git update-index --add rezrov &&
176
echo rezrov rezrov >rezrov &&
177
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
177
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
178
179
test_expect_success \
180
'12 - unmatching local changes being removed.' \
181
'rm -f .git/index nitfol bozbar rezrov frotz &&
182
- git-read-tree --reset -u $treeH &&
182
+ git read-tree --reset -u $treeH &&
183
echo rezrov rezrov >rezrov &&
184
- git-update-index --add rezrov &&
185
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
184
+ git update-index --add rezrov &&
185
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
186
187
test_expect_success \
188
'13 - unmatching local changes being removed.' \
189
'rm -f .git/index nitfol bozbar rezrov frotz &&
190
- git-read-tree --reset -u $treeH &&
190
+ git read-tree --reset -u $treeH &&
191
echo rezrov rezrov >rezrov &&
192
- git-update-index --add rezrov &&
192
+ git update-index --add rezrov &&
193
echo rezrov >rezrov &&
194
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
194
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
195
196
cat >expected <<EOF
197
-100644 X 0 nitfol
@@ -201,11 +201,11 @@ EOF
201
test_expect_success \
202
'14 - unchanged in two heads.' \
203
'rm -f .git/index nitfol bozbar rezrov frotz &&
204
- git-read-tree --reset -u $treeH &&
204
+ git read-tree --reset -u $treeH &&
205
echo nitfol nitfol >nitfol &&
206
- git-update-index --add nitfol &&
207
- git-read-tree -m -u $treeH $treeM &&
208
- git-ls-files --stage >14.out || return 1
206
+ git update-index --add nitfol &&
207
+ git read-tree -m -u $treeH $treeM &&
208
+ git ls-files --stage >14.out || return 1
209
diff -U0 M.out 14.out >14diff.out
210
compare_change 14diff.out expected &&
211
sum bozbar frotz >actual14.sum &&
@@ -221,12 +221,12 @@ test_expect_success \
221
test_expect_success \
222
'15 - unchanged in two heads.' \
223
'rm -f .git/index nitfol bozbar rezrov frotz &&
224
- git-read-tree --reset -u $treeH &&
224
+ git read-tree --reset -u $treeH &&
225
echo nitfol nitfol >nitfol &&
226
- git-update-index --add nitfol &&
226
+ git update-index --add nitfol &&
227
echo nitfol nitfol nitfol >nitfol &&
228
- git-read-tree -m -u $treeH $treeM &&
229
- git-ls-files --stage >15.out || return 1
228
+ git read-tree -m -u $treeH $treeM &&
229
+ git ls-files --stage >15.out || return 1
230
diff -U0 M.out 15.out >15diff.out
231
compare_change 15diff.out expected &&
232
check_cache_at nitfol dirty &&
@@ -242,28 +242,28 @@ test_expect_success \
242
test_expect_success \
243
'16 - conflicting local change.' \
244
'rm -f .git/index nitfol bozbar rezrov frotz &&
245
- git-read-tree --reset -u $treeH &&
245
+ git read-tree --reset -u $treeH &&
246
echo bozbar bozbar >bozbar &&
247
- git-update-index --add bozbar &&
248
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
247
+ git update-index --add bozbar &&
248
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
249
250
test_expect_success \
251
'17 - conflicting local change.' \
252
'rm -f .git/index nitfol bozbar rezrov frotz &&
253
- git-read-tree --reset -u $treeH &&
253
+ git read-tree --reset -u $treeH &&
254
echo bozbar bozbar >bozbar &&
255
- git-update-index --add bozbar &&
255
+ git update-index --add bozbar &&
256
echo bozbar bozbar bozbar >bozbar &&
257
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
257
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
258
259
test_expect_success \
260
'18 - local change already having a good result.' \
261
'rm -f .git/index nitfol bozbar rezrov frotz &&
262
- git-read-tree --reset -u $treeH &&
262
+ git read-tree --reset -u $treeH &&
263
echo gnusto >bozbar &&
264
- git-update-index --add bozbar &&
265
- git-read-tree -m -u $treeH $treeM &&
266
- git-ls-files --stage >18.out &&
264
+ git update-index --add bozbar &&
265
+ git read-tree -m -u $treeH $treeM &&
266
+ git ls-files --stage >18.out &&
267
diff -U0 M.out 18.out &&
268
check_cache_at bozbar clean &&
269
sum bozbar frotz nitfol >actual18.sum &&
@@ -272,12 +272,12 @@ test_expect_success \
272
test_expect_success \
273
'19 - local change already having a good result, further modified.' \
274
'rm -f .git/index nitfol bozbar rezrov frotz &&
275
- git-read-tree --reset -u $treeH &&
275
+ git read-tree --reset -u $treeH &&
276
echo gnusto >bozbar &&
277
- git-update-index --add bozbar &&
277
+ git update-index --add bozbar &&
278
echo gnusto gnusto >bozbar &&
279
- git-read-tree -m -u $treeH $treeM &&
280
- git-ls-files --stage >19.out &&
279
+ git read-tree -m -u $treeH $treeM &&
280
+ git ls-files --stage >19.out &&
281
diff -U0 M.out 19.out &&
282
check_cache_at bozbar dirty &&
283
sum frotz nitfol >actual19.sum &&
@@ -292,11 +292,11 @@ test_expect_success \
292
test_expect_success \
293
'20 - no local change, use new tree.' \
294
'rm -f .git/index nitfol bozbar rezrov frotz &&
295
- git-read-tree --reset -u $treeH &&
295
+ git read-tree --reset -u $treeH &&
296
echo bozbar >bozbar &&
297
- git-update-index --add bozbar &&
298
- git-read-tree -m -u $treeH $treeM &&
299
- git-ls-files --stage >20.out &&
297
+ git update-index --add bozbar &&
298
+ git read-tree -m -u $treeH $treeM &&
299
+ git ls-files --stage >20.out &&
300
diff -U0 M.out 20.out &&
301
check_cache_at bozbar clean &&
302
sum bozbar frotz nitfol >actual20.sum &&
@@ -305,39 +305,39 @@ test_expect_success \
305
test_expect_success \
306
'21 - no local change, dirty cache.' \
307
'rm -f .git/index nitfol bozbar rezrov frotz &&
308
- git-read-tree --reset -u $treeH &&
308
+ git read-tree --reset -u $treeH &&
309
echo bozbar >bozbar &&
310
- git-update-index --add bozbar &&
310
+ git update-index --add bozbar &&
311
echo gnusto gnusto >bozbar &&
312
- if git-read-tree -m -u $treeH $treeM; then false; else :; fi'
312
+ if git read-tree -m -u $treeH $treeM; then false; else :; fi'
313
314
# Also make sure we did not break DF vs DF/DF case.
315
test_expect_success \
316
'DF vs DF/DF case setup.' \
317
'rm -f .git/index
318
echo DF >DF &&
319
- git-update-index --add DF &&
320
- treeDF=`git-write-tree` &&
319
+ git update-index --add DF &&
320
+ treeDF=`git write-tree` &&
321
echo treeDF $treeDF &&
322
- git-ls-tree $treeDF &&
322
+ git ls-tree $treeDF &&
323
324
rm -f DF &&
325
mkdir DF &&
326
echo DF/DF >DF/DF &&
327
- git-update-index --add --remove DF DF/DF &&
328
- treeDFDF=`git-write-tree` &&
327
+ git update-index --add --remove DF DF/DF &&
328
+ treeDFDF=`git write-tree` &&
329
echo treeDFDF $treeDFDF &&
330
- git-ls-tree $treeDFDF &&
331
- git-ls-files --stage >DFDF.out'
330
+ git ls-tree $treeDFDF &&
331
+ git ls-files --stage >DFDF.out'
332
333
test_expect_success \
334
'DF vs DF/DF case test.' \
335
'rm -f .git/index &&
336
rm -fr DF &&
337
echo DF >DF &&
338
- git-update-index --add DF &&
339
- git-read-tree -m -u $treeDF $treeDFDF &&
340
- git-ls-files --stage >DFDFcheck.out &&
338
+ git update-index --add DF &&
339
+ git read-tree -m -u $treeDF $treeDFDF &&
340
+ git ls-files --stage >DFDFcheck.out &&
341
diff -U0 DFDF.out DFDFcheck.out &&
342
check_cache_at DF/DF clean'
343
t/t1003-read-tree-prefix.sh
+5
-5
@@ -3,15 +3,15 @@
3
# Copyright (c) 2006 Junio C Hamano
4
#
5
6
-test_description='git-read-tree --prefix test.
6
+test_description='git read-tree --prefix test.
7
'
8
9
. ./test-lib.sh
10
11
test_expect_success setup '
12
echo hello >one &&
13
- git-update-index --add one &&
14
- tree=`git-write-tree` &&
13
+ git update-index --add one &&
14
+ tree=`git write-tree` &&
15
echo tree is $tree
16
'
17
@@ -19,8 +19,8 @@ echo 'one
19
two/one' >expect
20
21
test_expect_success 'read-tree --prefix' '
22
- git-read-tree --prefix=two/ $tree &&
23
- git-ls-files >actual &&
22
+ git read-tree --prefix=two/ $tree &&
23
+ git ls-files >actual &&
24
cmp expect actual
25
'
26
t/t1004-read-tree-m-u-wf.sh
+1
-1
@@ -84,7 +84,7 @@ test_expect_success 'three-way not complaining on an untracked path in both' '
84
echo >file2 file two is untracked on the master side &&
85
echo >subdir/file2 file two is untracked on the master side &&
86
87
- git-read-tree -m -u branch-point master side
87
+ git read-tree -m -u branch-point master side
88
'
89
90
test_expect_success 'three-way not clobbering a working tree file' '
t/t1020-subdirectory.sh
+18
-18
@@ -22,19 +22,19 @@ LF='
22
23
test_expect_success 'update-index and ls-files' '
24
cd $HERE &&
25
- git-update-index --add one &&
26
- case "`git-ls-files`" in
25
+ git update-index --add one &&
26
+ case "`git ls-files`" in
27
one) echo ok one ;;
28
*) echo bad one; exit 1 ;;
29
esac &&
30
cd dir &&
31
- git-update-index --add two &&
32
- case "`git-ls-files`" in
31
+ git update-index --add two &&
32
+ case "`git ls-files`" in
33
two) echo ok two ;;
34
*) echo bad two; exit 1 ;;
35
esac &&
36
cd .. &&
37
- case "`git-ls-files`" in
37
+ case "`git ls-files`" in
38
dir/two"$LF"one) echo ok both ;;
39
*) echo bad; exit 1 ;;
40
esac
@@ -42,13 +42,13 @@ test_expect_success 'update-index and ls-files' '
42
43
test_expect_success 'cat-file' '
44
cd $HERE &&
45
- two=`git-ls-files -s dir/two` &&
45
+ two=`git ls-files -s dir/two` &&
46
two=`expr "$two" : "[0-7]* \\([0-9a-f]*\\)"` &&
47
echo "$two" &&
48
- git-cat-file -p "$two" >actual &&
48
+ git cat-file -p "$two" >actual &&
49
cmp dir/two actual &&
50
cd dir &&
51
- git-cat-file -p "$two" >actual &&
51
+ git cat-file -p "$two" >actual &&
52
cmp two actual
53
'
54
rm -f actual dir/actual
@@ -57,17 +57,17 @@ test_expect_success 'diff-files' '
57
cd $HERE &&
58
echo a >>one &&
59
echo d >>dir/two &&
60
- case "`git-diff-files --name-only`" in
60
+ case "`git diff-files --name-only`" in
61
dir/two"$LF"one) echo ok top ;;
62
*) echo bad top; exit 1 ;;
63
esac &&
64
# diff should not omit leading paths
65
cd dir &&
66
- case "`git-diff-files --name-only`" in
66
+ case "`git diff-files --name-only`" in
67
dir/two"$LF"one) echo ok subdir ;;
68
*) echo bad subdir; exit 1 ;;
69
esac &&
70
- case "`git-diff-files --name-only .`" in
70
+ case "`git diff-files --name-only .`" in
71
dir/two) echo ok subdir limited ;;
72
*) echo bad subdir limited; exit 1 ;;
73
esac
@@ -75,33 +75,33 @@ test_expect_success 'diff-files' '
75
76
test_expect_success 'write-tree' '
77
cd $HERE &&
78
- top=`git-write-tree` &&
78
+ top=`git write-tree` &&
79
echo $top &&
80
cd dir &&
81
- sub=`git-write-tree` &&
81
+ sub=`git write-tree` &&
82
echo $sub &&
83
test "z$top" = "z$sub"
84
'
85
86
test_expect_success 'checkout-index' '
87
cd $HERE &&
88
- git-checkout-index -f -u one &&
88
+ git checkout-index -f -u one &&
89
cmp one original.one &&
90
cd dir &&
91
- git-checkout-index -f -u two &&
91
+ git checkout-index -f -u two &&
92
cmp two ../original.two
93
'
94
95
test_expect_success 'read-tree' '
96
cd $HERE &&
97
rm -f one dir/two &&
98
- tree=`git-write-tree` &&
99
- git-read-tree --reset -u "$tree" &&
98
+ tree=`git write-tree` &&
99
+ git read-tree --reset -u "$tree" &&
100
cmp one original.one &&
101
cmp dir/two original.two &&
102
cd dir &&
103
rm -f two &&
104
- git-read-tree --reset -u "$tree" &&
104
+ git read-tree --reset -u "$tree" &&
105
cmp two ../original.two &&
106
cmp ../one ../original.one
107
'
t/t1100-commit-tree-options.sh
+5
-5
@@ -3,9 +3,9 @@
3
# Copyright (C) 2005 Rene Scharfe
4
#
5
6
-test_description='git-commit-tree options test
6
+test_description='git commit-tree options test
7
8
-This test checks that git-commit-tree can create a specific commit
8
+This test checks that git commit-tree can create a specific commit
9
object by defining all environment variables that it understands.
10
'
11
@@ -21,7 +21,7 @@ EOF
21
22
test_expect_success \
23
'test preparation: write empty tree' \
24
- 'git-write-tree >treeid'
24
+ 'git write-tree >treeid'
25
26
test_expect_success \
27
'construct commit' \
@@ -32,11 +32,11 @@ test_expect_success \
32
GIT_COMMITTER_NAME="Committer Name" \
33
GIT_COMMITTER_EMAIL="committer@email" \
34
GIT_COMMITTER_DATE="2005-05-26 23:30" \
35
- TZ=GMT git-commit-tree `cat treeid` >commitid 2>/dev/null'
35
+ TZ=GMT git commit-tree `cat treeid` >commitid 2>/dev/null'
36
37
test_expect_success \
38
'read commit' \
39
- 'git-cat-file commit `cat commitid` >commit'
39
+ 'git cat-file commit `cat commitid` >commit'
40
41
test_expect_success \
42
'compare commit' \
t/t1200-tutorial.sh
+12
-12
@@ -10,11 +10,11 @@ test_description='A simple turial in the form of a test case'
10
echo "Hello World" > hello
11
echo "Silly example" > example
12
13
-git-update-index --add hello example
13
+git update-index --add hello example
14
15
-test_expect_success 'blob' "test blob = \"$(git-cat-file -t 557db03)\""
15
+test_expect_success 'blob' "test blob = \"$(git cat-file -t 557db03)\""
16
17
-test_expect_success 'blob 557db03' "test \"Hello World\" = \"$(git-cat-file blob 557db03)\""
17
+test_expect_success 'blob 557db03' "test \"Hello World\" = \"$(git cat-file blob 557db03)\""
18
19
echo "It's a new day for git" >>hello
20
cat > diff.expect << EOF
@@ -26,25 +26,25 @@ index 557db03..263414f 100644
26
Hello World
27
+It's a new day for git
28
EOF
29
-git-diff-files -p > diff.output
30
-test_expect_success 'git-diff-files -p' 'cmp diff.expect diff.output'
29
+git diff-files -p > diff.output
30
+test_expect_success 'git diff-files -p' 'cmp diff.expect diff.output'
31
git diff > diff.output
32
test_expect_success 'git diff' 'cmp diff.expect diff.output'
33
34
-tree=$(git-write-tree 2>/dev/null)
34
+tree=$(git write-tree 2>/dev/null)
35
36
test_expect_success 'tree' "test 8988da15d077d4829fc51d8544c097def6644dbb = $tree"
37
38
-output="$(echo "Initial commit" | git-commit-tree $(git-write-tree) 2>&1 > .git/refs/heads/master)"
38
+output="$(echo "Initial commit" | git commit-tree $(git write-tree) 2>&1 > .git/refs/heads/master)"
39
40
-git-diff-index -p HEAD > diff.output
41
-test_expect_success 'git-diff-index -p HEAD' 'cmp diff.expect diff.output'
40
+git diff-index -p HEAD > diff.output
41
+test_expect_success 'git diff-index -p HEAD' 'cmp diff.expect diff.output'
42
43
git diff HEAD > diff.output
44
test_expect_success 'git diff HEAD' 'cmp diff.expect diff.output'
45
46
#rm hello
47
-#test_expect_success 'git-read-tree --reset HEAD' "git-read-tree --reset HEAD ; test \"hello: needs update\" = \"$(git-update-index --refresh)\""
47
+#test_expect_success 'git read-tree --reset HEAD' "git read-tree --reset HEAD ; test \"hello: needs update\" = \"$(git update-index --refresh)\""
48
49
cat > whatchanged.expect << EOF
50
commit VARIABLE
@@ -69,11 +69,11 @@ index 0000000..557db03
69
+Hello World
70
EOF
71
72
-git-whatchanged -p --root | \
72
+git whatchanged -p --root | \
73
sed -e "1s/^\(.\{7\}\).\{40\}/\1VARIABLE/" \
74
-e "2,3s/^\(.\{8\}\).*$/\1VARIABLE/" \
75
> whatchanged.output
76
-test_expect_success 'git-whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output'
76
+test_expect_success 'git whatchanged -p --root' 'cmp whatchanged.expect whatchanged.output'
77
78
git tag my-first-tag
79
test_expect_success 'git tag my-first-tag' 'cmp .git/refs/heads/master .git/refs/tags/my-first-tag'
t/t1300-repo-config.sh
+76
-76
@@ -3,13 +3,13 @@
3
# Copyright (c) 2005 Johannes Schindelin
4
#
5
6
-test_description='Test git-config in different settings'
6
+test_description='Test git config in different settings'
7
8
. ./test-lib.sh
9
10
test -f .git/config && rm .git/config
11
12
-git-config core.penguin "little blue"
12
+git config core.penguin "little blue"
13
14
cat > expect << EOF
15
[core]
@@ -18,7 +18,7 @@ EOF
18
19
test_expect_success 'initial' 'cmp .git/config expect'
20
21
-git-config Core.Movie BadPhysics
21
+git config Core.Movie BadPhysics
22
23
cat > expect << EOF
24
[core]
@@ -28,7 +28,7 @@ EOF
28
29
test_expect_success 'mixed case' 'cmp .git/config expect'
30
31
-git-config Cores.WhatEver Second
31
+git config Cores.WhatEver Second
32
33
cat > expect << EOF
34
[core]
@@ -40,7 +40,7 @@ EOF
40
41
test_expect_success 'similar section' 'cmp .git/config expect'
42
43
-git-config CORE.UPPERCASE true
43
+git config CORE.UPPERCASE true
44
45
cat > expect << EOF
46
[core]
@@ -54,10 +54,10 @@ EOF
54
test_expect_success 'similar section' 'cmp .git/config expect'
55
56
test_expect_success 'replace with non-match' \
57
- 'git-config core.penguin kingpin !blue'
57
+ 'git config core.penguin kingpin !blue'
58
59
test_expect_success 'replace with non-match (actually matching)' \
60
- 'git-config core.penguin "very blue" !kingpin'
60
+ 'git config core.penguin "very blue" !kingpin'
61
62
cat > expect << EOF
63
[core]
@@ -86,7 +86,7 @@ EOF
86
cp .git/config .git/config2
87
88
test_expect_success 'multiple unset' \
89
- 'git-config --unset-all beta.haha'
89
+ 'git config --unset-all beta.haha'
90
91
cat > expect << EOF
92
[beta] ; silly comment # another comment
@@ -102,7 +102,7 @@ test_expect_success 'multiple unset is correct' 'cmp .git/config expect'
102
mv .git/config2 .git/config
103
104
test_expect_success '--replace-all' \
105
- 'git-config --replace-all beta.haha gamma'
105
+ 'git config --replace-all beta.haha gamma'
106
107
cat > expect << EOF
108
[beta] ; silly comment # another comment
@@ -116,7 +116,7 @@ EOF
116
117
test_expect_success 'all replaced' 'cmp .git/config expect'
118
119
-git-config beta.haha alpha
119
+git config beta.haha alpha
120
121
cat > expect << EOF
122
[beta] ; silly comment # another comment
@@ -130,7 +130,7 @@ EOF
130
131
test_expect_success 'really mean test' 'cmp .git/config expect'
132
133
-git-config nextsection.nonewline wow
133
+git config nextsection.nonewline wow
134
135
cat > expect << EOF
136
[beta] ; silly comment # another comment
@@ -145,8 +145,8 @@ EOF
145
146
test_expect_success 'really really mean test' 'cmp .git/config expect'
147
148
-test_expect_success 'get value' 'test alpha = $(git-config beta.haha)'
149
-git-config --unset beta.haha
148
+test_expect_success 'get value' 'test alpha = $(git config beta.haha)'
149
+git config --unset beta.haha
150
151
cat > expect << EOF
152
[beta] ; silly comment # another comment
@@ -160,7 +160,7 @@ EOF
160
161
test_expect_success 'unset' 'cmp .git/config expect'
162
163
-git-config nextsection.NoNewLine "wow2 for me" "for me$"
163
+git config nextsection.NoNewLine "wow2 for me" "for me$"
164
165
cat > expect << EOF
166
[beta] ; silly comment # another comment
@@ -176,18 +176,18 @@ EOF
176
test_expect_success 'multivar' 'cmp .git/config expect'
177
178
test_expect_success 'non-match' \
179
- 'git-config --get nextsection.nonewline !for'
179
+ 'git config --get nextsection.nonewline !for'
180
181
test_expect_success 'non-match value' \
182
- 'test wow = $(git-config --get nextsection.nonewline !for)'
182
+ 'test wow = $(git config --get nextsection.nonewline !for)'
183
184
test_expect_failure 'ambiguous get' \
185
- 'git-config --get nextsection.nonewline'
185
+ 'git config --get nextsection.nonewline'
186
187
test_expect_success 'get multivar' \
188
- 'git-config --get-all nextsection.nonewline'
188
+ 'git config --get-all nextsection.nonewline'
189
190
-git-config nextsection.nonewline "wow3" "wow$"
190
+git config nextsection.nonewline "wow3" "wow$"
191
192
cat > expect << EOF
193
[beta] ; silly comment # another comment
@@ -202,15 +202,15 @@ EOF
202
203
test_expect_success 'multivar replace' 'cmp .git/config expect'
204
205
-test_expect_failure 'ambiguous value' 'git-config nextsection.nonewline'
205
+test_expect_failure 'ambiguous value' 'git config nextsection.nonewline'
206
207
test_expect_failure 'ambiguous unset' \
208
- 'git-config --unset nextsection.nonewline'
208
+ 'git config --unset nextsection.nonewline'
209
210
test_expect_failure 'invalid unset' \
211
- 'git-config --unset somesection.nonewline'
211
+ 'git config --unset somesection.nonewline'
212
213
-git-config --unset nextsection.nonewline "wow3$"
213
+git config --unset nextsection.nonewline "wow3$"
214
215
cat > expect << EOF
216
[beta] ; silly comment # another comment
@@ -224,12 +224,12 @@ EOF
224
225
test_expect_success 'multivar unset' 'cmp .git/config expect'
226
227
-test_expect_failure 'invalid key' 'git-config inval.2key blabla'
227
+test_expect_failure 'invalid key' 'git config inval.2key blabla'
228
229
-test_expect_success 'correct key' 'git-config 123456.a123 987'
229
+test_expect_success 'correct key' 'git config 123456.a123 987'
230
231
test_expect_success 'hierarchical section' \
232
- 'git-config Version.1.2.3eX.Alpha beta'
232
+ 'git config Version.1.2.3eX.Alpha beta'
233
234
cat > expect << EOF
235
[beta] ; silly comment # another comment
@@ -255,7 +255,7 @@ version.1.2.3eX.alpha=beta
255
EOF
256
257
test_expect_success 'working --list' \
258
- 'git-config --list > output && cmp output expect'
258
+ 'git config --list > output && cmp output expect'
259
260
cat > expect << EOF
261
beta.noindent sillyValue
@@ -263,9 +263,9 @@ nextsection.nonewline wow2 for me
263
EOF
264
265
test_expect_success '--get-regexp' \
266
- 'git-config --get-regexp in > output && cmp output expect'
266
+ 'git config --get-regexp in > output && cmp output expect'
267
268
-git-config --add nextsection.nonewline "wow4 for you"
268
+git config --add nextsection.nonewline "wow4 for you"
269
270
cat > expect << EOF
271
wow2 for me
@@ -273,7 +273,7 @@ wow4 for you
273
EOF
274
275
test_expect_success '--add' \
276
- 'git-config --get-all nextsection.nonewline > output && cmp output expect'
276
+ 'git config --get-all nextsection.nonewline > output && cmp output expect'
277
278
cat > .git/config << EOF
279
[novalue]
@@ -281,15 +281,15 @@ cat > .git/config << EOF
281
EOF
282
283
test_expect_success 'get variable with no value' \
284
- 'git-config --get novalue.variable ^$'
284
+ 'git config --get novalue.variable ^$'
285
286
echo novalue.variable > expect
287
288
test_expect_success 'get-regexp variable with no value' \
289
- 'git-config --get-regexp novalue > output &&
289
+ 'git config --get-regexp novalue > output &&
290
cmp output expect'
291
292
-git-config > output 2>&1
292
+git config > output 2>&1
293
294
test_expect_success 'no arguments, but no crash' \
295
"test $? = 129 && grep usage output"
@@ -299,7 +299,7 @@ cat > .git/config << EOF
299
c = d
300
EOF
301
302
-git-config a.x y
302
+git config a.x y
303
304
cat > expect << EOF
305
[a.b]
@@ -310,8 +310,8 @@ EOF
310
311
test_expect_success 'new section is partial match of another' 'cmp .git/config expect'
312
313
-git-config b.x y
314
-git-config a.b c
313
+git config b.x y
314
+git config a.b c
315
316
cat > expect << EOF
317
[a.b]
@@ -334,11 +334,11 @@ cat > expect << EOF
334
ein.bahn=strasse
335
EOF
336
337
-GIT_CONFIG=other-config git-config -l > output
337
+GIT_CONFIG=other-config git config -l > output
338
339
test_expect_success 'alternative GIT_CONFIG' 'cmp output expect'
340
341
-GIT_CONFIG=other-config git-config anwohner.park ausweis
341
+GIT_CONFIG=other-config git config anwohner.park ausweis
342
343
cat > expect << EOF
344
[ein]
@@ -361,7 +361,7 @@ weird
361
EOF
362
363
test_expect_success "rename section" \
364
- "git-config --rename-section branch.eins branch.zwei"
364
+ "git config --rename-section branch.eins branch.zwei"
365
366
cat > expect << EOF
367
# Hallo
@@ -377,12 +377,12 @@ EOF
377
test_expect_success "rename succeeded" "git diff expect .git/config"
378
379
test_expect_failure "rename non-existing section" \
380
- 'git-config --rename-section branch."world domination" branch.drei'
380
+ 'git config --rename-section branch."world domination" branch.drei'
381
382
test_expect_success "rename succeeded" "git diff expect .git/config"
383
384
test_expect_success "rename another section" \
385
- 'git-config --rename-section branch."1 234 blabl/a" branch.drei'
385
+ 'git config --rename-section branch."1 234 blabl/a" branch.drei'
386
387
cat > expect << EOF
388
# Hallo
@@ -425,20 +425,20 @@ EOF
425
426
test_expect_success 'section ending' '
427
428
- git-config gitcvs.enabled true &&
429
- git-config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
430
- git-config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
428
+ git config gitcvs.enabled true &&
429
+ git config gitcvs.ext.dbname %Ggitcvs1.%a.%m.sqlite &&
430
+ git config gitcvs.dbname %Ggitcvs2.%a.%m.sqlite &&
431
cmp .git/config expect
432
433
'
434
435
test_expect_success numbers '
436
437
- git-config kilo.gram 1k &&
438
- git-config mega.ton 1m &&
439
- k=$(git-config --int --get kilo.gram) &&
437
+ git config kilo.gram 1k &&
438
+ git config mega.ton 1m &&
439
+ k=$(git config --int --get kilo.gram) &&
440
test z1024 = "z$k" &&
441
- m=$(git-config --int --get mega.ton) &&
441
+ m=$(git config --int --get mega.ton) &&
442
test z1048576 = "z$m"
443
'
444
@@ -455,30 +455,30 @@ EOF
455
456
test_expect_success bool '
457
458
- git-config bool.true1 01 &&
459
- git-config bool.true2 -1 &&
460
- git-config bool.true3 YeS &&
461
- git-config bool.true4 true &&
462
- git-config bool.false1 000 &&
463
- git-config bool.false2 "" &&
464
- git-config bool.false3 nO &&
465
- git-config bool.false4 FALSE &&
458
+ git config bool.true1 01 &&
459
+ git config bool.true2 -1 &&
460
+ git config bool.true3 YeS &&
461
+ git config bool.true4 true &&
462
+ git config bool.false1 000 &&
463
+ git config bool.false2 "" &&
464
+ git config bool.false3 nO &&
465
+ git config bool.false4 FALSE &&
466
rm -f result &&
467
for i in 1 2 3 4
468
do
469
- git-config --bool --get bool.true$i >>result
470
- git-config --bool --get bool.false$i >>result
469
+ git config --bool --get bool.true$i >>result
470
+ git config --bool --get bool.false$i >>result
471
done &&
472
cmp expect result'
473
474
test_expect_failure 'invalid bool (--get)' '
475
476
- git-config bool.nobool foobar &&
477
- git-config --bool --get bool.nobool'
476
+ git config bool.nobool foobar &&
477
+ git config --bool --get bool.nobool'
478
479
test_expect_failure 'invalid bool (set)' '
480
481
- git-config --bool bool.nobool foobar'
481
+ git config --bool bool.nobool foobar'
482
483
rm .git/config
484
@@ -496,14 +496,14 @@ EOF
496
497
test_expect_success 'set --bool' '
498
499
- git-config --bool bool.true1 01 &&
500
- git-config --bool bool.true2 -1 &&
501
- git-config --bool bool.true3 YeS &&
502
- git-config --bool bool.true4 true &&
503
- git-config --bool bool.false1 000 &&
504
- git-config --bool bool.false2 "" &&
505
- git-config --bool bool.false3 nO &&
506
- git-config --bool bool.false4 FALSE &&
499
+ git config --bool bool.true1 01 &&
500
+ git config --bool bool.true2 -1 &&
501
+ git config --bool bool.true3 YeS &&
502
+ git config --bool bool.true4 true &&
503
+ git config --bool bool.false1 000 &&
504
+ git config --bool bool.false2 "" &&
505
+ git config --bool bool.false3 nO &&
506
+ git config --bool bool.false4 FALSE &&
507
cmp expect .git/config'
508
509
rm .git/config
@@ -517,17 +517,17 @@ EOF
517
518
test_expect_success 'set --int' '
519
520
- git-config --int int.val1 01 &&
521
- git-config --int int.val2 -1 &&
522
- git-config --int int.val3 5m &&
520
+ git config --int int.val1 01 &&
521
+ git config --int int.val2 -1 &&
522
+ git config --int int.val3 5m &&
523
cmp expect .git/config'
524
525
rm .git/config
526
527
-git-config quote.leading " test"
528
-git-config quote.ending "test "
529
-git-config quote.semicolon "test;test"
530
-git-config quote.hash "test#test"
527
+git config quote.leading " test"
528
+git config quote.ending "test "
529
+git config quote.semicolon "test;test"
530
+git config quote.hash "test#test"
531
532
cat > expect << EOF
533
[quote]
t/t1400-update-ref.sh
+37
-37
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Shawn Pearce
4
#
5
6
-test_description='Test git-update-ref and basic ref logging'
6
+test_description='Test git update-ref and basic ref logging'
7
. ./test-lib.sh
8
9
Z=0000000000000000000000000000000000000000
@@ -19,34 +19,34 @@ n=$n_dir/fixes
19
20
test_expect_success \
21
"create $m" \
22
- "git-update-ref $m $A &&
22
+ "git update-ref $m $A &&
23
test $A"' = $(cat .git/'"$m"')'
24
test_expect_success \
25
"create $m" \
26
- "git-update-ref $m $B $A &&
26
+ "git update-ref $m $B $A &&
27
test $B"' = $(cat .git/'"$m"')'
28
rm -f .git/$m
29
30
test_expect_success \
31
"fail to create $n" \
32
"touch .git/$n_dir
33
- git-update-ref $n $A >out 2>err"'
33
+ git update-ref $n $A >out 2>err"'
34
test $? != 0'
35
rm -f .git/$n_dir out err
36
37
test_expect_success \
38
"create $m (by HEAD)" \
39
- "git-update-ref HEAD $A &&
39
+ "git update-ref HEAD $A &&
40
test $A"' = $(cat .git/'"$m"')'
41
test_expect_success \
42
"create $m (by HEAD)" \
43
- "git-update-ref HEAD $B $A &&
43
+ "git update-ref HEAD $B $A &&
44
test $B"' = $(cat .git/'"$m"')'
45
rm -f .git/$m
46
47
test_expect_failure \
48
'(not) create HEAD with old sha1' \
49
- "git-update-ref HEAD $A $B"
49
+ "git update-ref HEAD $A $B"
50
test_expect_failure \
51
"(not) prior created .git/$m" \
52
"test -f .git/$m"
@@ -54,10 +54,10 @@ rm -f .git/$m
54
55
test_expect_success \
56
"create HEAD" \
57
- "git-update-ref HEAD $A"
57
+ "git update-ref HEAD $A"
58
test_expect_failure \
59
'(not) change HEAD with wrong SHA1' \
60
- "git-update-ref HEAD $B $Z"
60
+ "git update-ref HEAD $B $Z"
61
test_expect_failure \
62
"(not) changed .git/$m" \
63
"test $B"' = $(cat .git/'"$m"')'
@@ -68,17 +68,17 @@ rm -f .git/$m
68
test_expect_success \
69
"create $m (logged by touch)" \
70
'GIT_COMMITTER_DATE="2005-05-26 23:30" \
71
- git-update-ref HEAD '"$A"' -m "Initial Creation" &&
71
+ git update-ref HEAD '"$A"' -m "Initial Creation" &&
72
test '"$A"' = $(cat .git/'"$m"')'
73
test_expect_success \
74
"update $m (logged by touch)" \
75
'GIT_COMMITTER_DATE="2005-05-26 23:31" \
76
- git-update-ref HEAD'" $B $A "'-m "Switch" &&
76
+ git update-ref HEAD'" $B $A "'-m "Switch" &&
77
test '"$B"' = $(cat .git/'"$m"')'
78
test_expect_success \
79
"set $m (logged by touch)" \
80
'GIT_COMMITTER_DATE="2005-05-26 23:41" \
81
- git-update-ref HEAD'" $A &&
81
+ git update-ref HEAD'" $A &&
82
test $A"' = $(cat .git/'"$m"')'
83
84
cat >expect <<EOF
@@ -93,23 +93,23 @@ rm -rf .git/$m .git/logs expect
93
94
test_expect_success \
95
'enable core.logAllRefUpdates' \
96
- 'git-config core.logAllRefUpdates true &&
97
- test true = $(git-config --bool --get core.logAllRefUpdates)'
96
+ 'git config core.logAllRefUpdates true &&
97
+ test true = $(git config --bool --get core.logAllRefUpdates)'
98
99
test_expect_success \
100
"create $m (logged by config)" \
101
'GIT_COMMITTER_DATE="2005-05-26 23:32" \
102
- git-update-ref HEAD'" $A "'-m "Initial Creation" &&
102
+ git update-ref HEAD'" $A "'-m "Initial Creation" &&
103
test '"$A"' = $(cat .git/'"$m"')'
104
test_expect_success \
105
"update $m (logged by config)" \
106
'GIT_COMMITTER_DATE="2005-05-26 23:33" \
107
- git-update-ref HEAD'" $B $A "'-m "Switch" &&
107
+ git update-ref HEAD'" $B $A "'-m "Switch" &&
108
test '"$B"' = $(cat .git/'"$m"')'
109
test_expect_success \
110
"set $m (logged by config)" \
111
'GIT_COMMITTER_DATE="2005-05-26 23:43" \
112
- git-update-ref HEAD '"$A &&
112
+ git update-ref HEAD '"$A &&
113
test $A"' = $(cat .git/'"$m"')'
114
115
cat >expect <<EOF
@@ -122,7 +122,7 @@ test_expect_success \
122
'diff expect .git/logs/$m'
123
rm -f .git/$m .git/logs/$m expect
124
125
-git-update-ref $m $D
125
+git update-ref $m $D
126
cat >.git/logs/$m <<EOF
127
$C $A $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150320 -0500
128
$A $B $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150380 -0500
@@ -136,49 +136,49 @@ ld="Thu, 26 May 2005 18:43:00 -0500"
136
test_expect_success \
137
'Query "master@{May 25 2005}" (before history)' \
138
'rm -f o e
139
- git-rev-parse --verify "master@{May 25 2005}" >o 2>e &&
139
+ git rev-parse --verify "master@{May 25 2005}" >o 2>e &&
140
test '"$C"' = $(cat o) &&
141
test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
142
test_expect_success \
143
"Query master@{2005-05-25} (before history)" \
144
'rm -f o e
145
- git-rev-parse --verify master@{2005-05-25} >o 2>e &&
145
+ git rev-parse --verify master@{2005-05-25} >o 2>e &&
146
test '"$C"' = $(cat o) &&
147
echo test "warning: Log for '\'master\'' only goes back to $ed." = "$(cat e)"'
148
test_expect_success \
149
'Query "master@{May 26 2005 23:31:59}" (1 second before history)' \
150
'rm -f o e
151
- git-rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
151
+ git rev-parse --verify "master@{May 26 2005 23:31:59}" >o 2>e &&
152
test '"$C"' = $(cat o) &&
153
test "warning: Log for '\''master'\'' only goes back to $ed." = "$(cat e)"'
154
test_expect_success \
155
'Query "master@{May 26 2005 23:32:00}" (exactly history start)' \
156
'rm -f o e
157
- git-rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
157
+ git rev-parse --verify "master@{May 26 2005 23:32:00}" >o 2>e &&
158
test '"$A"' = $(cat o) &&
159
test "" = "$(cat e)"'
160
test_expect_success \
161
'Query "master@{2005-05-26 23:33:01}" (middle of history with gap)' \
162
'rm -f o e
163
- git-rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
163
+ git rev-parse --verify "master@{2005-05-26 23:33:01}" >o 2>e &&
164
test '"$B"' = $(cat o) &&
165
test "warning: Log .git/logs/'"$m has gap after $gd"'." = "$(cat e)"'
166
test_expect_success \
167
'Query "master@{2005-05-26 23:38:00}" (middle of history)' \
168
'rm -f o e
169
- git-rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
169
+ git rev-parse --verify "master@{2005-05-26 23:38:00}" >o 2>e &&
170
test '"$Z"' = $(cat o) &&
171
test "" = "$(cat e)"'
172
test_expect_success \
173
'Query "master@{2005-05-26 23:43:00}" (exact end of history)' \
174
'rm -f o e
175
- git-rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
175
+ git rev-parse --verify "master@{2005-05-26 23:43:00}" >o 2>e &&
176
test '"$E"' = $(cat o) &&
177
test "" = "$(cat e)"'
178
test_expect_success \
179
'Query "master@{2005-05-28}" (past end of history)' \
180
'rm -f o e
181
- git-rev-parse --verify "master@{2005-05-28}" >o 2>e &&
181
+ git rev-parse --verify "master@{2005-05-28}" >o 2>e &&
182
test '"$D"' = $(cat o) &&
183
test "warning: Log .git/logs/'"$m unexpectedly ended on $ld"'." = "$(cat e)"'
184
@@ -188,26 +188,26 @@ rm -f .git/$m .git/logs/$m expect
188
test_expect_success \
189
'creating initial files' \
190
'echo TEST >F &&
191
- git-add F &&
191
+ git add F &&
192
GIT_AUTHOR_DATE="2005-05-26 23:30" \
193
GIT_COMMITTER_DATE="2005-05-26 23:30" git-commit -m add -a &&
194
- h_TEST=$(git-rev-parse --verify HEAD)
194
+ h_TEST=$(git rev-parse --verify HEAD)
195
echo The other day this did not work. >M &&
196
echo And then Bob told me how to fix it. >>M &&
197
echo OTHER >F &&
198
GIT_AUTHOR_DATE="2005-05-26 23:41" \
199
GIT_COMMITTER_DATE="2005-05-26 23:41" git-commit -F M -a &&
200
- h_OTHER=$(git-rev-parse --verify HEAD) &&
200
+ h_OTHER=$(git rev-parse --verify HEAD) &&
201
echo FIXED >F &&
202
GIT_AUTHOR_DATE="2005-05-26 23:44" \
203
GIT_COMMITTER_DATE="2005-05-26 23:44" git-commit --amend &&
204
- h_FIXED=$(git-rev-parse --verify HEAD) &&
204
+ h_FIXED=$(git rev-parse --verify HEAD) &&
205
echo TEST+FIXED >F &&
206
echo Merged initial commit and a later commit. >M &&
207
echo $h_TEST >.git/MERGE_HEAD &&
208
GIT_AUTHOR_DATE="2005-05-26 23:45" \
209
GIT_COMMITTER_DATE="2005-05-26 23:45" git-commit -F M &&
210
- h_MERGED=$(git-rev-parse --verify HEAD)
210
+ h_MERGED=$(git rev-parse --verify HEAD)
211
rm -f M'
212
213
cat >expect <<EOF
@@ -222,13 +222,13 @@ test_expect_success \
222
unset h_TEST h_OTHER h_FIXED h_MERGED
223
224
test_expect_success \
225
- 'git-cat-file blob master:F (expect OTHER)' \
226
- 'test OTHER = $(git-cat-file blob master:F)'
225
+ 'git cat-file blob master:F (expect OTHER)' \
226
+ 'test OTHER = $(git cat-file blob master:F)'
227
test_expect_success \
228
- 'git-cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' \
229
- 'test TEST = $(git-cat-file blob "master@{2005-05-26 23:30}:F")'
228
+ 'git cat-file blob master@{2005-05-26 23:30}:F (expect TEST)' \
229
+ 'test TEST = $(git cat-file blob "master@{2005-05-26 23:30}:F")'
230
test_expect_success \
231
- 'git-cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' \
232
- 'test OTHER = $(git-cat-file blob "master@{2005-05-26 23:42}:F")'
231
+ 'git cat-file blob master@{2005-05-26 23:42}:F (expect OTHER)' \
232
+ 'test OTHER = $(git cat-file blob "master@{2005-05-26 23:42}:F")'
233
234
test_done
t/t2000-checkout-cache-clash.sh
+9
-9
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-checkout-index test.
6
+test_description='git checkout-index test.
7
8
This test registers the following filesystem structure in the
9
cache:
@@ -16,7 +16,7 @@ And then tries to checkout in a work tree that has the following:
16
path0/file0 - a file in a directory
17
path1 - a file
18
19
-The git-checkout-index command should fail when attempting to checkout
19
+The git checkout-index command should fail when attempting to checkout
20
path0, finding it is occupied by a directory, and path1/file1, finding
21
path1 is occupied by a non-directory. With "-f" flag, it should remove
22
the conflicting paths and succeed.
@@ -28,8 +28,8 @@ mkdir path1
28
date >path1/file1
29
30
test_expect_success \
31
- 'git-update-index --add various paths.' \
32
- 'git-update-index --add path0 path1/file1'
31
+ 'git update-index --add various paths.' \
32
+ 'git update-index --add path0 path1/file1'
33
34
rm -fr path0 path1
35
mkdir path0
@@ -37,15 +37,15 @@ date >path0/file0
37
date >path1
38
39
test_expect_failure \
40
- 'git-checkout-index without -f should fail on conflicting work tree.' \
41
- 'git-checkout-index -a'
40
+ 'git checkout-index without -f should fail on conflicting work tree.' \
41
+ 'git checkout-index -a'
42
43
test_expect_success \
44
- 'git-checkout-index with -f should succeed.' \
45
- 'git-checkout-index -f -a'
44
+ 'git checkout-index with -f should succeed.' \
45
+ 'git checkout-index -f -a'
46
47
test_expect_success \
48
- 'git-checkout-index conflicting paths.' \
48
+ 'git checkout-index conflicting paths.' \
49
'test -f path0 && test -d path1 && test -f path1/file1'
50
51
test_done
t/t2001-checkout-cache-clash.sh
+17
-17
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-checkout-index test.
6
+test_description='git checkout-index test.
7
8
This test registers the following filesystem structure in the cache:
9
@@ -26,46 +26,46 @@ show_files() {
26
find path? -ls |
27
sed -e 's/^[0-9]* * [0-9]* * \([-bcdl]\)[^ ]* *[0-9]* *[^ ]* *[^ ]* *[0-9]* [A-Z][a-z][a-z] [0-9][0-9] [^ ]* /fs: \1 /'
28
# what's in the cache, just mode and name
29
- git-ls-files --stage |
29
+ git ls-files --stage |
30
sed -e 's/^\([0-9]*\) [0-9a-f]* [0-3] /ca: \1 /'
31
# what's in the tree, just mode and name.
32
- git-ls-tree -r "$1" |
32
+ git ls-tree -r "$1" |
33
sed -e 's/^\([0-9]*\) [^ ]* [0-9a-f]* /tr: \1 /'
34
}
35
36
mkdir path0
37
date >path0/file0
38
test_expect_success \
39
- 'git-update-index --add path0/file0' \
40
- 'git-update-index --add path0/file0'
39
+ 'git update-index --add path0/file0' \
40
+ 'git update-index --add path0/file0'
41
test_expect_success \
42
- 'writing tree out with git-write-tree' \
43
- 'tree1=$(git-write-tree)'
42
+ 'writing tree out with git write-tree' \
43
+ 'tree1=$(git write-tree)'
44
test_debug 'show_files $tree1'
45
46
mkdir path1
47
date >path1/file1
48
test_expect_success \
49
- 'git-update-index --add path1/file1' \
50
- 'git-update-index --add path1/file1'
49
+ 'git update-index --add path1/file1' \
50
+ 'git update-index --add path1/file1'
51
test_expect_success \
52
- 'writing tree out with git-write-tree' \
53
- 'tree2=$(git-write-tree)'
52
+ 'writing tree out with git write-tree' \
53
+ 'tree2=$(git write-tree)'
54
test_debug 'show_files $tree2'
55
56
rm -fr path1
57
test_expect_success \
58
'read previously written tree and checkout.' \
59
- 'git-read-tree -m $tree1 && git-checkout-index -f -a'
59
+ 'git read-tree -m $tree1 && git checkout-index -f -a'
60
test_debug 'show_files $tree1'
61
62
ln -s path0 path1
63
test_expect_success \
64
- 'git-update-index --add a symlink.' \
65
- 'git-update-index --add path1'
64
+ 'git update-index --add a symlink.' \
65
+ 'git update-index --add path1'
66
test_expect_success \
67
- 'writing tree out with git-write-tree' \
68
- 'tree3=$(git-write-tree)'
67
+ 'writing tree out with git write-tree' \
68
+ 'tree3=$(git write-tree)'
69
test_debug 'show_files $tree3'
70
71
# Morten says "Got that?" here.
@@ -73,7 +73,7 @@ test_debug 'show_files $tree3'
73
74
test_expect_success \
75
'read previously written tree and checkout.' \
76
- 'git-read-tree $tree2 && git-checkout-index -f -a'
76
+ 'git read-tree $tree2 && git checkout-index -f -a'
77
test_debug 'show_files $tree2'
78
79
test_expect_success \
t/t2002-checkout-cache-u.sh
+13
-13
@@ -3,31 +3,31 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-checkout-index -u test.
6
+test_description='git checkout-index -u test.
7
8
-With -u flag, git-checkout-index internally runs the equivalent of
9
-git-update-index --refresh on the checked out entry.'
8
+With -u flag, git checkout-index internally runs the equivalent of
9
+git update-index --refresh on the checked out entry.'
10
11
. ./test-lib.sh
12
13
test_expect_success \
14
'preparation' '
15
echo frotz >path0 &&
16
-git-update-index --add path0 &&
17
-t=$(git-write-tree)'
16
+git update-index --add path0 &&
17
+t=$(git write-tree)'
18
19
test_expect_failure \
20
-'without -u, git-checkout-index smudges stat information.' '
20
+'without -u, git checkout-index smudges stat information.' '
21
rm -f path0 &&
22
-git-read-tree $t &&
23
-git-checkout-index -f -a &&
24
-git-diff-files | diff - /dev/null'
22
+git read-tree $t &&
23
+git checkout-index -f -a &&
24
+git diff-files | diff - /dev/null'
25
26
test_expect_success \
27
-'with -u, git-checkout-index picks up stat information from new files.' '
27
+'with -u, git checkout-index picks up stat information from new files.' '
28
rm -f path0 &&
29
-git-read-tree $t &&
30
-git-checkout-index -u -f -a &&
31
-git-diff-files | diff - /dev/null'
29
+git read-tree $t &&
30
+git checkout-index -u -f -a &&
31
+git diff-files | diff - /dev/null'
32
33
test_done
t/t2003-checkout-cache-mkdir.sh
+9
-9
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-checkout-index --prefix test.
6
+test_description='git checkout-index --prefix test.
7
8
This test makes sure that --prefix option works as advertised, and
9
also verifies that such leading path may contain symlinks, unlike
@@ -17,14 +17,14 @@ test_expect_success \
17
'mkdir path1 &&
18
echo frotz >path0 &&
19
echo rezrov >path1/file1 &&
20
- git-update-index --add path0 path1/file1'
20
+ git update-index --add path0 path1/file1'
21
22
test_expect_success \
23
'have symlink in place where dir is expected.' \
24
'rm -fr path0 path1 &&
25
mkdir path2 &&
26
ln -s path2 path1 &&
27
- git-checkout-index -f -a &&
27
+ git checkout-index -f -a &&
28
test ! -h path1 && test -d path1 &&
29
test -f path1/file1 && test ! -f path2/file1'
30
@@ -32,7 +32,7 @@ test_expect_success \
32
'use --prefix=path2/' \
33
'rm -fr path0 path1 path2 &&
34
mkdir path2 &&
35
- git-checkout-index --prefix=path2/ -f -a &&
35
+ git checkout-index --prefix=path2/ -f -a &&
36
test -f path2/path0 &&
37
test -f path2/path1/file1 &&
38
test ! -f path0 &&
@@ -41,7 +41,7 @@ test_expect_success \
41
test_expect_success \
42
'use --prefix=tmp-' \
43
'rm -fr path0 path1 path2 tmp* &&
44
- git-checkout-index --prefix=tmp- -f -a &&
44
+ git checkout-index --prefix=tmp- -f -a &&
45
test -f tmp-path0 &&
46
test -f tmp-path1/file1 &&
47
test ! -f path0 &&
@@ -52,7 +52,7 @@ test_expect_success \
52
'rm -fr path0 path1 path2 tmp* &&
53
echo nitfol >tmp-path1 &&
54
mkdir tmp-path0 &&
55
- git-checkout-index --prefix=tmp- -f -a &&
55
+ git checkout-index --prefix=tmp- -f -a &&
56
test -f tmp-path0 &&
57
test -f tmp-path1/file1 &&
58
test ! -f path0 &&
@@ -64,7 +64,7 @@ test_expect_success \
64
'rm -fr path0 path1 path2 tmp* &&
65
mkdir tmp1 tmp1/orary &&
66
ln -s tmp1 tmp &&
67
- git-checkout-index --prefix=tmp/orary/ -f -a &&
67
+ git checkout-index --prefix=tmp/orary/ -f -a &&
68
test -d tmp1/orary &&
69
test -f tmp1/orary/path0 &&
70
test -f tmp1/orary/path1/file1 &&
@@ -76,7 +76,7 @@ test_expect_success \
76
'rm -fr path0 path1 path2 tmp* &&
77
mkdir tmp1 &&
78
ln -s tmp1 tmp &&
79
- git-checkout-index --prefix=tmp/orary- -f -a &&
79
+ git checkout-index --prefix=tmp/orary- -f -a &&
80
test -f tmp1/orary-path0 &&
81
test -f tmp1/orary-path1/file1 &&
82
test -h tmp'
@@ -87,7 +87,7 @@ test_expect_success \
87
'rm -fr path0 path1 path2 tmp* &&
88
mkdir tmp1 &&
89
ln -s tmp1 tmp-path1 &&
90
- git-checkout-index --prefix=tmp- -f -a &&
90
+ git checkout-index --prefix=tmp- -f -a &&
91
test -f tmp-path0 &&
92
test ! -h tmp-path1 &&
93
test -d tmp-path1 &&
t/t2004-checkout-cache-temp.sh
+24
-24
@@ -3,9 +3,9 @@
3
# Copyright (c) 2006 Shawn Pearce
4
#
5
6
-test_description='git-checkout-index --temp test.
6
+test_description='git checkout-index --temp test.
7
8
-With --temp flag, git-checkout-index writes to temporary merge files
8
+With --temp flag, git checkout-index writes to temporary merge files
9
rather than the tracked path.'
10
11
. ./test-lib.sh
@@ -18,28 +18,28 @@ echo tree1path1 >path1 &&
18
echo tree1path3 >path3 &&
19
echo tree1path4 >path4 &&
20
echo tree1asubdir/path5 >asubdir/path5 &&
21
-git-update-index --add path0 path1 path3 path4 asubdir/path5 &&
22
-t1=$(git-write-tree) &&
21
+git update-index --add path0 path1 path3 path4 asubdir/path5 &&
22
+t1=$(git write-tree) &&
23
rm -f path* .merge_* out .git/index &&
24
echo tree2path0 >path0 &&
25
echo tree2path1 >path1 &&
26
echo tree2path2 >path2 &&
27
echo tree2path4 >path4 &&
28
-git-update-index --add path0 path1 path2 path4 &&
29
-t2=$(git-write-tree) &&
28
+git update-index --add path0 path1 path2 path4 &&
29
+t2=$(git write-tree) &&
30
rm -f path* .merge_* out .git/index &&
31
echo tree2path0 >path0 &&
32
echo tree3path1 >path1 &&
33
echo tree3path2 >path2 &&
34
echo tree3path3 >path3 &&
35
-git-update-index --add path0 path1 path2 path3 &&
36
-t3=$(git-write-tree)'
35
+git update-index --add path0 path1 path2 path3 &&
36
+t3=$(git write-tree)'
37
38
test_expect_success \
39
'checkout one stage 0 to temporary file' '
40
rm -f path* .merge_* out .git/index &&
41
-git-read-tree $t1 &&
42
-git-checkout-index --temp -- path1 >out &&
41
+git read-tree $t1 &&
42
+git checkout-index --temp -- path1 >out &&
43
test $(wc -l <out) = 1 &&
44
test $(cut "-d " -f2 out) = path1 &&
45
p=$(cut "-d " -f1 out) &&
@@ -49,8 +49,8 @@ test $(cat $p) = tree1path1'
49
test_expect_success \
50
'checkout all stage 0 to temporary files' '
51
rm -f path* .merge_* out .git/index &&
52
-git-read-tree $t1 &&
53
-git-checkout-index -a --temp >out &&
52
+git read-tree $t1 &&
53
+git checkout-index -a --temp >out &&
54
test $(wc -l <out) = 5 &&
55
for f in path0 path1 path3 path4 asubdir/path5
56
do
@@ -63,12 +63,12 @@ done'
63
test_expect_success \
64
'prepare 3-way merge' '
65
rm -f path* .merge_* out .git/index &&
66
-git-read-tree -m $t1 $t2 $t3'
66
+git read-tree -m $t1 $t2 $t3'
67
68
test_expect_success \
69
'checkout one stage 2 to temporary file' '
70
rm -f path* .merge_* out &&
71
-git-checkout-index --stage=2 --temp -- path1 >out &&
71
+git checkout-index --stage=2 --temp -- path1 >out &&
72
test $(wc -l <out) = 1 &&
73
test $(cut "-d " -f2 out) = path1 &&
74
p=$(cut "-d " -f1 out) &&
@@ -78,7 +78,7 @@ test $(cat $p) = tree2path1'
78
test_expect_success \
79
'checkout all stage 2 to temporary files' '
80
rm -f path* .merge_* out &&
81
-git-checkout-index --all --stage=2 --temp >out &&
81
+git checkout-index --all --stage=2 --temp >out &&
82
test $(wc -l <out) = 3 &&
83
for f in path1 path2 path4
84
do
@@ -91,13 +91,13 @@ done'
91
test_expect_success \
92
'checkout all stages/one file to nothing' '
93
rm -f path* .merge_* out &&
94
-git-checkout-index --stage=all --temp -- path0 >out &&
94
+git checkout-index --stage=all --temp -- path0 >out &&
95
test $(wc -l <out) = 0'
96
97
test_expect_success \
98
'checkout all stages/one file to temporary files' '
99
rm -f path* .merge_* out &&
100
-git-checkout-index --stage=all --temp -- path1 >out &&
100
+git checkout-index --stage=all --temp -- path1 >out &&
101
test $(wc -l <out) = 1 &&
102
test $(cut "-d " -f2 out) = path1 &&
103
cut "-d " -f1 out | (read s1 s2 s3 &&
@@ -111,7 +111,7 @@ test $(cat $s3) = tree3path1)'
111
test_expect_success \
112
'checkout some stages/one file to temporary files' '
113
rm -f path* .merge_* out &&
114
-git-checkout-index --stage=all --temp -- path2 >out &&
114
+git checkout-index --stage=all --temp -- path2 >out &&
115
test $(wc -l <out) = 1 &&
116
test $(cut "-d " -f2 out) = path2 &&
117
cut "-d " -f1 out | (read s1 s2 s3 &&
@@ -124,7 +124,7 @@ test $(cat $s3) = tree3path2)'
124
test_expect_success \
125
'checkout all stages/all files to temporary files' '
126
rm -f path* .merge_* out &&
127
-git-checkout-index -a --stage=all --temp >out &&
127
+git checkout-index -a --stage=all --temp >out &&
128
test $(wc -l <out) = 5'
129
130
test_expect_success \
@@ -184,7 +184,7 @@ test $(cat $s1) = tree1asubdir/path5)'
184
test_expect_success \
185
'checkout --temp within subdir' '
186
(cd asubdir &&
187
- git-checkout-index -a --stage=all >out &&
187
+ git checkout-index -a --stage=all >out &&
188
test $(wc -l <out) = 1 &&
189
test $(grep path5 out | cut "-d " -f2) = path5 &&
190
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
@@ -198,11 +198,11 @@ test_expect_success \
198
'checkout --temp symlink' '
199
rm -f path* .merge_* out .git/index &&
200
ln -s b a &&
201
-git-update-index --add a &&
202
-t4=$(git-write-tree) &&
201
+git update-index --add a &&
202
+t4=$(git write-tree) &&
203
rm -f .git/index &&
204
-git-read-tree $t4 &&
205
-git-checkout-index --temp -a >out &&
204
+git read-tree $t4 &&
205
+git checkout-index --temp -a >out &&
206
test $(wc -l <out) = 1 &&
207
test $(cut "-d " -f2 out) = a &&
208
p=$(cut "-d " -f1 out) &&
t/t2005-checkout-index-symlinks.sh
+5
-5
@@ -3,22 +3,22 @@
3
# Copyright (c) 2007 Johannes Sixt
4
#
5
6
-test_description='git-checkout-index on filesystem w/o symlinks test.
6
+test_description='git checkout-index on filesystem w/o symlinks test.
7
8
-This tests that git-checkout-index creates a symbolic link as a plain
8
+This tests that git checkout-index creates a symbolic link as a plain
9
file if core.symlinks is false.'
10
11
. ./test-lib.sh
12
13
test_expect_success \
14
'preparation' '
15
-git-config core.symlinks false &&
15
+git config core.symlinks false &&
16
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
17
-echo "120000 $l symlink" | git-update-index --index-info'
17
+echo "120000 $l symlink" | git update-index --index-info'
18
19
test_expect_success \
20
'the checked-out symlink must be a file' '
21
-git-checkout-index symlink &&
21
+git checkout-index symlink &&
22
test -f symlink'
23
24
test_expect_success \
t/t2100-update-cache-badpath.sh
+6
-6
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-update-index nonsense-path test.
6
+test_description='git update-index nonsense-path test.
7
8
This test creates the following structure in the cache:
9
@@ -12,7 +12,7 @@ This test creates the following structure in the cache:
12
path2/file2 - a file in a directory
13
path3/file3 - a file in a directory
14
15
-and tries to git-update-index --add the following:
15
+and tries to git update-index --add the following:
16
17
path0/file0 - a file in a directory
18
path1/file1 - a file in a directory
@@ -31,8 +31,8 @@ date >path2/file2
31
date >path3/file3
32
33
test_expect_success \
34
- 'git-update-index --add to add various paths.' \
35
- 'git-update-index --add -- path0 path1 path2/file2 path3/file3'
34
+ 'git update-index --add to add various paths.' \
35
+ 'git update-index --add -- path0 path1 path2/file2 path3/file3'
36
37
rm -fr path?
38
@@ -45,7 +45,7 @@ date >path1/file1
45
for p in path0/file0 path1/file1 path2 path3
46
do
47
test_expect_failure \
48
- "git-update-index to add conflicting path $p should fail." \
49
- "git-update-index --add -- $p"
48
+ "git update-index to add conflicting path $p should fail." \
49
+ "git update-index --add -- $p"
50
done
51
test_done
t/t2101-update-index-reupdate.sh
+14
-14
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Junio C Hamano
4
#
5
6
-test_description='git-update-index --again test.
6
+test_description='git update-index --again test.
7
'
8
9
. ./test-lib.sh
@@ -15,29 +15,29 @@ EOF
15
test_expect_success 'update-index --add' \
16
'echo hello world >file1 &&
17
echo goodbye people >file2 &&
18
- git-update-index --add file1 file2 &&
19
- git-ls-files -s >current &&
18
+ git update-index --add file1 file2 &&
19
+ git ls-files -s >current &&
20
cmp current expected'
21
22
test_expect_success 'update-index --again' \
23
'rm -f file1 &&
24
echo hello everybody >file2 &&
25
- if git-update-index --again
25
+ if git update-index --again
26
then
27
echo should have refused to remove file1
28
exit 1
29
else
30
echo happy - failed as expected
31
fi &&
32
- git-ls-files -s >current &&
32
+ git ls-files -s >current &&
33
cmp current expected'
34
35
cat > expected <<\EOF
36
100644 0f1ae1422c2bf43f117d3dbd715c988a9ed2103f 0 file2
37
EOF
38
test_expect_success 'update-index --remove --again' \
39
- 'git-update-index --remove --again &&
40
- git-ls-files -s >current &&
39
+ 'git update-index --remove --again &&
40
+ git ls-files -s >current &&
41
cmp current expected'
42
43
test_expect_success 'first commit' 'git-commit -m initial'
@@ -50,11 +50,11 @@ test_expect_success 'update-index again' \
50
'mkdir -p dir1 &&
51
echo hello world >dir1/file3 &&
52
echo goodbye people >file2 &&
53
- git-update-index --add file2 dir1/file3 &&
53
+ git update-index --add file2 dir1/file3 &&
54
echo hello everybody >file2
55
echo happy >dir1/file3 &&
56
- git-update-index --again &&
57
- git-ls-files -s >current &&
56
+ git update-index --again &&
57
+ git ls-files -s >current &&
58
cmp current expected'
59
60
cat > expected <<\EOF
@@ -65,9 +65,9 @@ test_expect_success 'update-index --update from subdir' \
65
'echo not so happy >file2 &&
66
cd dir1 &&
67
cat ../file2 >file3 &&
68
- git-update-index --again &&
68
+ git update-index --again &&
69
cd .. &&
70
- git-ls-files -s >current &&
70
+ git ls-files -s >current &&
71
cmp current expected'
72
73
cat > expected <<\EOF
@@ -77,8 +77,8 @@ EOF
77
test_expect_success 'update-index --update with pathspec' \
78
'echo very happy >file2 &&
79
cat file2 >dir1/file3 &&
80
- git-update-index --again dir1/ &&
81
- git-ls-files -s >current &&
80
+ git update-index --again dir1/ &&
81
+ git ls-files -s >current &&
82
cmp current expected'
83
84
test_done
t/t2102-update-index-symlinks.sh
+7
-7
@@ -3,29 +3,29 @@
3
# Copyright (c) 2007 Johannes Sixt
4
#
5
6
-test_description='git-update-index on filesystem w/o symlinks test.
6
+test_description='git update-index on filesystem w/o symlinks test.
7
8
-This tests that git-update-index keeps the symbolic link property
8
+This tests that git update-index keeps the symbolic link property
9
even if a plain file is in the working tree if core.symlinks is false.'
10
11
. ./test-lib.sh
12
13
test_expect_success \
14
'preparation' '
15
-git-config core.symlinks false &&
15
+git config core.symlinks false &&
16
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
17
-echo "120000 $l symlink" | git-update-index --index-info'
17
+echo "120000 $l symlink" | git update-index --index-info'
18
19
test_expect_success \
20
'modify the symbolic link' '
21
echo -n new-file > symlink &&
22
-git-update-index symlink'
22
+git update-index symlink'
23
24
test_expect_success \
25
'the index entry must still be a symbolic link' '
26
-case "`git-ls-files --stage --cached symlink`" in
26
+case "`git ls-files --stage --cached symlink`" in
27
120000" "*symlink) echo ok;;
28
-*) echo fail; git-ls-files --stage --cached symlink; (exit 1);;
28
+*) echo fail; git ls-files --stage --cached symlink; (exit 1);;
29
esac'
30
31
test_done
t/t2200-add-update.sh
+7
-7
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-add -u with path limiting
3
+test_description='git add -u with path limiting
4
5
This test creates a working tree state with three files:
6
@@ -8,7 +8,7 @@ This test creates a working tree state with three files:
8
dir/sub (previously committed, modified)
9
dir/other (untracked)
10
11
-and issues a git-add -u with path limiting on "dir" to add
11
+and issues a git add -u with path limiting on "dir" to add
12
only the updates to dir/sub.'
13
14
. ./test-lib.sh
@@ -17,22 +17,22 @@ test_expect_success 'setup' '
17
echo initial >top &&
18
mkdir dir &&
19
echo initial >dir/sub &&
20
-git-add dir/sub top &&
20
+git add dir/sub top &&
21
git-commit -m initial &&
22
echo changed >top &&
23
echo changed >dir/sub &&
24
echo other >dir/other
25
'
26
27
-test_expect_success 'update' 'git-add -u dir'
27
+test_expect_success 'update' 'git add -u dir'
28
29
test_expect_success 'update touched correct path' \
30
- 'test "`git-diff-files --name-status dir/sub`" = ""'
30
+ 'test "`git diff-files --name-status dir/sub`" = ""'
31
32
test_expect_success 'update did not touch other tracked files' \
33
- 'test "`git-diff-files --name-status top`" = "M top"'
33
+ 'test "`git diff-files --name-status top`" = "M top"'
34
35
test_expect_success 'update did not touch untracked files' \
36
- 'test "`git-diff-files --name-status dir/other`" = ""'
36
+ 'test "`git diff-files --name-status dir/other`" = ""'
37
38
test_done
t/t3000-ls-files-others.sh
+9
-9
@@ -3,9 +3,9 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-ls-files test (--others should pick up symlinks).
6
+test_description='git ls-files test (--others should pick up symlinks).
7
8
-This test runs git-ls-files --others with the following on the
8
+This test runs git ls-files --others with the following on the
9
filesystem.
10
11
path0 - a file
@@ -23,7 +23,7 @@ date >path2/file2
23
date >path2-junk
24
date >path3/file3
25
date >path3-junk
26
-git-update-index --add path3-junk path3/file3
26
+git update-index --add path3-junk path3/file3
27
28
cat >expected1 <<EOF
29
expected1
@@ -37,20 +37,20 @@ EOF
37
sed -e 's|path2/file2|path2/|' <expected1 >expected2
38
39
test_expect_success \
40
- 'git-ls-files --others to show output.' \
41
- 'git-ls-files --others >output'
40
+ 'git ls-files --others to show output.' \
41
+ 'git ls-files --others >output'
42
43
test_expect_success \
44
- 'git-ls-files --others should pick up symlinks.' \
44
+ 'git ls-files --others should pick up symlinks.' \
45
'diff output expected1'
46
47
test_expect_success \
48
- 'git-ls-files --others --directory to show output.' \
49
- 'git-ls-files --others --directory >output'
48
+ 'git ls-files --others --directory to show output.' \
49
+ 'git ls-files --others --directory >output'
50
51
52
test_expect_success \
53
- 'git-ls-files --others --directory should not get confused.' \
53
+ 'git ls-files --others --directory should not get confused.' \
54
'diff output expected2'
55
56
test_done
t/t3001-ls-files-others-exclude.sh
+8
-8
@@ -3,9 +3,9 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-ls-files --others --exclude
6
+test_description='git ls-files --others --exclude
7
8
-This test runs git-ls-files --others and tests --exclude patterns.
8
+This test runs git ls-files --others and tests --exclude patterns.
9
'
10
11
. ./test-lib.sh
@@ -59,8 +59,8 @@ echo '!*.2
59
!*.8' >one/two/.gitignore
60
61
test_expect_success \
62
- 'git-ls-files --others with various exclude options.' \
63
- 'git-ls-files --others \
62
+ 'git ls-files --others with various exclude options.' \
63
+ 'git ls-files --others \
64
--exclude=\*.6 \
65
--exclude-per-directory=.gitignore \
66
--exclude-from=.git/ignore \
@@ -71,8 +71,8 @@ test_expect_success \
71
printf '*.1\r\n/*.3\r\n!*.6\r\n' >.gitignore
72
73
test_expect_success \
74
- 'git-ls-files --others with \r\n line endings.' \
75
- 'git-ls-files --others \
74
+ 'git ls-files --others with \r\n line endings.' \
75
+ 'git ls-files --others \
76
--exclude=\*.6 \
77
--exclude-per-directory=.gitignore \
78
--exclude-from=.git/ignore \
@@ -84,9 +84,9 @@ cat > excludes-file << EOF
84
e*
85
EOF
86
87
-git-config core.excludesFile excludes-file
87
+git config core.excludesFile excludes-file
88
89
-git-runstatus | grep "^# " > output
89
+git runstatus | grep "^# " > output
90
91
cat > expect << EOF
92
# .gitignore
t/t3002-ls-files-dashpath.sh
+12
-12
@@ -3,9 +3,9 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-ls-files test (-- to terminate the path list).
6
+test_description='git ls-files test (-- to terminate the path list).
7
8
-This test runs git-ls-files --others with the following on the
8
+This test runs git ls-files --others with the following on the
9
filesystem.
10
11
path0 - a file
@@ -21,8 +21,8 @@ test_expect_success \
21
echo frotz >./--'
22
23
test_expect_success \
24
- 'git-ls-files without path restriction.' \
25
- 'git-ls-files --others >output &&
24
+ 'git ls-files without path restriction.' \
25
+ 'git ls-files --others >output &&
26
git diff output - <<EOF
27
--
28
-foo
@@ -32,32 +32,32 @@ EOF
32
'
33
34
test_expect_success \
35
- 'git-ls-files with path restriction.' \
36
- 'git-ls-files --others path0 >output &&
35
+ 'git ls-files with path restriction.' \
36
+ 'git ls-files --others path0 >output &&
37
git diff output - <<EOF
38
path0
39
EOF
40
'
41
42
test_expect_success \
43
- 'git-ls-files with path restriction with --.' \
44
- 'git-ls-files --others -- path0 >output &&
43
+ 'git ls-files with path restriction with --.' \
44
+ 'git ls-files --others -- path0 >output &&
45
git diff output - <<EOF
46
path0
47
EOF
48
'
49
50
test_expect_success \
51
- 'git-ls-files with path restriction with -- --.' \
52
- 'git-ls-files --others -- -- >output &&
51
+ 'git ls-files with path restriction with -- --.' \
52
+ 'git ls-files --others -- -- >output &&
53
git diff output - <<EOF
54
--
55
EOF
56
'
57
58
test_expect_success \
59
- 'git-ls-files with no path restriction.' \
60
- 'git-ls-files --others -- >output &&
59
+ 'git ls-files with no path restriction.' \
60
+ 'git ls-files --others -- >output &&
61
git diff output - <<EOF
62
--
63
-foo
t/t3010-ls-files-killed-modified.sh
+10
-10
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-ls-files -k and -m flags test.
6
+test_description='git ls-files -k and -m flags test.
7
8
This test prepares the following in the cache:
9
@@ -22,7 +22,7 @@ and the following on the filesystem:
22
path5 - a symlink
23
path6/file6 - a file in a directory
24
25
-git-ls-files -k should report that existing filesystem
25
+git ls-files -k should report that existing filesystem
26
objects except path4, path5 and path6/file6 to be killed.
27
28
Also for modification test, the cache and working tree have:
@@ -47,8 +47,8 @@ date >path8
47
: >path9
48
date >path10
49
test_expect_success \
50
- 'git-update-index --add to add various paths.' \
51
- "git-update-index --add -- path0 path1 path?/file? path7 path8 path9 path10"
50
+ 'git update-index --add to add various paths.' \
51
+ "git update-index --add -- path0 path1 path?/file? path7 path8 path9 path10"
52
53
rm -fr path? ;# leave path10 alone
54
date >path2
@@ -64,8 +64,8 @@ date >path7
64
touch path10
65
66
test_expect_success \
67
- 'git-ls-files -k to show killed files.' \
68
- 'git-ls-files -k >.output'
67
+ 'git ls-files -k to show killed files.' \
68
+ 'git ls-files -k >.output'
69
cat >.expected <<EOF
70
path0/file0
71
path1/file1
@@ -74,12 +74,12 @@ path3
74
EOF
75
76
test_expect_success \
77
- 'validate git-ls-files -k output.' \
77
+ 'validate git ls-files -k output.' \
78
'diff .output .expected'
79
80
test_expect_success \
81
- 'git-ls-files -m to show modified files.' \
82
- 'git-ls-files -m >.output'
81
+ 'git ls-files -m to show modified files.' \
82
+ 'git ls-files -m >.output'
83
cat >.expected <<EOF
84
path0
85
path1
@@ -90,7 +90,7 @@ path8
90
EOF
91
92
test_expect_success \
93
- 'validate git-ls-files -m output.' \
93
+ 'validate git ls-files -m output.' \
94
'diff .output .expected'
95
96
test_done
t/t3020-ls-files-error-unmatch.sh
+7
-7
@@ -3,25 +3,25 @@
3
# Copyright (c) 2006 Carl D. Worth
4
#
5
6
-test_description='git-ls-files test for --error-unmatch option
6
+test_description='git ls-files test for --error-unmatch option
7
8
-This test runs git-ls-files --error-unmatch to ensure it correctly
8
+This test runs git ls-files --error-unmatch to ensure it correctly
9
returns an error when a non-existent path is provided on the command
10
line.
11
'
12
. ./test-lib.sh
13
14
touch foo bar
15
-git-update-index --add foo bar
15
+git update-index --add foo bar
16
git-commit -m "add foo bar"
17
18
test_expect_failure \
19
- 'git-ls-files --error-unmatch should fail with unmatched path.' \
20
- 'git-ls-files --error-unmatch foo bar-does-not-match'
19
+ 'git ls-files --error-unmatch should fail with unmatched path.' \
20
+ 'git ls-files --error-unmatch foo bar-does-not-match'
21
22
test_expect_success \
23
- 'git-ls-files --error-unmatch should succeed eith matched paths.' \
24
- 'git-ls-files --error-unmatch foo bar'
23
+ 'git ls-files --error-unmatch should succeed eith matched paths.' \
24
+ 'git ls-files --error-unmatch foo bar'
25
26
test_done
27
1
t/t3100-ls-tree-restrict.sh
+16
-16
@@ -3,9 +3,9 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-ls-tree test.
6
+test_description='git ls-tree test.
7
8
-This test runs git-ls-tree with the following in a tree.
8
+This test runs git ls-tree with the following in a tree.
9
10
path0 - a file
11
path1 - a symlink
@@ -27,8 +27,8 @@ test_expect_success \
27
ln -s ../path1 path2/bazbo &&
28
echo Mi >path2/baz/b &&
29
find path? \( -type f -o -type l \) -print |
30
- xargs git-update-index --add &&
31
- tree=`git-write-tree` &&
30
+ xargs git update-index --add &&
31
+ tree=`git write-tree` &&
32
echo $tree'
33
34
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
@@ -40,7 +40,7 @@ test_output () {
40
41
test_expect_success \
42
'ls-tree plain' \
43
- 'git-ls-tree $tree >current &&
43
+ 'git ls-tree $tree >current &&
44
cat >expected <<\EOF &&
45
100644 blob X path0
46
120000 blob X path1
@@ -50,7 +50,7 @@ EOF
50
51
test_expect_success \
52
'ls-tree recursive' \
53
- 'git-ls-tree -r $tree >current &&
53
+ 'git ls-tree -r $tree >current &&
54
cat >expected <<\EOF &&
55
100644 blob X path0
56
120000 blob X path1
@@ -62,7 +62,7 @@ EOF
62
63
test_expect_success \
64
'ls-tree recursive with -t' \
65
- 'git-ls-tree -r -t $tree >current &&
65
+ 'git ls-tree -r -t $tree >current &&
66
cat >expected <<\EOF &&
67
100644 blob X path0
68
120000 blob X path1
@@ -76,7 +76,7 @@ EOF
76
77
test_expect_success \
78
'ls-tree recursive with -d' \
79
- 'git-ls-tree -r -d $tree >current &&
79
+ 'git ls-tree -r -d $tree >current &&
80
cat >expected <<\EOF &&
81
040000 tree X path2
82
040000 tree X path2/baz
@@ -85,7 +85,7 @@ EOF
85
86
test_expect_success \
87
'ls-tree filtered with path' \
88
- 'git-ls-tree $tree path >current &&
88
+ 'git ls-tree $tree path >current &&
89
cat >expected <<\EOF &&
90
EOF
91
test_output'
@@ -95,7 +95,7 @@ EOF
95
# they are shown in canonical order.
96
test_expect_success \
97
'ls-tree filtered with path1 path0' \
98
- 'git-ls-tree $tree path1 path0 >current &&
98
+ 'git ls-tree $tree path1 path0 >current &&
99
cat >expected <<\EOF &&
100
100644 blob X path0
101
120000 blob X path1
@@ -104,7 +104,7 @@ EOF
104
105
test_expect_success \
106
'ls-tree filtered with path0/' \
107
- 'git-ls-tree $tree path0/ >current &&
107
+ 'git ls-tree $tree path0/ >current &&
108
cat >expected <<\EOF &&
109
EOF
110
test_output'
@@ -113,7 +113,7 @@ EOF
113
# with pathspec semantics it shows only path2
114
test_expect_success \
115
'ls-tree filtered with path2' \
116
- 'git-ls-tree $tree path2 >current &&
116
+ 'git ls-tree $tree path2 >current &&
117
cat >expected <<\EOF &&
118
040000 tree X path2
119
EOF
@@ -122,7 +122,7 @@ EOF
122
# ... and path2/ shows the children.
123
test_expect_success \
124
'ls-tree filtered with path2/' \
125
- 'git-ls-tree $tree path2/ >current &&
125
+ 'git ls-tree $tree path2/ >current &&
126
cat >expected <<\EOF &&
127
040000 tree X path2/baz
128
120000 blob X path2/bazbo
@@ -134,7 +134,7 @@ EOF
134
# path2/baz
135
test_expect_success \
136
'ls-tree filtered with path2/baz' \
137
- 'git-ls-tree $tree path2/baz >current &&
137
+ 'git ls-tree $tree path2/baz >current &&
138
cat >expected <<\EOF &&
139
040000 tree X path2/baz
140
EOF
@@ -142,14 +142,14 @@ EOF
142
143
test_expect_success \
144
'ls-tree filtered with path2/bak' \
145
- 'git-ls-tree $tree path2/bak >current &&
145
+ 'git ls-tree $tree path2/bak >current &&
146
cat >expected <<\EOF &&
147
EOF
148
test_output'
149
150
test_expect_success \
151
'ls-tree -t filtered with path2/bak' \
152
- 'git-ls-tree -t $tree path2/bak >current &&
152
+ 'git ls-tree -t $tree path2/bak >current &&
153
cat >expected <<\EOF &&
154
040000 tree X path2
155
EOF
t/t3101-ls-tree-dirname.sh
+12
-12
@@ -4,9 +4,9 @@
4
# Copyright (c) 2005 Robert Fitzsimons
5
#
6
7
-test_description='git-ls-tree directory and filenames handling.
7
+test_description='git ls-tree directory and filenames handling.
8
9
-This test runs git-ls-tree with the following in a tree.
9
+This test runs git ls-tree with the following in a tree.
10
11
1.txt - a file
12
2.txt - a file
@@ -35,8 +35,8 @@ test_expect_success \
35
echo 111 >path3/1.txt &&
36
echo 222 >path3/2.txt &&
37
find *.txt path* \( -type f -o -type l \) -print |
38
- xargs git-update-index --add &&
39
- tree=`git-write-tree` &&
38
+ xargs git update-index --add &&
39
+ tree=`git write-tree` &&
40
echo $tree'
41
42
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
@@ -48,7 +48,7 @@ test_output () {
48
49
test_expect_success \
50
'ls-tree plain' \
51
- 'git-ls-tree $tree >current &&
51
+ 'git ls-tree $tree >current &&
52
cat >expected <<\EOF &&
53
100644 blob X 1.txt
54
100644 blob X 2.txt
@@ -62,7 +62,7 @@ EOF
62
# Recursive does not show tree nodes anymore...
63
test_expect_success \
64
'ls-tree recursive' \
65
- 'git-ls-tree -r $tree >current &&
65
+ 'git ls-tree -r $tree >current &&
66
cat >expected <<\EOF &&
67
100644 blob X 1.txt
68
100644 blob X 2.txt
@@ -76,7 +76,7 @@ EOF
76
77
test_expect_success \
78
'ls-tree filter 1.txt' \
79
- 'git-ls-tree $tree 1.txt >current &&
79
+ 'git ls-tree $tree 1.txt >current &&
80
cat >expected <<\EOF &&
81
100644 blob X 1.txt
82
EOF
@@ -84,7 +84,7 @@ EOF
84
85
test_expect_success \
86
'ls-tree filter path1/b/c/1.txt' \
87
- 'git-ls-tree $tree path1/b/c/1.txt >current &&
87
+ 'git ls-tree $tree path1/b/c/1.txt >current &&
88
cat >expected <<\EOF &&
89
100644 blob X path1/b/c/1.txt
90
EOF
@@ -92,7 +92,7 @@ EOF
92
93
test_expect_success \
94
'ls-tree filter all 1.txt files' \
95
- 'git-ls-tree $tree 1.txt path0/a/b/c/1.txt path1/b/c/1.txt path2/1.txt path3/1.txt >current &&
95
+ 'git ls-tree $tree 1.txt path0/a/b/c/1.txt path1/b/c/1.txt path2/1.txt path3/1.txt >current &&
96
cat >expected <<\EOF &&
97
100644 blob X 1.txt
98
100644 blob X path0/a/b/c/1.txt
@@ -107,7 +107,7 @@ EOF
107
# it behaves as if path0/a/b/c, path1/b/c, path2 and path3 are specified.
108
test_expect_success \
109
'ls-tree filter directories' \
110
- 'git-ls-tree $tree path3 path2 path0/a/b/c path1/b/c path0/a >current &&
110
+ 'git ls-tree $tree path3 path2 path0/a/b/c path1/b/c path0/a >current &&
111
cat >expected <<\EOF &&
112
040000 tree X path0/a/b/c
113
040000 tree X path1/b/c
@@ -120,7 +120,7 @@ EOF
120
# having 1.txt and path3
121
test_expect_success \
122
'ls-tree filter odd names' \
123
- 'git-ls-tree $tree 1.txt /1.txt //1.txt path3/1.txt /path3/1.txt //path3//1.txt path3 /path3/ path3// >current &&
123
+ 'git ls-tree $tree 1.txt /1.txt //1.txt path3/1.txt /path3/1.txt //path3//1.txt path3 /path3/ path3// >current &&
124
cat >expected <<\EOF &&
125
100644 blob X 1.txt
126
100644 blob X path3/1.txt
@@ -130,7 +130,7 @@ EOF
130
131
test_expect_success \
132
'ls-tree filter missing files and extra slashes' \
133
- 'git-ls-tree $tree 1.txt/ abc.txt path3//23.txt path3/2.txt/// >current &&
133
+ 'git ls-tree $tree 1.txt/ abc.txt path3//23.txt path3/2.txt/// >current &&
134
cat >expected <<\EOF &&
135
EOF
136
test_output'
t/t3200-branch.sh
+81
-81
@@ -13,22 +13,22 @@ handled. Specifically, that a bogus branch is not created.
13
test_expect_success \
14
'prepare a trivial repository' \
15
'echo Hello > A &&
16
- git-update-index --add A &&
16
+ git update-index --add A &&
17
git-commit -m "Initial commit." &&
18
- HEAD=$(git-rev-parse --verify HEAD)'
18
+ HEAD=$(git rev-parse --verify HEAD)'
19
20
test_expect_failure \
21
'git branch --help should not have created a bogus branch' \
22
- 'git-branch --help </dev/null >/dev/null 2>/dev/null || :
22
+ 'git branch --help </dev/null >/dev/null 2>/dev/null || :
23
test -f .git/refs/heads/--help'
24
25
test_expect_success \
26
'git branch abc should create a branch' \
27
- 'git-branch abc && test -f .git/refs/heads/abc'
27
+ 'git branch abc && test -f .git/refs/heads/abc'
28
29
test_expect_success \
30
'git branch a/b/c should create a branch' \
31
- 'git-branch a/b/c && test -f .git/refs/heads/a/b/c'
31
+ 'git branch a/b/c && test -f .git/refs/heads/a/b/c'
32
33
cat >expect <<EOF
34
0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
@@ -36,149 +36,149 @@ EOF
36
test_expect_success \
37
'git branch -l d/e/f should create a branch and a log' \
38
'GIT_COMMITTER_DATE="2005-05-26 23:30" \
39
- git-branch -l d/e/f &&
39
+ git branch -l d/e/f &&
40
test -f .git/refs/heads/d/e/f &&
41
test -f .git/logs/refs/heads/d/e/f &&
42
diff expect .git/logs/refs/heads/d/e/f'
43
44
test_expect_success \
45
'git branch -d d/e/f should delete a branch and a log' \
46
- 'git-branch -d d/e/f &&
46
+ 'git branch -d d/e/f &&
47
test ! -f .git/refs/heads/d/e/f &&
48
test ! -f .git/logs/refs/heads/d/e/f'
49
50
test_expect_success \
51
'git branch j/k should work after branch j has been deleted' \
52
- 'git-branch j &&
53
- git-branch -d j &&
54
- git-branch j/k'
52
+ 'git branch j &&
53
+ git branch -d j &&
54
+ git branch j/k'
55
56
test_expect_success \
57
'git branch l should work after branch l/m has been deleted' \
58
- 'git-branch l/m &&
59
- git-branch -d l/m &&
60
- git-branch l'
58
+ 'git branch l/m &&
59
+ git branch -d l/m &&
60
+ git branch l'
61
62
test_expect_success \
63
'git branch -m m m/m should work' \
64
- 'git-branch -l m &&
65
- git-branch -m m m/m &&
64
+ 'git branch -l m &&
65
+ git branch -m m m/m &&
66
test -f .git/logs/refs/heads/m/m'
67
68
test_expect_success \
69
'git branch -m n/n n should work' \
70
- 'git-branch -l n/n &&
71
- git-branch -m n/n n
70
+ 'git branch -l n/n &&
71
+ git branch -m n/n n
72
test -f .git/logs/refs/heads/n'
73
74
test_expect_failure \
75
'git branch -m o/o o should fail when o/p exists' \
76
- 'git-branch o/o &&
77
- git-branch o/p &&
78
- git-branch -m o/o o'
76
+ 'git branch o/o &&
77
+ git branch o/p &&
78
+ git branch -m o/o o'
79
80
test_expect_failure \
81
'git branch -m q r/q should fail when r exists' \
82
- 'git-branch q &&
83
- git-branch r &&
84
- git-branch -m q r/q'
82
+ 'git branch q &&
83
+ git branch r &&
84
+ git branch -m q r/q'
85
86
mv .git/config .git/config-saved
87
88
test_expect_success 'git branch -m q q2 without config should succeed' '
89
- git-branch -m q q2 &&
90
- git-branch -m q2 q
89
+ git branch -m q q2 &&
90
+ git branch -m q2 q
91
'
92
93
mv .git/config-saved .git/config
94
95
-git-config branch.s/s.dummy Hello
95
+git config branch.s/s.dummy Hello
96
97
test_expect_success \
98
'git branch -m s/s s should work when s/t is deleted' \
99
- 'git-branch -l s/s &&
99
+ 'git branch -l s/s &&
100
test -f .git/logs/refs/heads/s/s &&
101
- git-branch -l s/t &&
101
+ git branch -l s/t &&
102
test -f .git/logs/refs/heads/s/t &&
103
- git-branch -d s/t &&
104
- git-branch -m s/s s &&
103
+ git branch -d s/t &&
104
+ git branch -m s/s s &&
105
test -f .git/logs/refs/heads/s'
106
107
test_expect_success 'config information was renamed, too' \
108
- "test $(git-config branch.s.dummy) = Hello &&
109
- ! git-config branch.s/s/dummy"
108
+ "test $(git config branch.s.dummy) = Hello &&
109
+ ! git config branch.s/s/dummy"
110
111
test_expect_failure \
112
- 'git-branch -m u v should fail when the reflog for u is a symlink' \
113
- 'git-branch -l u &&
112
+ 'git branch -m u v should fail when the reflog for u is a symlink' \
113
+ 'git branch -l u &&
114
mv .git/logs/refs/heads/u real-u &&
115
ln -s real-u .git/logs/refs/heads/u &&
116
- git-branch -m u v'
116
+ git branch -m u v'
117
118
test_expect_success 'test tracking setup via --track' \
119
- 'git-config remote.local.url . &&
120
- git-config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
121
- (git-show-ref -q refs/remotes/local/master || git-fetch local) &&
122
- git-branch --track my1 local/master &&
123
- test $(git-config branch.my1.remote) = local &&
124
- test $(git-config branch.my1.merge) = refs/heads/master'
119
+ 'git config remote.local.url . &&
120
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
121
+ (git show-ref -q refs/remotes/local/master || git-fetch local) &&
122
+ git branch --track my1 local/master &&
123
+ test $(git config branch.my1.remote) = local &&
124
+ test $(git config branch.my1.merge) = refs/heads/master'
125
126
test_expect_success 'test tracking setup (non-wildcard, matching)' \
127
- 'git-config remote.local.url . &&
128
- git-config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
129
- (git-show-ref -q refs/remotes/local/master || git-fetch local) &&
130
- git-branch --track my4 local/master &&
131
- test $(git-config branch.my4.remote) = local &&
132
- test $(git-config branch.my4.merge) = refs/heads/master'
127
+ 'git config remote.local.url . &&
128
+ git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
129
+ (git show-ref -q refs/remotes/local/master || git-fetch local) &&
130
+ git branch --track my4 local/master &&
131
+ test $(git config branch.my4.remote) = local &&
132
+ test $(git config branch.my4.merge) = refs/heads/master'
133
134
test_expect_success 'test tracking setup (non-wildcard, not matching)' \
135
- 'git-config remote.local.url . &&
136
- git-config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
137
- (git-show-ref -q refs/remotes/local/master || git-fetch local) &&
138
- git-branch --track my5 local/master &&
139
- ! test "$(git-config branch.my5.remote)" = local &&
140
- ! test "$(git-config branch.my5.merge)" = refs/heads/master'
135
+ 'git config remote.local.url . &&
136
+ git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
137
+ (git show-ref -q refs/remotes/local/master || git-fetch local) &&
138
+ git branch --track my5 local/master &&
139
+ ! test "$(git config branch.my5.remote)" = local &&
140
+ ! test "$(git config branch.my5.merge)" = refs/heads/master'
141
142
test_expect_success 'test tracking setup via config' \
143
- 'git-config branch.autosetupmerge true &&
144
- git-config remote.local.url . &&
145
- git-config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
146
- (git-show-ref -q refs/remotes/local/master || git-fetch local) &&
147
- git-branch my3 local/master &&
148
- test $(git-config branch.my3.remote) = local &&
149
- test $(git-config branch.my3.merge) = refs/heads/master'
143
+ 'git config branch.autosetupmerge true &&
144
+ git config remote.local.url . &&
145
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
146
+ (git show-ref -q refs/remotes/local/master || git-fetch local) &&
147
+ git branch my3 local/master &&
148
+ test $(git config branch.my3.remote) = local &&
149
+ test $(git config branch.my3.merge) = refs/heads/master'
150
151
test_expect_success 'test overriding tracking setup via --no-track' \
152
- 'git-config branch.autosetupmerge true &&
153
- git-config remote.local.url . &&
154
- git-config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
155
- (git-show-ref -q refs/remotes/local/master || git-fetch local) &&
156
- git-branch --no-track my2 local/master &&
157
- git-config branch.autosetupmerge false &&
158
- ! test "$(git-config branch.my2.remote)" = local &&
159
- ! test "$(git-config branch.my2.merge)" = refs/heads/master'
152
+ 'git config branch.autosetupmerge true &&
153
+ git config remote.local.url . &&
154
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
155
+ (git show-ref -q refs/remotes/local/master || git-fetch local) &&
156
+ git branch --no-track my2 local/master &&
157
+ git config branch.autosetupmerge false &&
158
+ ! test "$(git config branch.my2.remote)" = local &&
159
+ ! test "$(git config branch.my2.merge)" = refs/heads/master'
160
161
test_expect_success 'test local tracking setup' \
162
'git branch --track my6 s &&
163
- test $(git-config branch.my6.remote) = . &&
164
- test $(git-config branch.my6.merge) = refs/heads/s'
163
+ test $(git config branch.my6.remote) = . &&
164
+ test $(git config branch.my6.merge) = refs/heads/s'
165
166
test_expect_success 'test tracking setup via --track but deeper' \
167
- 'git-config remote.local.url . &&
168
- git-config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
169
- (git-show-ref -q refs/remotes/local/o/o || git-fetch local) &&
170
- git-branch --track my7 local/o/o &&
171
- test "$(git-config branch.my7.remote)" = local &&
172
- test "$(git-config branch.my7.merge)" = refs/heads/o/o'
167
+ 'git config remote.local.url . &&
168
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
169
+ (git show-ref -q refs/remotes/local/o/o || git-fetch local) &&
170
+ git branch --track my7 local/o/o &&
171
+ test "$(git config branch.my7.remote)" = local &&
172
+ test "$(git config branch.my7.merge)" = refs/heads/o/o'
173
174
test_expect_success 'test deleting branch deletes branch config' \
175
- 'git-branch -d my7 &&
176
- test "$(git-config branch.my7.remote)" = "" &&
177
- test "$(git-config branch.my7.merge)" = ""'
175
+ 'git branch -d my7 &&
176
+ test "$(git config branch.my7.remote)" = "" &&
177
+ test "$(git config branch.my7.merge)" = ""'
178
179
test_expect_success 'test deleting branch without config' \
180
- 'git-branch my7 s &&
181
- test "$(git-branch -d my7 2>&1)" = "Deleted branch my7."'
180
+ 'git branch my7 s &&
181
+ test "$(git branch -d my7 2>&1)" = "Deleted branch my7."'
182
183
# Keep this test last, as it changes the current branch
184
cat >expect <<EOF
t/t3210-pack-refs.sh
+43
-43
@@ -16,92 +16,92 @@ echo '[core] logallrefupdates = true' >>.git/config
16
test_expect_success \
17
'prepare a trivial repository' \
18
'echo Hello > A &&
19
- git-update-index --add A &&
19
+ git update-index --add A &&
20
git-commit -m "Initial commit." &&
21
- HEAD=$(git-rev-parse --verify HEAD)'
21
+ HEAD=$(git rev-parse --verify HEAD)'
22
23
SHA1=
24
25
test_expect_success \
26
'see if git show-ref works as expected' \
27
- 'git-branch a &&
27
+ 'git branch a &&
28
SHA1=`cat .git/refs/heads/a` &&
29
echo "$SHA1 refs/heads/a" >expect &&
30
- git-show-ref a >result &&
30
+ git show-ref a >result &&
31
diff expect result'
32
33
test_expect_success \
34
'see if a branch still exists when packed' \
35
- 'git-branch b &&
36
- git-pack-refs --all &&
35
+ 'git branch b &&
36
+ git pack-refs --all &&
37
rm -f .git/refs/heads/b &&
38
echo "$SHA1 refs/heads/b" >expect &&
39
- git-show-ref b >result &&
39
+ git show-ref b >result &&
40
diff expect result'
41
42
test_expect_failure \
43
'git branch c/d should barf if branch c exists' \
44
- 'git-branch c &&
45
- git-pack-refs --all &&
44
+ 'git branch c &&
45
+ git pack-refs --all &&
46
rm .git/refs/heads/c &&
47
- git-branch c/d'
47
+ git branch c/d'
48
49
test_expect_success \
50
'see if a branch still exists after git pack-refs --prune' \
51
- 'git-branch e &&
52
- git-pack-refs --all --prune &&
51
+ 'git branch e &&
52
+ git pack-refs --all --prune &&
53
echo "$SHA1 refs/heads/e" >expect &&
54
- git-show-ref e >result &&
54
+ git show-ref e >result &&
55
diff expect result'
56
57
test_expect_failure \
58
'see if git pack-refs --prune remove ref files' \
59
- 'git-branch f &&
60
- git-pack-refs --all --prune &&
59
+ 'git branch f &&
60
+ git pack-refs --all --prune &&
61
ls .git/refs/heads/f'
62
63
test_expect_success \
64
'git branch g should work when git branch g/h has been deleted' \
65
- 'git-branch g/h &&
66
- git-pack-refs --all --prune &&
67
- git-branch -d g/h &&
68
- git-branch g &&
69
- git-pack-refs --all &&
70
- git-branch -d g'
65
+ 'git branch g/h &&
66
+ git pack-refs --all --prune &&
67
+ git branch -d g/h &&
68
+ git branch g &&
69
+ git pack-refs --all &&
70
+ git branch -d g'
71
72
test_expect_failure \
73
'git branch i/j/k should barf if branch i exists' \
74
- 'git-branch i &&
75
- git-pack-refs --all --prune &&
76
- git-branch i/j/k'
74
+ 'git branch i &&
75
+ git pack-refs --all --prune &&
76
+ git branch i/j/k'
77
78
test_expect_success \
79
'test git branch k after branch k/l/m and k/lm have been deleted' \
80
- 'git-branch k/l &&
81
- git-branch k/lm &&
82
- git-branch -d k/l &&
83
- git-branch k/l/m &&
84
- git-branch -d k/l/m &&
85
- git-branch -d k/lm &&
86
- git-branch k'
80
+ 'git branch k/l &&
81
+ git branch k/lm &&
82
+ git branch -d k/l &&
83
+ git branch k/l/m &&
84
+ git branch -d k/l/m &&
85
+ git branch -d k/lm &&
86
+ git branch k'
87
88
test_expect_success \
89
'test git branch n after some branch deletion and pruning' \
90
- 'git-branch n/o &&
91
- git-branch n/op &&
92
- git-branch -d n/o &&
93
- git-branch n/o/p &&
94
- git-branch -d n/op &&
95
- git-pack-refs --all --prune &&
96
- git-branch -d n/o/p &&
97
- git-branch n'
90
+ 'git branch n/o &&
91
+ git branch n/op &&
92
+ git branch -d n/o &&
93
+ git branch n/o/p &&
94
+ git branch -d n/op &&
95
+ git pack-refs --all --prune &&
96
+ git branch -d n/o/p &&
97
+ git branch n'
98
99
test_expect_success 'pack, prune and repack' '
100
git-tag foo &&
101
- git-pack-refs --all --prune &&
102
- git-show-ref >all-of-them &&
103
- git-pack-refs &&
104
- git-show-ref >again &&
101
+ git pack-refs --all --prune &&
102
+ git show-ref >all-of-them &&
103
+ git pack-refs &&
104
+ git show-ref >again &&
105
diff all-of-them again
106
'
107
t/t3300-funny-names.sh
+38
-38
@@ -32,12 +32,12 @@ test -f "$p1" && cmp "$p0" "$p1" || {
32
33
echo 'just space
34
no-funny' >expected
35
-test_expect_success 'git-ls-files no-funny' \
36
- 'git-update-index --add "$p0" "$p2" &&
37
- git-ls-files >current &&
35
+test_expect_success 'git ls-files no-funny' \
36
+ 'git update-index --add "$p0" "$p2" &&
37
+ git ls-files >current &&
38
git diff expected current'
39
40
-t0=`git-write-tree`
40
+t0=`git write-tree`
41
echo "$t0" >t0
42
43
cat > expected <<\EOF
@@ -45,19 +45,19 @@ just space
45
no-funny
46
"tabs\t,\" (dq) and spaces"
47
EOF
48
-test_expect_success 'git-ls-files with-funny' \
49
- 'git-update-index --add "$p1" &&
50
- git-ls-files >current &&
48
+test_expect_success 'git ls-files with-funny' \
49
+ 'git update-index --add "$p1" &&
50
+ git ls-files >current &&
51
git diff expected current'
52
53
echo 'just space
54
no-funny
55
tabs ," (dq) and spaces' >expected
56
-test_expect_success 'git-ls-files -z with-funny' \
57
- 'git-ls-files -z | tr \\0 \\012 >current &&
56
+test_expect_success 'git ls-files -z with-funny' \
57
+ 'git ls-files -z | tr \\0 \\012 >current &&
58
git diff expected current'
59
60
-t1=`git-write-tree`
60
+t1=`git write-tree`
61
echo "$t1" >t1
62
63
cat > expected <<\EOF
@@ -65,45 +65,45 @@ just space
65
no-funny
66
"tabs\t,\" (dq) and spaces"
67
EOF
68
-test_expect_success 'git-ls-tree with funny' \
69
- 'git-ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
68
+test_expect_success 'git ls-tree with funny' \
69
+ 'git ls-tree -r $t1 | sed -e "s/^[^ ]* //" >current &&
70
git diff expected current'
71
72
cat > expected <<\EOF
73
A "tabs\t,\" (dq) and spaces"
74
EOF
75
-test_expect_success 'git-diff-index with-funny' \
76
- 'git-diff-index --name-status $t0 >current &&
75
+test_expect_success 'git diff-index with-funny' \
76
+ 'git diff-index --name-status $t0 >current &&
77
git diff expected current'
78
79
-test_expect_success 'git-diff-tree with-funny' \
80
- 'git-diff-tree --name-status $t0 $t1 >current &&
79
+test_expect_success 'git diff-tree with-funny' \
80
+ 'git diff-tree --name-status $t0 $t1 >current &&
81
git diff expected current'
82
83
echo 'A
84
tabs ," (dq) and spaces' >expected
85
-test_expect_success 'git-diff-index -z with-funny' \
86
- 'git-diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
85
+test_expect_success 'git diff-index -z with-funny' \
86
+ 'git diff-index -z --name-status $t0 | tr \\0 \\012 >current &&
87
git diff expected current'
88
89
-test_expect_success 'git-diff-tree -z with-funny' \
90
- 'git-diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
89
+test_expect_success 'git diff-tree -z with-funny' \
90
+ 'git diff-tree -z --name-status $t0 $t1 | tr \\0 \\012 >current &&
91
git diff expected current'
92
93
cat > expected <<\EOF
94
CNUM no-funny "tabs\t,\" (dq) and spaces"
95
EOF
96
-test_expect_success 'git-diff-tree -C with-funny' \
97
- 'git-diff-tree -C --find-copies-harder --name-status \
96
+test_expect_success 'git diff-tree -C with-funny' \
97
+ 'git diff-tree -C --find-copies-harder --name-status \
98
$t0 $t1 | sed -e 's/^C[0-9]*/CNUM/' >current &&
99
git diff expected current'
100
101
cat > expected <<\EOF
102
RNUM no-funny "tabs\t,\" (dq) and spaces"
103
EOF
104
-test_expect_success 'git-diff-tree delete with-funny' \
105
- 'git-update-index --force-remove "$p0" &&
106
- git-diff-index -M --name-status \
104
+test_expect_success 'git diff-tree delete with-funny' \
105
+ 'git update-index --force-remove "$p0" &&
106
+ git diff-index -M --name-status \
107
$t0 | sed -e 's/^R[0-9]*/RNUM/' >current &&
108
git diff expected current'
109
@@ -113,8 +113,8 @@ similarity index NUM%
113
rename from no-funny
114
rename to "tabs\t,\" (dq) and spaces"
115
EOF
116
-test_expect_success 'git-diff-tree delete with-funny' \
117
- 'git-diff-index -M -p $t0 |
116
+test_expect_success 'git diff-tree delete with-funny' \
117
+ 'git diff-index -M -p $t0 |
118
sed -e "s/index [0-9]*%/index NUM%/" >current &&
119
git diff expected current'
120
@@ -127,8 +127,8 @@ similarity index NUM%
127
rename from no-funny
128
rename to "tabs\t,\" (dq) and spaces"
129
EOF
130
-test_expect_success 'git-diff-tree delete with-funny' \
131
- 'git-diff-index -M -p $t0 |
130
+test_expect_success 'git diff-tree delete with-funny' \
131
+ 'git diff-index -M -p $t0 |
132
sed -e "s/index [0-9]*%/index NUM%/" >current &&
133
git diff expected current'
134
@@ -136,9 +136,9 @@ cat >expected <<\EOF
136
"tabs\t,\" (dq) and spaces"
137
1 files changed, 0 insertions(+), 0 deletions(-)
138
EOF
139
-test_expect_success 'git-diff-tree rename with-funny applied' \
140
- 'git-diff-index -M -p $t0 |
141
- git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
139
+test_expect_success 'git diff-tree rename with-funny applied' \
140
+ 'git diff-index -M -p $t0 |
141
+ git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
142
git diff expected current'
143
144
cat > expected <<\EOF
@@ -146,15 +146,15 @@ cat > expected <<\EOF
146
"tabs\t,\" (dq) and spaces"
147
2 files changed, 3 insertions(+), 3 deletions(-)
148
EOF
149
-test_expect_success 'git-diff-tree delete with-funny applied' \
150
- 'git-diff-index -p $t0 |
151
- git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
149
+test_expect_success 'git diff-tree delete with-funny applied' \
150
+ 'git diff-index -p $t0 |
151
+ git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
152
git diff expected current'
153
154
-test_expect_success 'git-apply non-git diff' \
155
- 'git-diff-index -p $t0 |
154
+test_expect_success 'git apply non-git diff' \
155
+ 'git diff-index -p $t0 |
156
sed -ne "/^[-+@]/p" |
157
- git-apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
157
+ git apply --stat | sed -e "s/|.*//" -e "s/ *\$//" >current &&
158
git diff expected current'
159
160
test_done
t/t3400-rebase.sh
+3
-3
@@ -14,15 +14,15 @@ export GIT_AUTHOR_EMAIL=bogus_email_address
14
test_expect_success \
15
'prepare repository with topic branch, then rebase against master' \
16
'echo First > A &&
17
- git-update-index --add A &&
17
+ git update-index --add A &&
18
git-commit -m "Add A." &&
19
git checkout -b my-topic-branch &&
20
echo Second > B &&
21
- git-update-index --add B &&
21
+ git update-index --add B &&
22
git-commit -m "Add B." &&
23
git checkout -f master &&
24
echo Third >> A &&
25
- git-update-index A &&
25
+ git update-index A &&
26
git-commit -m "Modify A." &&
27
git checkout -f my-topic-branch &&
28
git rebase master'
t/t3401-rebase-partial.sh
+9
-9
@@ -14,37 +14,37 @@ local branch.
14
test_expect_success \
15
'prepare repository with topic branch' \
16
'echo First > A &&
17
- git-update-index --add A &&
17
+ git update-index --add A &&
18
git-commit -m "Add A." &&
19
20
git-checkout -b my-topic-branch &&
21
22
echo Second > B &&
23
- git-update-index --add B &&
23
+ git update-index --add B &&
24
git-commit -m "Add B." &&
25
26
echo AnotherSecond > C &&
27
- git-update-index --add C &&
27
+ git update-index --add C &&
28
git-commit -m "Add C." &&
29
30
git-checkout -f master &&
31
32
echo Third >> A &&
33
- git-update-index A &&
33
+ git update-index A &&
34
git-commit -m "Modify A."
35
'
36
37
test_expect_success \
38
'pick top patch from topic branch into master' \
39
- 'git-cherry-pick my-topic-branch^0 &&
39
+ 'git cherry-pick my-topic-branch^0 &&
40
git-checkout -f my-topic-branch &&
41
- git-branch master-merge master &&
42
- git-branch my-topic-branch-merge my-topic-branch
41
+ git branch master-merge master &&
42
+ git branch my-topic-branch-merge my-topic-branch
43
'
44
45
test_debug \
46
- 'git-cherry master &&
47
- git-format-patch -k --stdout --full-index master >/dev/null &&
46
+ 'git cherry master &&
47
+ git format-patch -k --stdout --full-index master >/dev/null &&
48
gitk --all & sleep 1
49
'
50
t/t3403-rebase-skip.sh
+1
-1
@@ -49,7 +49,7 @@ test_expect_success 'rebase --skip with --merge' '
49
'
50
51
test_expect_success 'merge and reference trees equal' \
52
- 'test -z "`git-diff-tree skip-merge skip-reference`"'
52
+ 'test -z "`git diff-tree skip-merge skip-reference`"'
53
54
test_debug 'gitk --all & sleep 1'
55
t/t3500-cherry.sh
+11
-11
@@ -3,10 +3,10 @@
3
# Copyright (c) 2006 Yann Dirson, based on t3400 by Amos Waterland
4
#
5
6
-test_description='git-cherry should detect patches integrated upstream
6
+test_description='git cherry should detect patches integrated upstream
7
8
This test cherry-picks one local change of two into master branch, and
9
-checks that git-cherry only returns the second patch in the local branch
9
+checks that git cherry only returns the second patch in the local branch
10
'
11
. ./test-lib.sh
12
@@ -15,40 +15,40 @@ export GIT_AUTHOR_EMAIL=bogus_email_address
15
test_expect_success \
16
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
17
'echo First > A &&
18
- git-update-index --add A &&
18
+ git update-index --add A &&
19
git-commit -m "Add A." &&
20
21
git-checkout -b my-topic-branch &&
22
23
echo Second > B &&
24
- git-update-index --add B &&
24
+ git update-index --add B &&
25
git-commit -m "Add B." &&
26
27
sleep 2 &&
28
echo AnotherSecond > C &&
29
- git-update-index --add C &&
29
+ git update-index --add C &&
30
git-commit -m "Add C." &&
31
32
git-checkout -f master &&
33
rm -f B C &&
34
35
echo Third >> A &&
36
- git-update-index A &&
36
+ git update-index A &&
37
git-commit -m "Modify A." &&
38
39
- expr "$(echo $(git-cherry master my-topic-branch) )" : "+ [^ ]* + .*"
39
+ expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* + .*"
40
'
41
42
test_expect_success \
43
'check that cherry with limit returns only the top patch'\
44
- 'expr "$(echo $(git-cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
44
+ 'expr "$(echo $(git cherry master my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
45
'
46
47
test_expect_success \
48
'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \
49
- 'git-cherry-pick my-topic-branch^0 &&
50
- echo $(git-cherry master my-topic-branch) &&
51
- expr "$(echo $(git-cherry master my-topic-branch) )" : "+ [^ ]* - .*"
49
+ 'git cherry-pick my-topic-branch^0 &&
50
+ echo $(git cherry master my-topic-branch) &&
51
+ expr "$(echo $(git cherry master my-topic-branch) )" : "+ [^ ]* - .*"
52
'
53
54
test_done
t/t3600-rm.sh
+24
-24
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Carl D. Worth
4
#
5
6
-test_description='Test of the various options to git-rm.'
6
+test_description='Test of the various options to git rm.'
7
8
. ./test-lib.sh
9
@@ -11,13 +11,13 @@ test_description='Test of the various options to git-rm.'
11
test_expect_success \
12
'Initialize test directory' \
13
"touch -- foo bar baz 'space embedded' -q &&
14
- git-add -- foo bar baz 'space embedded' -q &&
14
+ git add -- foo bar baz 'space embedded' -q &&
15
git-commit -m 'add normal files' &&
16
test_tabs=y &&
17
if touch -- 'tab embedded' 'newline
18
embedded'
19
then
20
- git-add -- 'tab embedded' 'newline
20
+ git add -- 'tab embedded' 'newline
21
embedded' &&
22
git-commit -m 'add files with tabs and newlines'
23
else
@@ -26,7 +26,7 @@ embedded' &&
26
fi"
27
28
# Later we will try removing an unremovable path to make sure
29
-# git-rm barfs, but if the test is run as root that cannot be
29
+# git rm barfs, but if the test is run as root that cannot be
30
# arranged.
31
test_expect_success \
32
'Determine rm behavior' \
@@ -38,51 +38,51 @@ test_expect_success \
38
rm -f test-file'
39
40
test_expect_success \
41
- 'Pre-check that foo exists and is in index before git-rm foo' \
42
- '[ -f foo ] && git-ls-files --error-unmatch foo'
41
+ 'Pre-check that foo exists and is in index before git rm foo' \
42
+ '[ -f foo ] && git ls-files --error-unmatch foo'
43
44
test_expect_success \
45
- 'Test that git-rm foo succeeds' \
46
- 'git-rm --cached foo'
45
+ 'Test that git rm foo succeeds' \
46
+ 'git rm --cached foo'
47
48
test_expect_success \
49
- 'Post-check that foo exists but is not in index after git-rm foo' \
50
- '[ -f foo ] && ! git-ls-files --error-unmatch foo'
49
+ 'Post-check that foo exists but is not in index after git rm foo' \
50
+ '[ -f foo ] && ! git ls-files --error-unmatch foo'
51
52
test_expect_success \
53
- 'Pre-check that bar exists and is in index before "git-rm bar"' \
54
- '[ -f bar ] && git-ls-files --error-unmatch bar'
53
+ 'Pre-check that bar exists and is in index before "git rm bar"' \
54
+ '[ -f bar ] && git ls-files --error-unmatch bar'
55
56
test_expect_success \
57
- 'Test that "git-rm bar" succeeds' \
58
- 'git-rm bar'
57
+ 'Test that "git rm bar" succeeds' \
58
+ 'git rm bar'
59
60
test_expect_success \
61
- 'Post-check that bar does not exist and is not in index after "git-rm -f bar"' \
62
- '! [ -f bar ] && ! git-ls-files --error-unmatch bar'
61
+ 'Post-check that bar does not exist and is not in index after "git rm -f bar"' \
62
+ '! [ -f bar ] && ! git ls-files --error-unmatch bar'
63
64
test_expect_success \
65
- 'Test that "git-rm -- -q" succeeds (remove a file that looks like an option)' \
66
- 'git-rm -- -q'
65
+ 'Test that "git rm -- -q" succeeds (remove a file that looks like an option)' \
66
+ 'git rm -- -q'
67
68
test "$test_tabs" = y && test_expect_success \
69
- "Test that \"git-rm -f\" succeeds with embedded space, tab, or newline characters." \
70
- "git-rm -f 'space embedded' 'tab embedded' 'newline
69
+ "Test that \"git rm -f\" succeeds with embedded space, tab, or newline characters." \
70
+ "git rm -f 'space embedded' 'tab embedded' 'newline
71
embedded'"
72
73
if test "$test_failed_remove" = y; then
74
chmod a-w .
75
test_expect_failure \
76
- 'Test that "git-rm -f" fails if its rm fails' \
77
- 'git-rm -f baz'
76
+ 'Test that "git rm -f" fails if its rm fails' \
77
+ 'git rm -f baz'
78
chmod 775 .
79
else
80
test_expect_success 'skipping removal failure (perhaps running as root?)' :
81
fi
82
83
test_expect_success \
84
- 'When the rm in "git-rm -f" fails, it should not remove the file from the index' \
85
- 'git-ls-files --error-unmatch baz'
84
+ 'When the rm in "git rm -f" fails, it should not remove the file from the index' \
85
+ 'git ls-files --error-unmatch baz'
86
87
test_expect_success 'Remove nonexistent file with --ignore-unmatch' '
88
git rm --ignore-unmatch nonexistent
t/t3700-add.sh
+35
-35
@@ -3,72 +3,72 @@
3
# Copyright (c) 2006 Carl D. Worth
4
#
5
6
-test_description='Test of git-add, including the -- option.'
6
+test_description='Test of git add, including the -- option.'
7
8
. ./test-lib.sh
9
10
test_expect_success \
11
- 'Test of git-add' \
12
- 'touch foo && git-add foo'
11
+ 'Test of git add' \
12
+ 'touch foo && git add foo'
13
14
test_expect_success \
15
'Post-check that foo is in the index' \
16
- 'git-ls-files foo | grep foo'
16
+ 'git ls-files foo | grep foo'
17
18
test_expect_success \
19
- 'Test that "git-add -- -q" works' \
20
- 'touch -- -q && git-add -- -q'
19
+ 'Test that "git add -- -q" works' \
20
+ 'touch -- -q && git add -- -q'
21
22
test_expect_success \
23
- 'git-add: Test that executable bit is not used if core.filemode=0' \
23
+ 'git add: Test that executable bit is not used if core.filemode=0' \
24
'git config core.filemode 0 &&
25
echo foo >xfoo1 &&
26
chmod 755 xfoo1 &&
27
- git-add xfoo1 &&
28
- case "`git-ls-files --stage xfoo1`" in
27
+ git add xfoo1 &&
28
+ case "`git ls-files --stage xfoo1`" in
29
100644" "*xfoo1) echo ok;;
30
- *) echo fail; git-ls-files --stage xfoo1; (exit 1);;
30
+ *) echo fail; git ls-files --stage xfoo1; (exit 1);;
31
esac'
32
33
-test_expect_success 'git-add: filemode=0 should not get confused by symlink' '
33
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
34
rm -f xfoo1 &&
35
ln -s foo xfoo1 &&
36
- git-add xfoo1 &&
37
- case "`git-ls-files --stage xfoo1`" in
36
+ git add xfoo1 &&
37
+ case "`git ls-files --stage xfoo1`" in
38
120000" "*xfoo1) echo ok;;
39
- *) echo fail; git-ls-files --stage xfoo1; (exit 1);;
39
+ *) echo fail; git ls-files --stage xfoo1; (exit 1);;
40
esac
41
'
42
43
test_expect_success \
44
- 'git-update-index --add: Test that executable bit is not used...' \
44
+ 'git update-index --add: Test that executable bit is not used...' \
45
'git config core.filemode 0 &&
46
echo foo >xfoo2 &&
47
chmod 755 xfoo2 &&
48
- git-update-index --add xfoo2 &&
49
- case "`git-ls-files --stage xfoo2`" in
48
+ git update-index --add xfoo2 &&
49
+ case "`git ls-files --stage xfoo2`" in
50
100644" "*xfoo2) echo ok;;
51
- *) echo fail; git-ls-files --stage xfoo2; (exit 1);;
51
+ *) echo fail; git ls-files --stage xfoo2; (exit 1);;
52
esac'
53
54
-test_expect_success 'git-add: filemode=0 should not get confused by symlink' '
54
+test_expect_success 'git add: filemode=0 should not get confused by symlink' '
55
rm -f xfoo2 &&
56
ln -s foo xfoo2 &&
57
git update-index --add xfoo2 &&
58
- case "`git-ls-files --stage xfoo2`" in
58
+ case "`git ls-files --stage xfoo2`" in
59
120000" "*xfoo2) echo ok;;
60
- *) echo fail; git-ls-files --stage xfoo2; (exit 1);;
60
+ *) echo fail; git ls-files --stage xfoo2; (exit 1);;
61
esac
62
'
63
64
test_expect_success \
65
- 'git-update-index --add: Test that executable bit is not used...' \
65
+ 'git update-index --add: Test that executable bit is not used...' \
66
'git config core.filemode 0 &&
67
ln -s xfoo2 xfoo3 &&
68
- git-update-index --add xfoo3 &&
69
- case "`git-ls-files --stage xfoo3`" in
68
+ git update-index --add xfoo3 &&
69
+ case "`git ls-files --stage xfoo3`" in
70
120000" "*xfoo3) echo ok;;
71
- *) echo fail; git-ls-files --stage xfoo3; (exit 1);;
71
+ *) echo fail; git ls-files --stage xfoo3; (exit 1);;
72
esac'
73
74
test_expect_success '.gitignore test setup' '
@@ -80,28 +80,28 @@ test_expect_success '.gitignore test setup' '
80
'
81
82
test_expect_success '.gitignore is honored' '
83
- git-add . &&
84
- ! git-ls-files | grep "\\.ig"
83
+ git add . &&
84
+ ! git ls-files | grep "\\.ig"
85
'
86
87
test_expect_success 'error out when attempting to add ignored ones without -f' '
88
- ! git-add a.?? &&
89
- ! git-ls-files | grep "\\.ig"
88
+ ! git add a.?? &&
89
+ ! git ls-files | grep "\\.ig"
90
'
91
92
test_expect_success 'error out when attempting to add ignored ones without -f' '
93
- ! git-add d.?? &&
94
- ! git-ls-files | grep "\\.ig"
93
+ ! git add d.?? &&
94
+ ! git ls-files | grep "\\.ig"
95
'
96
97
test_expect_success 'add ignored ones with -f' '
98
- git-add -f a.?? &&
99
- git-ls-files --error-unmatch a.ig
98
+ git add -f a.?? &&
99
+ git ls-files --error-unmatch a.ig
100
'
101
102
test_expect_success 'add ignored ones with -f' '
103
- git-add -f d.??/* &&
104
- git-ls-files --error-unmatch d.ig/d.if d.ig/d.ig
103
+ git add -f d.??/* &&
104
+ git ls-files --error-unmatch d.ig/d.if d.ig/d.ig
105
'
106
107
mkdir 1 1/2 1/3
t/t3800-mktag.sh
+2
-2
@@ -22,9 +22,9 @@ check_verify_failure () {
22
# first create a commit, so we have a valid object/type
23
# for the tag.
24
echo Hello >A
25
-git-update-index --add A
25
+git update-index --add A
26
git-commit -m "Initial commit"
27
-head=$(git-rev-parse --verify HEAD)
27
+head=$(git rev-parse --verify HEAD)
28
29
############################################################
30
# 1. length check
t/t3900-i18n-commit.sh
+16
-16
@@ -8,28 +8,28 @@ test_description='commit and log output encodings'
8
. ./test-lib.sh
9
10
compare_with () {
11
- git-show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current &&
11
+ git show -s $1 | sed -e '1,/^$/d' -e 's/^ //' -e '$d' >current &&
12
git diff current "$2"
13
}
14
15
test_expect_success setup '
16
: >F &&
17
- git-add F &&
18
- T=$(git-write-tree) &&
19
- C=$(git-commit-tree $T <../t3900/1-UTF-8.txt) &&
20
- git-update-ref HEAD $C &&
17
+ git add F &&
18
+ T=$(git write-tree) &&
19
+ C=$(git commit-tree $T <../t3900/1-UTF-8.txt) &&
20
+ git update-ref HEAD $C &&
21
git-tag C0
22
'
23
24
test_expect_success 'no encoding header for base case' '
25
- E=$(git-cat-file commit C0 | sed -ne "s/^encoding //p") &&
25
+ E=$(git cat-file commit C0 | sed -ne "s/^encoding //p") &&
26
test z = "z$E"
27
'
28
29
for H in ISO-8859-1 EUCJP ISO-2022-JP
30
do
31
test_expect_success "$H setup" '
32
- git-config i18n.commitencoding $H &&
32
+ git config i18n.commitencoding $H &&
33
git-checkout -b $H C0 &&
34
echo $H >F &&
35
git-commit -a -F ../t3900/$H.txt
@@ -39,21 +39,21 @@ done
39
for H in ISO-8859-1 EUCJP ISO-2022-JP
40
do
41
test_expect_success "check encoding header for $H" '
42
- E=$(git-cat-file commit '$H' | sed -ne "s/^encoding //p") &&
42
+ E=$(git cat-file commit '$H' | sed -ne "s/^encoding //p") &&
43
test "z$E" = "z'$H'"
44
'
45
done
46
47
test_expect_success 'config to remove customization' '
48
- git-config --unset-all i18n.commitencoding &&
49
- if Z=$(git-config --get-all i18n.commitencoding)
48
+ git config --unset-all i18n.commitencoding &&
49
+ if Z=$(git config --get-all i18n.commitencoding)
50
then
51
echo Oops, should have failed.
52
false
53
else
54
test z = "z$Z"
55
fi &&
56
- git-config i18n.commitencoding utf-8
56
+ git config i18n.commitencoding utf-8
57
'
58
59
test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '
@@ -68,8 +68,8 @@ do
68
done
69
70
test_expect_success 'config to add customization' '
71
- git-config --unset-all i18n.commitencoding &&
72
- if Z=$(git-config --get-all i18n.commitencoding)
71
+ git config --unset-all i18n.commitencoding &&
72
+ if Z=$(git config --get-all i18n.commitencoding)
73
then
74
echo Oops, should have failed.
75
false
@@ -81,13 +81,13 @@ test_expect_success 'config to add customization' '
81
for H in ISO-8859-1 EUCJP ISO-2022-JP
82
do
83
test_expect_success "$H should be shown in itself now" '
84
- git-config i18n.commitencoding '$H' &&
84
+ git config i18n.commitencoding '$H' &&
85
compare_with '$H' ../t3900/'$H'.txt
86
'
87
done
88
89
test_expect_success 'config to tweak customization' '
90
- git-config i18n.logoutputencoding utf-8
90
+ git config i18n.logoutputencoding utf-8
91
'
92
93
test_expect_success 'ISO-8859-1 should be shown in UTF-8 now' '
@@ -103,7 +103,7 @@ done
103
104
for J in EUCJP ISO-2022-JP
105
do
106
- git-config i18n.logoutputencoding $J
106
+ git config i18n.logoutputencoding $J
107
for H in EUCJP ISO-2022-JP
108
do
109
test_expect_success "$H should be shown in $J now" '
t/t3901-i18n-patch.sh
+17
-17
@@ -14,7 +14,7 @@ check_encoding () {
14
do
15
git format-patch --encoding=UTF-8 --stdout HEAD~$i..HEAD~$j |
16
grep "^From: =?UTF-8?q?=C3=81=C3=A9=C3=AD=20=C3=B3=C3=BA?=" &&
17
- git-cat-file commit HEAD~$j |
17
+ git cat-file commit HEAD~$j |
18
case "$header" in
19
8859)
20
grep "^encoding ISO-8859-1" ;;
@@ -31,7 +31,7 @@ check_encoding () {
31
}
32
33
test_expect_success setup '
34
- git-config i18n.commitencoding UTF-8 &&
34
+ git config i18n.commitencoding UTF-8 &&
35
36
# use UTF-8 in author and committer name to match the
37
# i18n.commitencoding settings
@@ -55,7 +55,7 @@ test_expect_success setup '
55
git commit -s -m "Second on side" &&
56
57
# the second one on the side branch is ISO-8859-1
58
- git-config i18n.commitencoding ISO-8859-1 &&
58
+ git config i18n.commitencoding ISO-8859-1 &&
59
# use author and committer name in ISO-8859-1 to match it.
60
. ../t3901-8859-1.txt &&
61
test_tick &&
@@ -64,11 +64,11 @@ test_expect_success setup '
64
git commit -s -m "Third on side" &&
65
66
# Back to default
67
- git-config i18n.commitencoding UTF-8
67
+ git config i18n.commitencoding UTF-8
68
'
69
70
test_expect_success 'format-patch output (ISO-8859-1)' '
71
- git-config i18n.logoutputencoding ISO-8859-1 &&
71
+ git config i18n.logoutputencoding ISO-8859-1 &&
72
73
git format-patch --stdout master..HEAD^ >out-l1 &&
74
git format-patch --stdout HEAD^ >out-l2 &&
@@ -91,7 +91,7 @@ test_expect_success 'format-patch output (UTF-8)' '
91
92
test_expect_success 'rebase (U/U)' '
93
# We want the result of rebase in UTF-8
94
- git-config i18n.commitencoding UTF-8 &&
94
+ git config i18n.commitencoding UTF-8 &&
95
96
# The test is about logoutputencoding not affecting the
97
# final outcome -- it is used internally to generate the
@@ -109,7 +109,7 @@ test_expect_success 'rebase (U/U)' '
109
'
110
111
test_expect_success 'rebase (U/L)' '
112
- git-config i18n.commitencoding UTF-8 &&
112
+ git config i18n.commitencoding UTF-8 &&
113
git config i18n.logoutputencoding ISO-8859-1 &&
114
. ../t3901-utf8.txt &&
115
@@ -121,7 +121,7 @@ test_expect_success 'rebase (U/L)' '
121
122
test_expect_success 'rebase (L/L)' '
123
# In this test we want ISO-8859-1 encoded commits as the result
124
- git-config i18n.commitencoding ISO-8859-1 &&
124
+ git config i18n.commitencoding ISO-8859-1 &&
125
git config i18n.logoutputencoding ISO-8859-1 &&
126
. ../t3901-8859-1.txt &&
127
@@ -134,7 +134,7 @@ test_expect_success 'rebase (L/L)' '
134
test_expect_success 'rebase (L/U)' '
135
# This is pathological -- use UTF-8 as intermediate form
136
# to get ISO-8859-1 results.
137
- git-config i18n.commitencoding ISO-8859-1 &&
137
+ git config i18n.commitencoding ISO-8859-1 &&
138
git config i18n.logoutputencoding UTF-8 &&
139
. ../t3901-8859-1.txt &&
140
@@ -147,7 +147,7 @@ test_expect_success 'rebase (L/U)' '
147
test_expect_success 'cherry-pick(U/U)' '
148
# Both the commitencoding and logoutputencoding is set to UTF-8.
149
150
- git-config i18n.commitencoding UTF-8 &&
150
+ git config i18n.commitencoding UTF-8 &&
151
git config i18n.logoutputencoding UTF-8 &&
152
. ../t3901-utf8.txt &&
153
@@ -162,7 +162,7 @@ test_expect_success 'cherry-pick(U/U)' '
162
test_expect_success 'cherry-pick(L/L)' '
163
# Both the commitencoding and logoutputencoding is set to ISO-8859-1
164
165
- git-config i18n.commitencoding ISO-8859-1 &&
165
+ git config i18n.commitencoding ISO-8859-1 &&
166
git config i18n.logoutputencoding ISO-8859-1 &&
167
. ../t3901-8859-1.txt &&
168
@@ -177,7 +177,7 @@ test_expect_success 'cherry-pick(L/L)' '
177
test_expect_success 'cherry-pick(U/L)' '
178
# Commitencoding is set to UTF-8 but logoutputencoding is ISO-8859-1
179
180
- git-config i18n.commitencoding UTF-8 &&
180
+ git config i18n.commitencoding UTF-8 &&
181
git config i18n.logoutputencoding ISO-8859-1 &&
182
. ../t3901-utf8.txt &&
183
@@ -193,7 +193,7 @@ test_expect_success 'cherry-pick(L/U)' '
193
# Again, the commitencoding is set to ISO-8859-1 but
194
# logoutputencoding is set to UTF-8.
195
196
- git-config i18n.commitencoding ISO-8859-1 &&
196
+ git config i18n.commitencoding ISO-8859-1 &&
197
git config i18n.logoutputencoding UTF-8 &&
198
. ../t3901-8859-1.txt &&
199
@@ -206,7 +206,7 @@ test_expect_success 'cherry-pick(L/U)' '
206
'
207
208
test_expect_success 'rebase --merge (U/U)' '
209
- git-config i18n.commitencoding UTF-8 &&
209
+ git config i18n.commitencoding UTF-8 &&
210
git config i18n.logoutputencoding UTF-8 &&
211
. ../t3901-utf8.txt &&
212
@@ -217,7 +217,7 @@ test_expect_success 'rebase --merge (U/U)' '
217
'
218
219
test_expect_success 'rebase --merge (U/L)' '
220
- git-config i18n.commitencoding UTF-8 &&
220
+ git config i18n.commitencoding UTF-8 &&
221
git config i18n.logoutputencoding ISO-8859-1 &&
222
. ../t3901-utf8.txt &&
223
@@ -229,7 +229,7 @@ test_expect_success 'rebase --merge (U/L)' '
229
230
test_expect_success 'rebase --merge (L/L)' '
231
# In this test we want ISO-8859-1 encoded commits as the result
232
- git-config i18n.commitencoding ISO-8859-1 &&
232
+ git config i18n.commitencoding ISO-8859-1 &&
233
git config i18n.logoutputencoding ISO-8859-1 &&
234
. ../t3901-8859-1.txt &&
235
@@ -242,7 +242,7 @@ test_expect_success 'rebase --merge (L/L)' '
242
test_expect_success 'rebase --merge (L/U)' '
243
# This is pathological -- use UTF-8 as intermediate form
244
# to get ISO-8859-1 results.
245
- git-config i18n.commitencoding ISO-8859-1 &&
245
+ git config i18n.commitencoding ISO-8859-1 &&
246
git config i18n.logoutputencoding UTF-8 &&
247
. ../t3901-8859-1.txt &&
248
t/t4000-diff-format.sh
+4
-4
@@ -17,15 +17,15 @@ chmod +x path1
17
18
test_expect_success \
19
'update-cache --add two files with and without +x.' \
20
- 'git-update-index --add path0 path1'
20
+ 'git update-index --add path0 path1'
21
22
mv path0 path0-
23
sed -e 's/line/Line/' <path0- >path0
24
chmod +x path0
25
rm -f path1
26
test_expect_success \
27
- 'git-diff-files -p after editing work tree.' \
28
- 'git-diff-files -p >current'
27
+ 'git diff-files -p after editing work tree.' \
28
+ 'git diff-files -p >current'
29
30
# that's as far as it comes
31
if [ "$(git config --get core.filemode)" = false ]
@@ -56,7 +56,7 @@ deleted file mode 100755
56
EOF
57
58
test_expect_success \
59
- 'validate git-diff-files -p output.' \
59
+ 'validate git diff-files -p output.' \
60
'compare_diff_patch current expected'
61
62
test_done
t/t4001-diff-rename.sh
+5
-5
@@ -28,21 +28,21 @@ Line 15
28
29
test_expect_success \
30
'update-cache --add a file.' \
31
- 'git-update-index --add path0'
31
+ 'git update-index --add path0'
32
33
test_expect_success \
34
'write that tree.' \
35
- 'tree=$(git-write-tree) && echo $tree'
35
+ 'tree=$(git write-tree) && echo $tree'
36
37
sed -e 's/line/Line/' <path0 >path1
38
rm -f path0
39
test_expect_success \
40
'renamed and edited the file.' \
41
- 'git-update-index --add --remove path0 path1'
41
+ 'git update-index --add --remove path0 path1'
42
43
test_expect_success \
44
- 'git-diff-index -p -M after rename and editing.' \
45
- 'git-diff-index -p -M $tree >current'
44
+ 'git diff-index -p -M after rename and editing.' \
45
+ 'git diff-index -p -M $tree >current'
46
cat >expected <<\EOF
47
diff --git a/path0 b/path1
48
rename from path0
t/t4002-diff-basic.sh
+35
-35
@@ -140,80 +140,80 @@ cmp_diff_files_output () {
140
141
test_expect_success \
142
'diff-tree of known trees.' \
143
- 'git-diff-tree $tree_O $tree_A >.test-a &&
143
+ 'git diff-tree $tree_O $tree_A >.test-a &&
144
cmp -s .test-a .test-plain-OA'
145
146
test_expect_success \
147
'diff-tree of known trees.' \
148
- 'git-diff-tree -r $tree_O $tree_A >.test-a &&
148
+ 'git diff-tree -r $tree_O $tree_A >.test-a &&
149
cmp -s .test-a .test-recursive-OA'
150
151
test_expect_success \
152
'diff-tree of known trees.' \
153
- 'git-diff-tree $tree_O $tree_B >.test-a &&
153
+ 'git diff-tree $tree_O $tree_B >.test-a &&
154
cmp -s .test-a .test-plain-OB'
155
156
test_expect_success \
157
'diff-tree of known trees.' \
158
- 'git-diff-tree -r $tree_O $tree_B >.test-a &&
158
+ 'git diff-tree -r $tree_O $tree_B >.test-a &&
159
cmp -s .test-a .test-recursive-OB'
160
161
test_expect_success \
162
'diff-tree of known trees.' \
163
- 'git-diff-tree $tree_A $tree_B >.test-a &&
163
+ 'git diff-tree $tree_A $tree_B >.test-a &&
164
cmp -s .test-a .test-plain-AB'
165
166
test_expect_success \
167
'diff-tree of known trees.' \
168
- 'git-diff-tree -r $tree_A $tree_B >.test-a &&
168
+ 'git diff-tree -r $tree_A $tree_B >.test-a &&
169
cmp -s .test-a .test-recursive-AB'
170
171
test_expect_success \
172
'diff-cache O with A in cache' \
173
- 'git-read-tree $tree_A &&
174
- git-diff-index --cached $tree_O >.test-a &&
173
+ 'git read-tree $tree_A &&
174
+ git diff-index --cached $tree_O >.test-a &&
175
cmp -s .test-a .test-recursive-OA'
176
177
test_expect_success \
178
'diff-cache O with B in cache' \
179
- 'git-read-tree $tree_B &&
180
- git-diff-index --cached $tree_O >.test-a &&
179
+ 'git read-tree $tree_B &&
180
+ git diff-index --cached $tree_O >.test-a &&
181
cmp -s .test-a .test-recursive-OB'
182
183
test_expect_success \
184
'diff-cache A with B in cache' \
185
- 'git-read-tree $tree_B &&
186
- git-diff-index --cached $tree_A >.test-a &&
185
+ 'git read-tree $tree_B &&
186
+ git diff-index --cached $tree_A >.test-a &&
187
cmp -s .test-a .test-recursive-AB'
188
189
test_expect_success \
190
'diff-files with O in cache and A checked out' \
191
'rm -fr Z [A-Z][A-Z] &&
192
- git-read-tree $tree_A &&
193
- git-checkout-index -f -a &&
194
- git-read-tree --reset $tree_O || return 1
195
- git-update-index --refresh >/dev/null ;# this can exit non-zero
196
- git-diff-files >.test-a &&
192
+ git read-tree $tree_A &&
193
+ git checkout-index -f -a &&
194
+ git read-tree --reset $tree_O || return 1
195
+ git update-index --refresh >/dev/null ;# this can exit non-zero
196
+ git diff-files >.test-a &&
197
cmp_diff_files_output .test-a .test-recursive-OA'
198
199
test_expect_success \
200
'diff-files with O in cache and B checked out' \
201
'rm -fr Z [A-Z][A-Z] &&
202
- git-read-tree $tree_B &&
203
- git-checkout-index -f -a &&
204
- git-read-tree --reset $tree_O || return 1
205
- git-update-index --refresh >/dev/null ;# this can exit non-zero
206
- git-diff-files >.test-a &&
202
+ git read-tree $tree_B &&
203
+ git checkout-index -f -a &&
204
+ git read-tree --reset $tree_O || return 1
205
+ git update-index --refresh >/dev/null ;# this can exit non-zero
206
+ git diff-files >.test-a &&
207
cmp_diff_files_output .test-a .test-recursive-OB'
208
209
test_expect_success \
210
'diff-files with A in cache and B checked out' \
211
'rm -fr Z [A-Z][A-Z] &&
212
- git-read-tree $tree_B &&
213
- git-checkout-index -f -a &&
214
- git-read-tree --reset $tree_A || return 1
215
- git-update-index --refresh >/dev/null ;# this can exit non-zero
216
- git-diff-files >.test-a &&
212
+ git read-tree $tree_B &&
213
+ git checkout-index -f -a &&
214
+ git read-tree --reset $tree_A || return 1
215
+ git update-index --refresh >/dev/null ;# this can exit non-zero
216
+ git diff-files >.test-a &&
217
cmp_diff_files_output .test-a .test-recursive-AB'
218
219
################################################################
@@ -222,26 +222,26 @@ test_expect_success \
222
223
test_expect_success \
224
'diff-tree O A == diff-tree -R A O' \
225
- 'git-diff-tree $tree_O $tree_A >.test-a &&
226
- git-diff-tree -R $tree_A $tree_O >.test-b &&
225
+ 'git diff-tree $tree_O $tree_A >.test-a &&
226
+ git diff-tree -R $tree_A $tree_O >.test-b &&
227
cmp -s .test-a .test-b'
228
229
test_expect_success \
230
'diff-tree -r O A == diff-tree -r -R A O' \
231
- 'git-diff-tree -r $tree_O $tree_A >.test-a &&
232
- git-diff-tree -r -R $tree_A $tree_O >.test-b &&
231
+ 'git diff-tree -r $tree_O $tree_A >.test-a &&
232
+ git diff-tree -r -R $tree_A $tree_O >.test-b &&
233
cmp -s .test-a .test-b'
234
235
test_expect_success \
236
'diff-tree B A == diff-tree -R A B' \
237
- 'git-diff-tree $tree_B $tree_A >.test-a &&
238
- git-diff-tree -R $tree_A $tree_B >.test-b &&
237
+ 'git diff-tree $tree_B $tree_A >.test-a &&
238
+ git diff-tree -R $tree_A $tree_B >.test-b &&
239
cmp -s .test-a .test-b'
240
241
test_expect_success \
242
'diff-tree -r B A == diff-tree -r -R A B' \
243
- 'git-diff-tree -r $tree_B $tree_A >.test-a &&
244
- git-diff-tree -r -R $tree_A $tree_B >.test-b &&
243
+ 'git diff-tree -r $tree_B $tree_A >.test-a &&
244
+ git diff-tree -r -R $tree_A $tree_B >.test-b &&
245
cmp -s .test-a .test-b'
246
247
test_done
t/t4003-diff-rename-1.sh
+9
-9
@@ -13,8 +13,8 @@ test_expect_success \
13
'prepare reference tree' \
14
'cat ../../COPYING >COPYING &&
15
echo frotz >rezrov &&
16
- git-update-index --add COPYING rezrov &&
17
- tree=$(git-write-tree) &&
16
+ git update-index --add COPYING rezrov &&
17
+ tree=$(git write-tree) &&
18
echo $tree'
19
20
test_expect_success \
@@ -22,14 +22,14 @@ test_expect_success \
22
'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23
sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24
rm -f COPYING &&
25
- git-update-index --add --remove COPYING COPYING.?'
25
+ git update-index --add --remove COPYING COPYING.?'
26
27
# tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28
# both are slightly edited, and unchanged rezrov. So we say you
29
# copy-and-edit one, and rename-and-edit the other. We do not say
30
# anything about rezrov.
31
32
-GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree >current
32
+GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current
33
cat >expected <<\EOF
34
diff --git a/COPYING b/COPYING.1
35
copy from COPYING
@@ -62,14 +62,14 @@ test_expect_success \
62
test_expect_success \
63
'prepare work tree again' \
64
'mv COPYING.2 COPYING &&
65
- git-update-index --add --remove COPYING COPYING.1 COPYING.2'
65
+ git update-index --add --remove COPYING COPYING.1 COPYING.2'
66
67
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
68
# both are slightly edited, and unchanged rezrov. So we say you
69
# edited one, and copy-and-edit the other. We do not say
70
# anything about rezrov.
71
72
-GIT_DIFF_OPTS=--unified=0 git-diff-index -C -p $tree >current
72
+GIT_DIFF_OPTS=--unified=0 git diff-index -C -p $tree >current
73
cat >expected <<\EOF
74
diff --git a/COPYING b/COPYING
75
--- a/COPYING
@@ -100,16 +100,16 @@ test_expect_success \
100
test_expect_success \
101
'prepare work tree once again' \
102
'cat ../../COPYING >COPYING &&
103
- git-update-index --add --remove COPYING COPYING.1'
103
+ git update-index --add --remove COPYING COPYING.1'
104
105
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
106
# but COPYING is not edited. We say you copy-and-edit COPYING.1; this
107
# is only possible because -C mode now reports the unmodified file to
108
# the diff-core. Unchanged rezrov, although being fed to
109
-# git-diff-index as well, should not be mentioned.
109
+# git diff-index as well, should not be mentioned.
110
111
GIT_DIFF_OPTS=--unified=0 \
112
- git-diff-index -C --find-copies-harder -p $tree >current
112
+ git diff-index -C --find-copies-harder -p $tree >current
113
cat >expected <<\EOF
114
diff --git a/COPYING b/COPYING.1
115
copy from COPYING
t/t4004-diff-rename-symlink.sh
+4
-4
@@ -16,8 +16,8 @@ test_expect_success \
16
'prepare reference tree' \
17
'echo xyzzy | tr -d '\\\\'012 >yomin &&
18
ln -s xyzzy frotz &&
19
- git-update-index --add frotz yomin &&
20
- tree=$(git-write-tree) &&
19
+ git update-index --add frotz yomin &&
20
+ tree=$(git write-tree) &&
21
echo $tree'
22
23
test_expect_success \
@@ -26,7 +26,7 @@ test_expect_success \
26
rm -f yomin &&
27
ln -s xyzzy nitfol &&
28
ln -s xzzzy bozbar &&
29
- git-update-index --add --remove frotz rezrov nitfol bozbar yomin'
29
+ git update-index --add --remove frotz rezrov nitfol bozbar yomin'
30
31
# tree has frotz pointing at xyzzy, and yomin that contains xyzzy to
32
# confuse things. work tree has rezrov (xyzzy) nitfol (xyzzy) and
@@ -34,7 +34,7 @@ test_expect_success \
34
# rezrov and nitfol are rename/copy of frotz and bozbar should be
35
# a new creation.
36
37
-GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree >current
37
+GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree >current
38
cat >expected <<\EOF
39
diff --git a/bozbar b/bozbar
40
new file mode 120000
t/t4005-diff-rename-2.sh
+8
-8
@@ -13,8 +13,8 @@ test_expect_success \
13
'prepare reference tree' \
14
'cat ../../COPYING >COPYING &&
15
echo frotz >rezrov &&
16
- git-update-index --add COPYING rezrov &&
17
- tree=$(git-write-tree) &&
16
+ git update-index --add COPYING rezrov &&
17
+ tree=$(git write-tree) &&
18
echo $tree'
19
20
test_expect_success \
@@ -22,14 +22,14 @@ test_expect_success \
22
'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23
sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24
rm -f COPYING &&
25
- git-update-index --add --remove COPYING COPYING.?'
25
+ git update-index --add --remove COPYING COPYING.?'
26
27
# tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28
# both are slightly edited, and unchanged rezrov. We say COPYING.1
29
# and COPYING.2 are based on COPYING, and do not say anything about
30
# rezrov.
31
32
-git-diff-index -M $tree >current
32
+git diff-index -M $tree >current
33
34
cat >expected <<\EOF
35
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
@@ -45,14 +45,14 @@ test_expect_success \
45
test_expect_success \
46
'prepare work tree again' \
47
'mv COPYING.2 COPYING &&
48
- git-update-index --add --remove COPYING COPYING.1 COPYING.2'
48
+ git update-index --add --remove COPYING COPYING.1 COPYING.2'
49
50
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
51
# both are slightly edited, and unchanged rezrov. We say COPYING.1
52
# is based on COPYING and COPYING is still there, and do not say anything
53
# about rezrov.
54
55
-git-diff-index -C $tree >current
55
+git diff-index -C $tree >current
56
cat >expected <<\EOF
57
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 M COPYING
58
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
@@ -72,9 +72,9 @@ test_expect_success \
72
test_expect_success \
73
'prepare work tree once again' \
74
'cat ../../COPYING >COPYING &&
75
- git-update-index --add --remove COPYING COPYING.1'
75
+ git update-index --add --remove COPYING COPYING.1'
76
77
-git-diff-index -C --find-copies-harder $tree >current
77
+git diff-index -C --find-copies-harder $tree >current
78
cat >expected <<\EOF
79
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234 COPYING COPYING.1
80
EOF
t/t4006-diff-mode.sh
+8
-8
@@ -11,24 +11,24 @@ test_description='Test mode change diffs.
11
test_expect_success \
12
'setup' \
13
'echo frotz >rezrov &&
14
- git-update-index --add rezrov &&
15
- tree=`git-write-tree` &&
14
+ git update-index --add rezrov &&
15
+ tree=`git write-tree` &&
16
echo $tree'
17
18
if [ "$(git config --get core.filemode)" = false ]
19
then
20
say 'filemode disabled on the filesystem, using update-index --chmod=+x'
21
test_expect_success \
22
- 'git-update-index --chmod=+x' \
23
- 'git-update-index rezrov &&
24
- git-update-index --chmod=+x rezrov &&
25
- git-diff-index $tree >current'
22
+ 'git update-index --chmod=+x' \
23
+ 'git update-index rezrov &&
24
+ git update-index --chmod=+x rezrov &&
25
+ git diff-index $tree >current'
26
else
27
test_expect_success \
28
'chmod' \
29
'chmod +x rezrov &&
30
- git-update-index rezrov &&
31
- git-diff-index $tree >current'
30
+ git update-index rezrov &&
31
+ git diff-index $tree >current'
32
fi
33
34
_x40='[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]'
t/t4007-rename-3.sh
+8
-8
@@ -13,20 +13,20 @@ test_expect_success \
13
'prepare reference tree' \
14
'mkdir path0 path1 &&
15
cp ../../COPYING path0/COPYING &&
16
- git-update-index --add path0/COPYING &&
17
- tree=$(git-write-tree) &&
16
+ git update-index --add path0/COPYING &&
17
+ tree=$(git write-tree) &&
18
echo $tree'
19
20
test_expect_success \
21
'prepare work tree' \
22
'cp path0/COPYING path1/COPYING &&
23
- git-update-index --add --remove path0/COPYING path1/COPYING'
23
+ git update-index --add --remove path0/COPYING path1/COPYING'
24
25
# In the tree, there is only path0/COPYING. In the cache, path0 and
26
# path1 both have COPYING and the latter is a copy of path0/COPYING.
27
# Comparing the full tree with cache should tell us so.
28
29
-git-diff-index -C --find-copies-harder $tree >current
29
+git diff-index -C --find-copies-harder $tree >current
30
31
cat >expected <<\EOF
32
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 C100 path0/COPYING path1/COPYING
@@ -42,7 +42,7 @@ test_expect_success \
42
# path1/COPYING suddenly appearing from nowhere, not detected as
43
# a copy from path0/COPYING.
44
45
-git-diff-index -C $tree path1 >current
45
+git diff-index -C $tree path1 >current
46
47
cat >expected <<\EOF
48
:000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
@@ -55,14 +55,14 @@ test_expect_success \
55
test_expect_success \
56
'tweak work tree' \
57
'rm -f path0/COPYING &&
58
- git-update-index --remove path0/COPYING'
58
+ git update-index --remove path0/COPYING'
59
60
# In the tree, there is only path0/COPYING. In the cache, path0 does
61
# not have COPYING anymore and path1 has COPYING which is a copy of
62
# path0/COPYING. Showing the full tree with cache should tell us about
63
# the rename.
64
65
-git-diff-index -C $tree >current
65
+git diff-index -C $tree >current
66
67
cat >expected <<\EOF
68
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 R100 path0/COPYING path1/COPYING
@@ -77,7 +77,7 @@ test_expect_success \
77
# path0/COPYING. When we say we care only about path1, we should just
78
# see path1/COPYING appearing from nowhere.
79
80
-git-diff-index -C $tree path1 >current
80
+git diff-index -C $tree path1 >current
81
82
cat >expected <<\EOF
83
:000000 100644 0000000000000000000000000000000000000000 6ff87c4664981e4397625791c8ea3bbb5f2279a3 A path1/COPYING
t/t4008-diff-break-rewrite.sh
+19
-19
@@ -28,19 +28,19 @@ test_expect_success \
28
setup \
29
'cat ../../README >file0 &&
30
cat ../../COPYING >file1 &&
31
- git-update-index --add file0 file1 &&
32
- tree=$(git-write-tree) &&
31
+ git update-index --add file0 file1 &&
32
+ tree=$(git write-tree) &&
33
echo "$tree"'
34
35
test_expect_success \
36
'change file1 with copy-edit of file0 and remove file0' \
37
'sed -e "s/git/GIT/" file0 >file1 &&
38
rm -f file0 &&
39
- git-update-index --remove file0 file1'
39
+ git update-index --remove file0 file1'
40
41
test_expect_success \
42
'run diff with -B' \
43
- 'git-diff-index -B --cached "$tree" >current'
43
+ 'git diff-index -B --cached "$tree" >current'
44
45
cat >expected <<\EOF
46
:100644 000000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 0000000000000000000000000000000000000000 D file0
@@ -53,7 +53,7 @@ test_expect_success \
53
54
test_expect_success \
55
'run diff with -B and -M' \
56
- 'git-diff-index -B -M "$tree" >current'
56
+ 'git diff-index -B -M "$tree" >current'
57
58
cat >expected <<\EOF
59
:100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 08bb2fb671deff4c03a4d4a0a1315dff98d5732c R100 file0 file1
@@ -66,16 +66,16 @@ test_expect_success \
66
test_expect_success \
67
'swap file0 and file1' \
68
'rm -f file0 file1 &&
69
- git-read-tree -m $tree &&
70
- git-checkout-index -f -u -a &&
69
+ git read-tree -m $tree &&
70
+ git checkout-index -f -u -a &&
71
mv file0 tmp &&
72
mv file1 file0 &&
73
mv tmp file1 &&
74
- git-update-index file0 file1'
74
+ git update-index file0 file1'
75
76
test_expect_success \
77
'run diff with -B' \
78
- 'git-diff-index -B "$tree" >current'
78
+ 'git diff-index -B "$tree" >current'
79
80
cat >expected <<\EOF
81
:100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 6ff87c4664981e4397625791c8ea3bbb5f2279a3 M100 file0
@@ -88,7 +88,7 @@ test_expect_success \
88
89
test_expect_success \
90
'run diff with -B and -M' \
91
- 'git-diff-index -B -M "$tree" >current'
91
+ 'git diff-index -B -M "$tree" >current'
92
93
cat >expected <<\EOF
94
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 6ff87c4664981e4397625791c8ea3bbb5f2279a3 R100 file1 file0
@@ -103,11 +103,11 @@ test_expect_success \
103
'make file0 into something completely different' \
104
'rm -f file0 &&
105
ln -s frotz file0 &&
106
- git-update-index file0 file1'
106
+ git update-index file0 file1'
107
108
test_expect_success \
109
'run diff with -B' \
110
- 'git-diff-index -B "$tree" >current'
110
+ 'git diff-index -B "$tree" >current'
111
112
cat >expected <<\EOF
113
:100644 120000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 67be421f88824578857624f7b3dc75e99a8a1481 T file0
@@ -120,7 +120,7 @@ test_expect_success \
120
121
test_expect_success \
122
'run diff with -B' \
123
- 'git-diff-index -B -M "$tree" >current'
123
+ 'git diff-index -B -M "$tree" >current'
124
125
# This should not mistake file0 as the copy source of new file1
126
# due to type differences.
@@ -135,7 +135,7 @@ test_expect_success \
135
136
test_expect_success \
137
'run diff with -M' \
138
- 'git-diff-index -M "$tree" >current'
138
+ 'git diff-index -M "$tree" >current'
139
140
# This should not mistake file0 as the copy source of new file1
141
# due to type differences.
@@ -151,16 +151,16 @@ test_expect_success \
151
test_expect_success \
152
'file1 edited to look like file0 and file0 rename-edited to file2' \
153
'rm -f file0 file1 &&
154
- git-read-tree -m $tree &&
155
- git-checkout-index -f -u -a &&
154
+ git read-tree -m $tree &&
155
+ git checkout-index -f -u -a &&
156
sed -e "s/git/GIT/" file0 >file1 &&
157
sed -e "s/git/GET/" file0 >file2 &&
158
rm -f file0
159
- git-update-index --add --remove file0 file1 file2'
159
+ git update-index --add --remove file0 file1 file2'
160
161
test_expect_success \
162
'run diff with -B' \
163
- 'git-diff-index -B "$tree" >current'
163
+ 'git diff-index -B "$tree" >current'
164
165
cat >expected <<\EOF
166
:100644 000000 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 0000000000000000000000000000000000000000 D file0
@@ -174,7 +174,7 @@ test_expect_success \
174
175
test_expect_success \
176
'run diff with -B -M' \
177
- 'git-diff-index -B -M "$tree" >current'
177
+ 'git diff-index -B -M "$tree" >current'
178
179
cat >expected <<\EOF
180
:100644 100644 f5deac7be59e7eeab8657fd9ae706fd6a57daed2 08bb2fb671deff4c03a4d4a0a1315dff98d5732c C095 file0 file1
t/t4009-diff-rename-4.sh
+8
-8
@@ -13,8 +13,8 @@ test_expect_success \
13
'prepare reference tree' \
14
'cat ../../COPYING >COPYING &&
15
echo frotz >rezrov &&
16
- git-update-index --add COPYING rezrov &&
17
- tree=$(git-write-tree) &&
16
+ git update-index --add COPYING rezrov &&
17
+ tree=$(git write-tree) &&
18
echo $tree'
19
20
test_expect_success \
@@ -22,14 +22,14 @@ test_expect_success \
22
'sed -e 's/HOWEVER/However/' <COPYING >COPYING.1 &&
23
sed -e 's/GPL/G.P.L/g' <COPYING >COPYING.2 &&
24
rm -f COPYING &&
25
- git-update-index --add --remove COPYING COPYING.?'
25
+ git update-index --add --remove COPYING COPYING.?'
26
27
# tree has COPYING and rezrov. work tree has COPYING.1 and COPYING.2,
28
# both are slightly edited, and unchanged rezrov. We say COPYING.1
29
# and COPYING.2 are based on COPYING, and do not say anything about
30
# rezrov.
31
32
-git-diff-index -z -M $tree >current
32
+git diff-index -z -M $tree >current
33
34
cat >expected <<\EOF
35
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234
@@ -49,14 +49,14 @@ test_expect_success \
49
test_expect_success \
50
'prepare work tree again' \
51
'mv COPYING.2 COPYING &&
52
- git-update-index --add --remove COPYING COPYING.1 COPYING.2'
52
+ git update-index --add --remove COPYING COPYING.1 COPYING.2'
53
54
# tree has COPYING and rezrov. work tree has COPYING and COPYING.1,
55
# both are slightly edited, and unchanged rezrov. We say COPYING.1
56
# is based on COPYING and COPYING is still there, and do not say anything
57
# about rezrov.
58
59
-git-diff-index -z -C $tree >current
59
+git diff-index -z -C $tree >current
60
cat >expected <<\EOF
61
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 06c67961bbaed34a127f76d261f4c0bf73eda471 M
62
COPYING
@@ -79,9 +79,9 @@ test_expect_success \
79
test_expect_success \
80
'prepare work tree once again' \
81
'cat ../../COPYING >COPYING &&
82
- git-update-index --add --remove COPYING COPYING.1'
82
+ git update-index --add --remove COPYING COPYING.1'
83
84
-git-diff-index -z -C --find-copies-harder $tree >current
84
+git diff-index -z -C --find-copies-harder $tree >current
85
cat >expected <<\EOF
86
:100644 100644 6ff87c4664981e4397625791c8ea3bbb5f2279a3 0603b3238a076dc6c8022aedc6648fa523a17178 C1234
87
COPYING
t/t4010-diff-pathspec.sh
+8
-8
@@ -17,18 +17,18 @@ test_expect_success \
17
'echo frotz >file0 &&
18
mkdir path1 &&
19
echo rezrov >path1/file1 &&
20
- git-update-index --add file0 path1/file1 &&
21
- tree=`git-write-tree` &&
20
+ git update-index --add file0 path1/file1 &&
21
+ tree=`git write-tree` &&
22
echo "$tree" &&
23
echo nitfol >file0 &&
24
echo yomin >path1/file1 &&
25
- git-update-index file0 path1/file1'
25
+ git update-index file0 path1/file1'
26
27
cat >expected <<\EOF
28
EOF
29
test_expect_success \
30
'limit to path should show nothing' \
31
- 'git-diff-index --cached $tree -- path >current &&
31
+ 'git diff-index --cached $tree -- path >current &&
32
compare_diff_raw current expected'
33
34
cat >expected <<\EOF
@@ -36,7 +36,7 @@ cat >expected <<\EOF
36
EOF
37
test_expect_success \
38
'limit to path1 should show path1/file1' \
39
- 'git-diff-index --cached $tree -- path1 >current &&
39
+ 'git diff-index --cached $tree -- path1 >current &&
40
compare_diff_raw current expected'
41
42
cat >expected <<\EOF
@@ -44,7 +44,7 @@ cat >expected <<\EOF
44
EOF
45
test_expect_success \
46
'limit to path1/ should show path1/file1' \
47
- 'git-diff-index --cached $tree -- path1/ >current &&
47
+ 'git diff-index --cached $tree -- path1/ >current &&
48
compare_diff_raw current expected'
49
50
cat >expected <<\EOF
@@ -52,14 +52,14 @@ cat >expected <<\EOF
52
EOF
53
test_expect_success \
54
'limit to file0 should show file0' \
55
- 'git-diff-index --cached $tree -- file0 >current &&
55
+ 'git diff-index --cached $tree -- file0 >current &&
56
compare_diff_raw current expected'
57
58
cat >expected <<\EOF
59
EOF
60
test_expect_success \
61
'limit to file0/ should emit nothing.' \
62
- 'git-diff-index --cached $tree -- file0/ >current &&
62
+ 'git diff-index --cached $tree -- file0/ >current &&
63
compare_diff_raw current expected'
64
65
test_done
t/t4011-diff-symlink.sh
+10
-10
@@ -23,17 +23,17 @@ EOF
23
test_expect_success \
24
'diff new symlink' \
25
'ln -s xyzzy frotz &&
26
- git-update-index &&
27
- tree=$(git-write-tree) &&
28
- git-update-index --add frotz &&
29
- GIT_DIFF_OPTS=--unified=0 git-diff-index -M -p $tree > current &&
26
+ git update-index &&
27
+ tree=$(git write-tree) &&
28
+ git update-index --add frotz &&
29
+ GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree > current &&
30
compare_diff_patch current expected'
31
32
test_expect_success \
33
'diff unchanged symlink' \
34
- 'tree=$(git-write-tree) &&
35
- git-update-index frotz &&
36
- test -z "$(git-diff-index --name-only $tree)"'
34
+ 'tree=$(git write-tree) &&
35
+ git update-index frotz &&
36
+ test -z "$(git diff-index --name-only $tree)"'
37
38
cat > expected << EOF
39
diff --git a/frotz b/frotz
@@ -49,7 +49,7 @@ EOF
49
test_expect_success \
50
'diff removed symlink' \
51
'rm frotz &&
52
- git-diff-index -M -p $tree > current &&
52
+ git diff-index -M -p $tree > current &&
53
compare_diff_patch current expected'
54
55
cat > expected << EOF
@@ -60,7 +60,7 @@ test_expect_success \
60
'diff identical, but newly created symlink' \
61
'sleep 3 &&
62
ln -s xyzzy frotz &&
63
- git-diff-index -M -p $tree > current &&
63
+ git diff-index -M -p $tree > current &&
64
compare_diff_patch current expected'
65
66
cat > expected << EOF
@@ -79,7 +79,7 @@ test_expect_success \
79
'diff different symlink' \
80
'rm frotz &&
81
ln -s yxyyz frotz &&
82
- git-diff-index -M -p $tree > current &&
82
+ git diff-index -M -p $tree > current &&
83
compare_diff_patch current expected'
84
85
test_done
t/t4012-diff-binary.sh
+13
-13
@@ -10,7 +10,7 @@ test_description='Binary diff and apply
10
11
test_expect_success 'prepare repository' \
12
'echo AIT >a && echo BIT >b && echo CIT >c && echo DIT >d &&
13
- git-update-index --add a b c d &&
13
+ git update-index --add a b c d &&
14
echo git >a &&
15
cat ../test4012.png >b &&
16
echo git >c &&
@@ -24,18 +24,18 @@ cat > expected <<\EOF
24
4 files changed, 2 insertions(+), 2 deletions(-)
25
EOF
26
test_expect_success 'diff without --binary' \
27
- 'git-diff | git-apply --stat --summary >current &&
27
+ 'git diff | git apply --stat --summary >current &&
28
cmp current expected'
29
30
test_expect_success 'diff with --binary' \
31
- 'git-diff --binary | git-apply --stat --summary >current &&
31
+ 'git diff --binary | git apply --stat --summary >current &&
32
cmp current expected'
33
34
# apply needs to be able to skip the binary material correctly
35
# in order to report the line number of a corrupt patch.
36
test_expect_success 'apply detecting corrupt patch correctly' \
37
- 'git-diff | sed -e 's/-CIT/xCIT/' >broken &&
38
- if git-apply --stat --summary broken 2>detected
37
+ 'git diff | sed -e 's/-CIT/xCIT/' >broken &&
38
+ if git apply --stat --summary broken 2>detected
39
then
40
echo unhappy - should have detected an error
41
(exit 1)
@@ -48,8 +48,8 @@ test_expect_success 'apply detecting corrupt patch correctly' \
48
test "$detected" = xCIT'
49
50
test_expect_success 'apply detecting corrupt patch correctly' \
51
- 'git-diff --binary | sed -e 's/-CIT/xCIT/' >broken &&
52
- if git-apply --stat --summary broken 2>detected
51
+ 'git diff --binary | sed -e 's/-CIT/xCIT/' >broken &&
52
+ if git apply --stat --summary broken 2>detected
53
then
54
echo unhappy - should have detected an error
55
(exit 1)
@@ -66,15 +66,15 @@ test_expect_success 'initial commit' 'git-commit -a -m initial'
66
# Try removal (b), modification (d), and creation (e).
67
test_expect_success 'diff-index with --binary' \
68
'echo AIT >a && mv b e && echo CIT >c && cat e >d &&
69
- git-update-index --add --remove a b c d e &&
70
- tree0=`git-write-tree` &&
71
- git-diff --cached --binary >current &&
72
- git-apply --stat --summary current'
69
+ git update-index --add --remove a b c d e &&
70
+ tree0=`git write-tree` &&
71
+ git diff --cached --binary >current &&
72
+ git apply --stat --summary current'
73
74
test_expect_success 'apply binary patch' \
75
'git-reset --hard &&
76
- git-apply --binary --index <current &&
77
- tree1=`git-write-tree` &&
76
+ git apply --binary --index <current &&
77
+ tree1=`git write-tree` &&
78
test "$tree1" = "$tree0"'
79
80
test_done
t/t4015-diff-whitespace.sh
+8
-8
@@ -17,7 +17,7 @@ do {
17
} while (0);
18
EOF
19
20
-git-update-index --add x
20
+git update-index --add x
21
22
cat << EOF > x
23
do
@@ -42,13 +42,13 @@ index adf3937..6edc172 100644
42
+while (0);
43
EOF
44
45
-git-diff > out
45
+git diff > out
46
test_expect_success "Ray's example without options" 'git diff expect out'
47
48
-git-diff -w > out
48
+git diff -w > out
49
test_expect_success "Ray's example with -w" 'git diff expect out'
50
51
-git-diff -b > out
51
+git diff -b > out
52
test_expect_success "Ray's example with -b" 'git diff expect out'
53
54
tr 'Q' '\015' << EOF > x
@@ -60,7 +60,7 @@ unchanged line
60
CR at endQ
61
EOF
62
63
-git-update-index x
63
+git update-index x
64
65
cat << EOF > x
66
whitespace at beginning
@@ -89,14 +89,14 @@ index d99af23..8b32fb5 100644
89
-CR at endQ
90
+CR at end
91
EOF
92
-git-diff > out
92
+git diff > out
93
test_expect_success 'another test, without options' 'git diff expect out'
94
95
cat << EOF > expect
96
diff --git a/x b/x
97
index d99af23..8b32fb5 100644
98
EOF
99
-git-diff -w > out
99
+git diff -w > out
100
test_expect_success 'another test, with -w' 'git diff expect out'
101
102
tr 'Q' '\015' << EOF > expect
@@ -114,7 +114,7 @@ index d99af23..8b32fb5 100644
114
unchanged line
115
CR at endQ
116
EOF
117
-git-diff -b > out
117
+git diff -b > out
118
test_expect_success 'another test, with -b' 'git diff expect out'
119
120
test_done
t/t4100-apply-stat.sh
+8
-8
@@ -3,44 +3,44 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply --stat --summary test.
6
+test_description='git apply --stat --summary test.
7
8
'
9
. ./test-lib.sh
10
11
test_expect_success \
12
'rename' \
13
- 'git-apply --stat --summary <../t4100/t-apply-1.patch >current &&
13
+ 'git apply --stat --summary <../t4100/t-apply-1.patch >current &&
14
git diff ../t4100/t-apply-1.expect current'
15
16
test_expect_success \
17
'copy' \
18
- 'git-apply --stat --summary <../t4100/t-apply-2.patch >current &&
18
+ 'git apply --stat --summary <../t4100/t-apply-2.patch >current &&
19
git diff ../t4100/t-apply-2.expect current'
20
21
test_expect_success \
22
'rewrite' \
23
- 'git-apply --stat --summary <../t4100/t-apply-3.patch >current &&
23
+ 'git apply --stat --summary <../t4100/t-apply-3.patch >current &&
24
git diff ../t4100/t-apply-3.expect current'
25
26
test_expect_success \
27
'mode' \
28
- 'git-apply --stat --summary <../t4100/t-apply-4.patch >current &&
28
+ 'git apply --stat --summary <../t4100/t-apply-4.patch >current &&
29
git diff ../t4100/t-apply-4.expect current'
30
31
test_expect_success \
32
'non git' \
33
- 'git-apply --stat --summary <../t4100/t-apply-5.patch >current &&
33
+ 'git apply --stat --summary <../t4100/t-apply-5.patch >current &&
34
git diff ../t4100/t-apply-5.expect current'
35
36
test_expect_success \
37
'non git' \
38
- 'git-apply --stat --summary <../t4100/t-apply-6.patch >current &&
38
+ 'git apply --stat --summary <../t4100/t-apply-6.patch >current &&
39
git diff ../t4100/t-apply-6.expect current'
40
41
test_expect_success \
42
'non git' \
43
- 'git-apply --stat --summary <../t4100/t-apply-7.patch >current &&
43
+ 'git apply --stat --summary <../t4100/t-apply-7.patch >current &&
44
git diff ../t4100/t-apply-7.expect current'
45
46
test_done
t/t4101-apply-nonl.sh
+2
-2
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply should handle files with incomplete lines.
6
+test_description='git apply should handle files with incomplete lines.
7
8
'
9
. ./test-lib.sh
@@ -23,7 +23,7 @@ do
23
cat frotz.$i >frotz
24
test_expect_success \
25
"apply diff between $i and $j" \
26
- "git-apply <../t4101/diff.$i-$j && diff frotz.$j frotz"
26
+ "git apply <../t4101/diff.$i-$j && diff frotz.$j frotz"
27
done
28
done
29
t/t4102-apply-rename.sh
+5
-5
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply handling copy/rename patch.
6
+test_description='git apply handling copy/rename patch.
7
8
'
9
. ./test-lib.sh
@@ -26,10 +26,10 @@ echo 'This is foo' >foo
26
chmod +x foo
27
28
test_expect_success setup \
29
- 'git-update-index --add foo'
29
+ 'git update-index --add foo'
30
31
test_expect_success apply \
32
- 'git-apply --index --stat --summary --apply test-patch'
32
+ 'git apply --index --stat --summary --apply test-patch'
33
34
if [ "$(git config --get core.filemode)" = false ]
35
then
@@ -40,7 +40,7 @@ else
40
fi
41
42
test_expect_success 'apply reverse' \
43
- 'git-apply -R --index --stat --summary --apply test-patch &&
43
+ 'git apply -R --index --stat --summary --apply test-patch &&
44
test "$(cat foo)" = "This is foo"'
45
46
cat >test-patch <<\EOF
@@ -56,7 +56,7 @@ copy to bar
56
EOF
57
58
test_expect_success 'apply copy' \
59
- 'git-apply --index --stat --summary --apply test-patch &&
59
+ 'git apply --index --stat --summary --apply test-patch &&
60
test "$(cat bar)" = "This is bar" -a "$(cat foo)" = "This is foo"'
61
62
test_done
t/t4103-apply-binary.sh
+26
-26
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply handling binary patches
6
+test_description='git apply handling binary patches
7
8
'
9
. ./test-lib.sh
@@ -20,55 +20,55 @@ EOF
20
cat file1 >file2
21
cat file1 >file4
22
23
-git-update-index --add --remove file1 file2 file4
23
+git update-index --add --remove file1 file2 file4
24
git-commit -m 'Initial Version' 2>/dev/null
25
26
git-checkout -b binary
27
tr 'x' '\0' <file1 >file3
28
cat file3 >file4
29
-git-add file2
29
+git add file2
30
tr '\0' 'v' <file3 >file1
31
rm -f file2
32
-git-update-index --add --remove file1 file2 file3 file4
32
+git update-index --add --remove file1 file2 file3 file4
33
git-commit -m 'Second Version'
34
35
-git-diff-tree -p master binary >B.diff
36
-git-diff-tree -p -C master binary >C.diff
35
+git diff-tree -p master binary >B.diff
36
+git diff-tree -p -C master binary >C.diff
37
38
-git-diff-tree -p --binary master binary >BF.diff
39
-git-diff-tree -p --binary -C master binary >CF.diff
38
+git diff-tree -p --binary master binary >BF.diff
39
+git diff-tree -p --binary -C master binary >CF.diff
40
41
test_expect_success 'stat binary diff -- should not fail.' \
42
'git-checkout master
43
- git-apply --stat --summary B.diff'
43
+ git apply --stat --summary B.diff'
44
45
test_expect_success 'stat binary diff (copy) -- should not fail.' \
46
'git-checkout master
47
- git-apply --stat --summary C.diff'
47
+ git apply --stat --summary C.diff'
48
49
test_expect_failure 'check binary diff -- should fail.' \
50
'git-checkout master
51
- git-apply --check B.diff'
51
+ git apply --check B.diff'
52
53
test_expect_failure 'check binary diff (copy) -- should fail.' \
54
'git-checkout master
55
- git-apply --check C.diff'
55
+ git apply --check C.diff'
56
57
test_expect_failure 'check incomplete binary diff with replacement -- should fail.' \
58
'git-checkout master
59
- git-apply --check --allow-binary-replacement B.diff'
59
+ git apply --check --allow-binary-replacement B.diff'
60
61
test_expect_failure 'check incomplete binary diff with replacement (copy) -- should fail.' \
62
'git-checkout master
63
- git-apply --check --allow-binary-replacement C.diff'
63
+ git apply --check --allow-binary-replacement C.diff'
64
65
test_expect_success 'check binary diff with replacement.' \
66
'git-checkout master
67
- git-apply --check --allow-binary-replacement BF.diff'
67
+ git apply --check --allow-binary-replacement BF.diff'
68
69
test_expect_success 'check binary diff with replacement (copy).' \
70
'git-checkout master
71
- git-apply --check --allow-binary-replacement CF.diff'
71
+ git apply --check --allow-binary-replacement CF.diff'
72
73
# Now we start applying them.
74
@@ -80,36 +80,36 @@ do_reset () {
80
81
test_expect_failure 'apply binary diff -- should fail.' \
82
'do_reset
83
- git-apply B.diff'
83
+ git apply B.diff'
84
85
test_expect_failure 'apply binary diff -- should fail.' \
86
'do_reset
87
- git-apply --index B.diff'
87
+ git apply --index B.diff'
88
89
test_expect_failure 'apply binary diff (copy) -- should fail.' \
90
'do_reset
91
- git-apply C.diff'
91
+ git apply C.diff'
92
93
test_expect_failure 'apply binary diff (copy) -- should fail.' \
94
'do_reset
95
- git-apply --index C.diff'
95
+ git apply --index C.diff'
96
97
test_expect_success 'apply binary diff without replacement.' \
98
'do_reset
99
- git-apply BF.diff'
99
+ git apply BF.diff'
100
101
test_expect_success 'apply binary diff without replacement (copy).' \
102
'do_reset
103
- git-apply CF.diff'
103
+ git apply CF.diff'
104
105
test_expect_success 'apply binary diff.' \
106
'do_reset
107
- git-apply --allow-binary-replacement --index BF.diff &&
108
- test -z "$(git-diff --name-status binary)"'
107
+ git apply --allow-binary-replacement --index BF.diff &&
108
+ test -z "$(git diff --name-status binary)"'
109
110
test_expect_success 'apply binary diff (copy).' \
111
'do_reset
112
- git-apply --allow-binary-replacement --index CF.diff &&
113
- test -z "$(git-diff --name-status binary)"'
112
+ git apply --allow-binary-replacement --index CF.diff &&
113
+ test -z "$(git diff --name-status binary)"'
114
115
test_done
t/t4104-apply-boundary.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply boundary tests
6
+test_description='git apply boundary tests
7
8
'
9
. ./test-lib.sh
t/t4109-apply-multifrag.sh
+7
-7
@@ -4,7 +4,7 @@
4
# Copyright (c) 2005 Robert Fitzsimons
5
#
6
7
-test_description='git-apply test patches with multiple fragments.
7
+test_description='git apply test patches with multiple fragments.
8
9
'
10
. ./test-lib.sh
@@ -138,8 +138,8 @@ diff --git a/main.c b/main.c
138
139
EOF
140
141
-test_expect_success "S = git-apply (1)" \
142
- 'git-apply patch1.patch patch2.patch'
141
+test_expect_success "S = git apply (1)" \
142
+ 'git apply patch1.patch patch2.patch'
143
mv main.c main.c.git
144
145
test_expect_success "S = patch (1)" \
@@ -150,8 +150,8 @@ test_expect_success "S = cmp (1)" \
150
151
rm -f main.c main.c.git
152
153
-test_expect_success "S = git-apply (2)" \
154
- 'git-apply patch1.patch patch2.patch patch3.patch'
153
+test_expect_success "S = git apply (2)" \
154
+ 'git apply patch1.patch patch2.patch patch3.patch'
155
mv main.c main.c.git
156
157
test_expect_success "S = patch (2)" \
@@ -162,8 +162,8 @@ test_expect_success "S = cmp (2)" \
162
163
rm -f main.c main.c.git
164
165
-test_expect_success "S = git-apply (3)" \
166
- 'git-apply patch1.patch patch4.patch'
165
+test_expect_success "S = git apply (3)" \
166
+ 'git apply patch1.patch patch4.patch'
167
mv main.c main.c.git
168
169
test_expect_success "S = patch (3)" \
t/t4110-apply-scan.sh
+3
-3
@@ -4,7 +4,7 @@
4
# Copyright (c) 2005 Robert Fitzsimons
5
#
6
7
-test_description='git-apply test for patches which require scanning forwards and backwards.
7
+test_description='git apply test for patches which require scanning forwards and backwards.
8
9
'
10
. ./test-lib.sh
@@ -86,8 +86,8 @@ diff --git a/new.txt b/new.txt
86
+c2222
87
EOF
88
89
-test_expect_success "S = git-apply scan" \
90
- 'git-apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch'
89
+test_expect_success "S = git apply scan" \
90
+ 'git apply patch1.patch patch2.patch patch3.patch patch4.patch patch5.patch'
91
mv new.txt apply.txt
92
93
test_expect_success "S = patch scan" \
t/t4112-apply-renames.sh
+4
-4
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply should not get confused with rename/copy.
6
+test_description='git apply should not get confused with rename/copy.
7
8
'
9
@@ -115,10 +115,10 @@ rename to include/arch/m32r/klibc/archsetjmp.h
115
+#endif /* _KLIBC_ARCHSETJMP_H */
116
EOF
117
118
-find klibc -type f -print | xargs git-update-index --add --
118
+find klibc -type f -print | xargs git update-index --add --
119
120
-test_expect_success 'check rename/copy patch' 'git-apply --check patch'
120
+test_expect_success 'check rename/copy patch' 'git apply --check patch'
121
122
-test_expect_success 'apply rename/copy patch' 'git-apply --index patch'
122
+test_expect_success 'apply rename/copy patch' 'git apply --index patch'
123
124
test_done
t/t4113-apply-ending.sh
+5
-5
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Catalin Marinas
4
#
5
6
-test_description='git-apply trying to add an ending line.
6
+test_description='git apply trying to add an ending line.
7
8
'
9
. ./test-lib.sh
@@ -25,12 +25,12 @@ echo 'b' >>file
25
echo 'c' >>file
26
27
test_expect_success setup \
28
- 'git-update-index --add file'
28
+ 'git update-index --add file'
29
30
# test
31
32
test_expect_failure 'apply at the end' \
33
- 'git-apply --index test-patch'
33
+ 'git apply --index test-patch'
34
35
cat >test-patch <<\EOF
36
diff a/file b/file
@@ -45,9 +45,9 @@ EOF
45
echo >file 'a
46
b
47
c'
48
-git-update-index file
48
+git update-index file
49
50
test_expect_failure 'apply at the beginning' \
51
- 'git-apply --index test-patch'
51
+ 'git apply --index test-patch'
52
53
test_done
t/t4114-apply-typechange.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Eric Wong
4
#
5
6
-test_description='git-apply should not get confused with type changes.
6
+test_description='git apply should not get confused with type changes.
7
8
'
9
t/t4115-apply-symlink.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply symlinks and partial files
6
+test_description='git apply symlinks and partial files
7
8
'
9
t/t4116-apply-reverse.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply in reverse
6
+test_description='git apply in reverse
7
8
'
9
t/t4117-apply-reject.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-apply with rejects
6
+test_description='git apply with rejects
7
8
'
9
t/t4118-apply-empty-context.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Junio C Hamano
4
#
5
6
-test_description='git-apply with new style GNU diff with empty context
6
+test_description='git apply with new style GNU diff with empty context
7
8
'
9
t/t4119-apply-config.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2007 Junio C Hamano
4
#
5
6
-test_description='git-apply --whitespace=strip and configuration file.
6
+test_description='git apply --whitespace=strip and configuration file.
7
8
'
9
t/t4120-apply-popt.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2007 Shawn O. Pearce
4
#
5
6
-test_description='git-apply -p handling.'
6
+test_description='git apply -p handling.'
7
8
. ./test-lib.sh
9
t/t4121-apply-diffs.sh
+1
-1
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-apply for contextually independent diffs'
3
+test_description='git apply for contextually independent diffs'
4
. ./test-lib.sh
5
6
echo '1
t/t4200-rerere.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Johannes E. Schindelin
4
#
5
6
-test_description='git-rerere
6
+test_description='git rerere
7
'
8
9
. ./test-lib.sh
t/t4201-shortlog.sh
+1
-1
@@ -3,7 +3,7 @@
3
# Copyright (c) 2006 Johannes E. Schindelin
4
#
5
6
-test_description='git-shortlog
6
+test_description='git shortlog
7
'
8
9
. ./test-lib.sh
t/t5000-tar-tree.sh
+25
-25
@@ -3,7 +3,7 @@
3
# Copyright (C) 2005 Rene Scharfe
4
#
5
6
-test_description='git-tar-tree and git-get-tar-commit-id test
6
+test_description='git tar-tree and git get-tar-commit-id test
7
8
This test covers the topics of file contents, commit date handling and
9
commit id embedding:
@@ -13,13 +13,13 @@ commit id embedding:
13
binary file (/bin/sh). Only paths shorter than 99 characters are
14
used.
15
16
- git-tar-tree applies the commit date to every file in the archive it
16
+ git tar-tree applies the commit date to every file in the archive it
17
creates. The test sets the commit date to a specific value and checks
18
if the tar archive contains that value.
19
20
- When giving git-tar-tree a commit id (in contrast to a tree id) it
20
+ When giving git tar-tree a commit id (in contrast to a tree id) it
21
embeds this commit id into the tar archive as a comment. The test
22
- checks the ability of git-get-tar-commit-id to figure it out from the
22
+ checks the ability of git get-tar-commit-id to figure it out from the
23
tar file.
24
25
'
@@ -42,23 +42,23 @@ test_expect_success \
42
43
test_expect_success \
44
'add files to repository' \
45
- 'find a -type f | xargs git-update-index --add &&
46
- find a -type l | xargs git-update-index --add &&
47
- treeid=`git-write-tree` &&
45
+ 'find a -type f | xargs git update-index --add &&
46
+ find a -type l | xargs git update-index --add &&
47
+ treeid=`git write-tree` &&
48
echo $treeid >treeid &&
49
- git-update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
50
- git-commit-tree $treeid </dev/null)'
49
+ git update-ref HEAD $(TZ=GMT GIT_COMMITTER_DATE="2005-05-27 22:00:00" \
50
+ git commit-tree $treeid </dev/null)'
51
52
test_expect_success \
53
- 'git-archive' \
54
- 'git-archive HEAD >b.tar'
53
+ 'git archive' \
54
+ 'git archive HEAD >b.tar'
55
56
test_expect_success \
57
- 'git-tar-tree' \
58
- 'git-tar-tree HEAD >b2.tar'
57
+ 'git tar-tree' \
58
+ 'git tar-tree HEAD >b2.tar'
59
60
test_expect_success \
61
- 'git-archive vs. git-tar-tree' \
61
+ 'git archive vs. git tar-tree' \
62
'diff b.tar b2.tar'
63
64
test_expect_success \
@@ -70,9 +70,9 @@ test_expect_success \
70
diff expected.mtime b.mtime'
71
72
test_expect_success \
73
- 'git-get-tar-commit-id' \
74
- 'git-get-tar-commit-id <b.tar >b.commitid &&
75
- diff .git/$(git-symbolic-ref HEAD) b.commitid'
73
+ 'git get-tar-commit-id' \
74
+ 'git get-tar-commit-id <b.tar >b.commitid &&
75
+ diff .git/$(git symbolic-ref HEAD) b.commitid'
76
77
test_expect_success \
78
'extract tar archive' \
@@ -88,8 +88,8 @@ test_expect_success \
88
'diff -r a b/a'
89
90
test_expect_success \
91
- 'git-tar-tree with prefix' \
92
- 'git-tar-tree HEAD prefix >c.tar'
91
+ 'git tar-tree with prefix' \
92
+ 'git tar-tree HEAD prefix >c.tar'
93
94
test_expect_success \
95
'extract tar archive with prefix' \
@@ -105,8 +105,8 @@ test_expect_success \
105
'diff -r a c/prefix/a'
106
107
test_expect_success \
108
- 'git-archive --format=zip' \
109
- 'git-archive --format=zip HEAD >d.zip'
108
+ 'git archive --format=zip' \
109
+ 'git archive --format=zip HEAD >d.zip'
110
111
$UNZIP -v >/dev/null 2>&1
112
if [ $? -eq 127 ]; then
@@ -129,8 +129,8 @@ test_expect_success \
129
'diff -r a d/a'
130
131
test_expect_success \
132
- 'git-archive --format=zip with prefix' \
133
- 'git-archive --format=zip --prefix=prefix/ HEAD >e.zip'
132
+ 'git archive --format=zip with prefix' \
133
+ 'git archive --format=zip --prefix=prefix/ HEAD >e.zip'
134
135
test_expect_success \
136
'extract ZIP archive with prefix' \
@@ -146,7 +146,7 @@ test_expect_success \
146
'diff -r a e/prefix/a'
147
148
test_expect_success \
149
- 'git-archive --list outside of a git repo' \
150
- 'GIT_DIR=some/non-existing/directory git-archive --list'
149
+ 'git archive --list outside of a git repo' \
150
+ 'GIT_DIR=some/non-existing/directory git archive --list'
151
152
test_done
t/t5100-mailinfo.sh
+3
-3
@@ -3,12 +3,12 @@
3
# Copyright (c) 2005 Junio C Hamano
4
#
5
6
-test_description='git-mailinfo and git-mailsplit test'
6
+test_description='git mailinfo and git mailsplit test'
7
8
. ./test-lib.sh
9
10
test_expect_success 'split sample box' \
11
- 'git-mailsplit -o. ../t5100/sample.mbox >last &&
11
+ 'git mailsplit -o. ../t5100/sample.mbox >last &&
12
last=`cat last` &&
13
echo total is $last &&
14
test `cat last` = 8'
@@ -16,7 +16,7 @@ test_expect_success 'split sample box' \
16
for mail in `echo 00*`
17
do
18
test_expect_success "mailinfo $mail" \
19
- "git-mailinfo -u msg$mail patch$mail <$mail >info$mail &&
19
+ "git mailinfo -u msg$mail patch$mail <$mail >info$mail &&
20
echo msg &&
21
diff ../t5100/msg$mail msg$mail &&
22
echo patch &&
t/t5300-pack-object.sh
+36
-36
@@ -16,26 +16,26 @@ test_expect_success \
16
for i in a b c
17
do
18
dd if=/dev/zero bs=4k count=1 | tr "\\0" $i >$i &&
19
- git-update-index --add $i || return 1
19
+ git update-index --add $i || return 1
20
done &&
21
- cat c >d && echo foo >>d && git-update-index --add d &&
22
- tree=`git-write-tree` &&
23
- commit=`git-commit-tree $tree </dev/null` && {
21
+ cat c >d && echo foo >>d && git update-index --add d &&
22
+ tree=`git write-tree` &&
23
+ commit=`git commit-tree $tree </dev/null` && {
24
echo $tree &&
25
echo $commit &&
26
- git-ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
26
+ git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
27
} >obj-list && {
28
- git-diff-tree --root -p $commit &&
28
+ git diff-tree --root -p $commit &&
29
while read object
30
do
31
- t=`git-cat-file -t $object` &&
32
- git-cat-file $t $object || return 1
31
+ t=`git cat-file -t $object` &&
32
+ git cat-file $t $object || return 1
33
done <obj-list
34
} >expect'
35
36
test_expect_success \
37
'pack without delta' \
38
- 'packname_1=$(git-pack-objects --window=0 test-1 <obj-list)'
38
+ 'packname_1=$(git pack-objects --window=0 test-1 <obj-list)'
39
40
rm -fr .git2
41
mkdir .git2
@@ -44,9 +44,9 @@ test_expect_success \
44
'unpack without delta' \
45
"GIT_OBJECT_DIRECTORY=.git2/objects &&
46
export GIT_OBJECT_DIRECTORY &&
47
- git-init &&
48
- git-unpack-objects -n <test-1-${packname_1}.pack &&
49
- git-unpack-objects <test-1-${packname_1}.pack"
47
+ git init &&
48
+ git unpack-objects -n <test-1-${packname_1}.pack &&
49
+ git unpack-objects <test-1-${packname_1}.pack"
50
51
unset GIT_OBJECT_DIRECTORY
52
cd "$TRASH/.git2"
@@ -66,7 +66,7 @@ cd "$TRASH"
66
test_expect_success \
67
'pack with REF_DELTA' \
68
'pwd &&
69
- packname_2=$(git-pack-objects test-2 <obj-list)'
69
+ packname_2=$(git pack-objects test-2 <obj-list)'
70
71
rm -fr .git2
72
mkdir .git2
@@ -75,9 +75,9 @@ test_expect_success \
75
'unpack with REF_DELTA' \
76
'GIT_OBJECT_DIRECTORY=.git2/objects &&
77
export GIT_OBJECT_DIRECTORY &&
78
- git-init &&
79
- git-unpack-objects -n <test-2-${packname_2}.pack &&
80
- git-unpack-objects <test-2-${packname_2}.pack'
78
+ git init &&
79
+ git unpack-objects -n <test-2-${packname_2}.pack &&
80
+ git unpack-objects <test-2-${packname_2}.pack'
81
82
unset GIT_OBJECT_DIRECTORY
83
cd "$TRASH/.git2"
@@ -96,7 +96,7 @@ cd "$TRASH"
96
test_expect_success \
97
'pack with OFS_DELTA' \
98
'pwd &&
99
- packname_3=$(git-pack-objects --delta-base-offset test-3 <obj-list)'
99
+ packname_3=$(git pack-objects --delta-base-offset test-3 <obj-list)'
100
101
rm -fr .git2
102
mkdir .git2
@@ -105,9 +105,9 @@ test_expect_success \
105
'unpack with OFS_DELTA' \
106
'GIT_OBJECT_DIRECTORY=.git2/objects &&
107
export GIT_OBJECT_DIRECTORY &&
108
- git-init &&
109
- git-unpack-objects -n <test-3-${packname_3}.pack &&
110
- git-unpack-objects <test-3-${packname_3}.pack'
108
+ git init &&
109
+ git unpack-objects -n <test-3-${packname_3}.pack &&
110
+ git unpack-objects <test-3-${packname_3}.pack'
111
112
unset GIT_OBJECT_DIRECTORY
113
cd "$TRASH/.git2"
@@ -137,13 +137,13 @@ test_expect_success \
137
'use packed objects' \
138
'GIT_OBJECT_DIRECTORY=.git2/objects &&
139
export GIT_OBJECT_DIRECTORY &&
140
- git-init &&
140
+ git init &&
141
cp test-1-${packname_1}.pack test-1-${packname_1}.idx .git2/objects/pack && {
142
- git-diff-tree --root -p $commit &&
142
+ git diff-tree --root -p $commit &&
143
while read object
144
do
145
- t=`git-cat-file -t $object` &&
146
- git-cat-file $t $object || return 1
145
+ t=`git cat-file -t $object` &&
146
+ git cat-file $t $object || return 1
147
done <obj-list
148
} >current &&
149
diff expect current'
@@ -154,11 +154,11 @@ test_expect_success \
154
export GIT_OBJECT_DIRECTORY &&
155
rm -f .git2/objects/pack/test-* &&
156
cp test-2-${packname_2}.pack test-2-${packname_2}.idx .git2/objects/pack && {
157
- git-diff-tree --root -p $commit &&
157
+ git diff-tree --root -p $commit &&
158
while read object
159
do
160
- t=`git-cat-file -t $object` &&
161
- git-cat-file $t $object || return 1
160
+ t=`git cat-file -t $object` &&
161
+ git cat-file $t $object || return 1
162
done <obj-list
163
} >current &&
164
diff expect current'
@@ -169,11 +169,11 @@ test_expect_success \
169
export GIT_OBJECT_DIRECTORY &&
170
rm -f .git2/objects/pack/test-* &&
171
cp test-3-${packname_3}.pack test-3-${packname_3}.idx .git2/objects/pack && {
172
- git-diff-tree --root -p $commit &&
172
+ git diff-tree --root -p $commit &&
173
while read object
174
do
175
- t=`git-cat-file -t $object` &&
176
- git-cat-file $t $object || return 1
175
+ t=`git cat-file -t $object` &&
176
+ git cat-file $t $object || return 1
177
done <obj-list
178
} >current &&
179
diff expect current'
@@ -182,7 +182,7 @@ unset GIT_OBJECT_DIRECTORY
182
183
test_expect_success \
184
'verify pack' \
185
- 'git-verify-pack test-1-${packname_1}.idx \
185
+ 'git verify-pack test-1-${packname_1}.idx \
186
test-2-${packname_2}.idx \
187
test-3-${packname_3}.idx'
188
@@ -190,7 +190,7 @@ test_expect_success \
190
'corrupt a pack and see if verify catches' \
191
'cat test-1-${packname_1}.idx >test-3.idx &&
192
cat test-2-${packname_2}.pack >test-3.pack &&
193
- if git-verify-pack test-3.idx
193
+ if git verify-pack test-3.idx
194
then false
195
else :;
196
fi &&
@@ -198,7 +198,7 @@ test_expect_success \
198
: PACK_SIGNATURE &&
199
cat test-1-${packname_1}.pack >test-3.pack &&
200
dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=2 &&
201
- if git-verify-pack test-3.idx
201
+ if git verify-pack test-3.idx
202
then false
203
else :;
204
fi &&
@@ -206,7 +206,7 @@ test_expect_success \
206
: PACK_VERSION &&
207
cat test-1-${packname_1}.pack >test-3.pack &&
208
dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=7 &&
209
- if git-verify-pack test-3.idx
209
+ if git verify-pack test-3.idx
210
then false
211
else :;
212
fi &&
@@ -214,7 +214,7 @@ test_expect_success \
214
: TYPE/SIZE byte of the first packed object data &&
215
cat test-1-${packname_1}.pack >test-3.pack &&
216
dd if=/dev/zero of=test-3.pack count=1 bs=1 conv=notrunc seek=12 &&
217
- if git-verify-pack test-3.idx
217
+ if git verify-pack test-3.idx
218
then false
219
else :;
220
fi &&
@@ -224,7 +224,7 @@ test_expect_success \
224
l=`expr $l - 20` &&
225
cat test-1-${packname_1}.pack >test-3.pack &&
226
dd if=/dev/zero of=test-3.idx count=20 bs=1 conv=notrunc seek=$l &&
227
- if git-verify-pack test-3.pack
227
+ if git verify-pack test-3.pack
228
then false
229
else :;
230
fi &&
t/t5301-sliding-window.sh
+20
-20
@@ -13,48 +13,48 @@ test_expect_success \
13
do
14
echo $i >$i &&
15
test-genrandom "$i" 32768 >>$i &&
16
- git-update-index --add $i || return 1
16
+ git update-index --add $i || return 1
17
done &&
18
- echo d >d && cat c >>d && git-update-index --add d &&
19
- tree=`git-write-tree` &&
20
- commit1=`git-commit-tree $tree </dev/null` &&
21
- git-update-ref HEAD $commit1 &&
18
+ echo d >d && cat c >>d && git update-index --add d &&
19
+ tree=`git write-tree` &&
20
+ commit1=`git commit-tree $tree </dev/null` &&
21
+ git update-ref HEAD $commit1 &&
22
git-repack -a -d &&
23
- test "`git-count-objects`" = "0 objects, 0 kilobytes" &&
23
+ test "`git count-objects`" = "0 objects, 0 kilobytes" &&
24
pack1=`ls .git/objects/pack/*.pack` &&
25
test -f "$pack1"'
26
27
test_expect_success \
28
'verify-pack -v, defaults' \
29
- 'git-verify-pack -v "$pack1"'
29
+ 'git verify-pack -v "$pack1"'
30
31
test_expect_success \
32
'verify-pack -v, packedGitWindowSize == 1 page' \
33
- 'git-config core.packedGitWindowSize 512 &&
34
- git-verify-pack -v "$pack1"'
33
+ 'git config core.packedGitWindowSize 512 &&
34
+ git verify-pack -v "$pack1"'
35
36
test_expect_success \
37
'verify-pack -v, packedGit{WindowSize,Limit} == 1 page' \
38
- 'git-config core.packedGitWindowSize 512 &&
39
- git-config core.packedGitLimit 512 &&
40
- git-verify-pack -v "$pack1"'
38
+ 'git config core.packedGitWindowSize 512 &&
39
+ git config core.packedGitLimit 512 &&
40
+ git verify-pack -v "$pack1"'
41
42
test_expect_success \
43
'repack -a -d, packedGit{WindowSize,Limit} == 1 page' \
44
- 'git-config core.packedGitWindowSize 512 &&
45
- git-config core.packedGitLimit 512 &&
46
- commit2=`git-commit-tree $tree -p $commit1 </dev/null` &&
47
- git-update-ref HEAD $commit2 &&
44
+ 'git config core.packedGitWindowSize 512 &&
45
+ git config core.packedGitLimit 512 &&
46
+ commit2=`git commit-tree $tree -p $commit1 </dev/null` &&
47
+ git update-ref HEAD $commit2 &&
48
git-repack -a -d &&
49
- test "`git-count-objects`" = "0 objects, 0 kilobytes" &&
49
+ test "`git count-objects`" = "0 objects, 0 kilobytes" &&
50
pack2=`ls .git/objects/pack/*.pack` &&
51
test -f "$pack2"
52
test "$pack1" \!= "$pack2"'
53
54
test_expect_success \
55
'verify-pack -v, defaults' \
56
- 'git-config --unset core.packedGitWindowSize &&
57
- git-config --unset core.packedGitLimit &&
58
- git-verify-pack -v "$pack2"'
56
+ 'git config --unset core.packedGitWindowSize &&
57
+ git config --unset core.packedGitLimit &&
58
+ git verify-pack -v "$pack2"'
59
60
test_done
t/t5302-pack-index.sh
+28
-28
@@ -9,34 +9,34 @@ test_description='pack index with 64-bit offsets and object CRC'
9
test_expect_success \
10
'setup' \
11
'rm -rf .git
12
- git-init &&
12
+ git init &&
13
i=1 &&
14
while test $i -le 100
15
do
16
i=`printf '%03i' $i`
17
echo $i >file_$i &&
18
test-genrandom "$i" 8192 >>file_$i &&
19
- git-update-index --add file_$i &&
19
+ git update-index --add file_$i &&
20
i=`expr $i + 1` || return 1
21
done &&
22
{ echo 101 && test-genrandom 100 8192; } >file_101 &&
23
- git-update-index --add file_101 &&
24
- tree=`git-write-tree` &&
25
- commit=`git-commit-tree $tree </dev/null` && {
23
+ git update-index --add file_101 &&
24
+ tree=`git write-tree` &&
25
+ commit=`git commit-tree $tree </dev/null` && {
26
echo $tree &&
27
- git-ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
27
+ git ls-tree $tree | sed -e "s/.* \\([0-9a-f]*\\) .*/\\1/"
28
} >obj-list &&
29
- git-update-ref HEAD $commit'
29
+ git update-ref HEAD $commit'
30
31
test_expect_success \
32
'pack-objects with index version 1' \
33
- 'pack1=$(git-pack-objects --index-version=1 test-1 <obj-list) &&
34
- git-verify-pack -v "test-1-${pack1}.pack"'
33
+ 'pack1=$(git pack-objects --index-version=1 test-1 <obj-list) &&
34
+ git verify-pack -v "test-1-${pack1}.pack"'
35
36
test_expect_success \
37
'pack-objects with index version 2' \
38
- 'pack2=$(git-pack-objects --index-version=2 test-2 <obj-list) &&
39
- git-verify-pack -v "test-2-${pack2}.pack"'
38
+ 'pack2=$(git pack-objects --index-version=2 test-2 <obj-list) &&
39
+ git verify-pack -v "test-2-${pack2}.pack"'
40
41
test_expect_success \
42
'both packs should be identical' \
@@ -61,8 +61,8 @@ test_expect_success \
61
62
test_expect_success \
63
'index v2: force some 64-bit offsets with pack-objects' \
64
- 'pack3=$(git-pack-objects --index-version=2,0x40000 test-3 <obj-list) &&
65
- git-verify-pack -v "test-3-${pack3}.pack"'
64
+ 'pack3=$(git pack-objects --index-version=2,0x40000 test-3 <obj-list) &&
65
+ git verify-pack -v "test-3-${pack3}.pack"'
66
67
test_expect_failure \
68
'64-bit offsets: should be different from previous index v2 results' \
@@ -79,22 +79,22 @@ test_expect_success \
79
test_expect_success \
80
'[index v1] 1) stream pack to repository' \
81
'git-index-pack --index-version=1 --stdin < "test-1-${pack1}.pack" &&
82
- git-prune-packed &&
83
- git-count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
82
+ git prune-packed &&
83
+ git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
84
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
85
cmp "test-1-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"'
86
87
test_expect_success \
88
'[index v1] 2) create a stealth corruption in a delta base reference' \
89
'# this test assumes a delta smaller than 16 bytes at the end of the pack
90
- git-show-index <1.idx | sort -n | tail -n 1 | (
90
+ git show-index <1.idx | sort -n | tail -n 1 | (
91
read delta_offs delta_sha1 &&
92
- git-cat-file blob "$delta_sha1" > blob_1 &&
92
+ git cat-file blob "$delta_sha1" > blob_1 &&
93
chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
94
dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($delta_offs + 1)) \
95
if=".git/objects/pack/pack-${pack1}.idx" skip=$((256 * 4 + 4)) \
96
bs=1 count=20 conv=notrunc &&
97
- git-cat-file blob "$delta_sha1" > blob_2 )'
97
+ git cat-file blob "$delta_sha1" > blob_2 )'
98
99
test_expect_failure \
100
'[index v1] 3) corrupted delta happily returned wrong data' \
@@ -102,37 +102,37 @@ test_expect_failure \
102
103
test_expect_failure \
104
'[index v1] 4) confirm that the pack is actually corrupted' \
105
- 'git-fsck --full $commit'
105
+ 'git fsck --full $commit'
106
107
test_expect_success \
108
'[index v1] 5) pack-objects happily reuses corrupted data' \
109
- 'pack4=$(git-pack-objects test-4 <obj-list) &&
109
+ 'pack4=$(git pack-objects test-4 <obj-list) &&
110
test -f "test-4-${pack1}.pack"'
111
112
test_expect_failure \
113
'[index v1] 6) newly created pack is BAD !' \
114
- 'git-verify-pack -v "test-4-${pack1}.pack"'
114
+ 'git verify-pack -v "test-4-${pack1}.pack"'
115
116
test_expect_success \
117
'[index v2] 1) stream pack to repository' \
118
'rm -f .git/objects/pack/* &&
119
git-index-pack --index-version=2,0x40000 --stdin < "test-1-${pack1}.pack" &&
120
- git-prune-packed &&
121
- git-count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
120
+ git prune-packed &&
121
+ git count-objects | ( read nr rest && test "$nr" -eq 1 ) &&
122
cmp "test-1-${pack1}.pack" ".git/objects/pack/pack-${pack1}.pack" &&
123
cmp "test-3-${pack1}.idx" ".git/objects/pack/pack-${pack1}.idx"'
124
125
test_expect_success \
126
'[index v2] 2) create a stealth corruption in a delta base reference' \
127
'# this test assumes a delta smaller than 16 bytes at the end of the pack
128
- git-show-index <1.idx | sort -n | tail -n 1 | (
128
+ git show-index <1.idx | sort -n | tail -n 1 | (
129
read delta_offs delta_sha1 delta_crc &&
130
- git-cat-file blob "$delta_sha1" > blob_3 &&
130
+ git cat-file blob "$delta_sha1" > blob_3 &&
131
chmod +w ".git/objects/pack/pack-${pack1}.pack" &&
132
dd of=".git/objects/pack/pack-${pack1}.pack" seek=$(($delta_offs + 1)) \
133
if=".git/objects/pack/pack-${pack1}.idx" skip=$((8 + 256 * 4)) \
134
bs=1 count=20 conv=notrunc &&
135
- git-cat-file blob "$delta_sha1" > blob_4 )'
135
+ git cat-file blob "$delta_sha1" > blob_4 )'
136
137
test_expect_failure \
138
'[index v2] 3) corrupted delta happily returned wrong data' \
@@ -140,10 +140,10 @@ test_expect_failure \
140
141
test_expect_failure \
142
'[index v2] 4) confirm that the pack is actually corrupted' \
143
- 'git-fsck --full $commit'
143
+ 'git fsck --full $commit'
144
145
test_expect_failure \
146
'[index v2] 5) pack-objects refuses to reuse corrupted data' \
147
- 'git-pack-objects test-5 <obj-list'
147
+ 'git pack-objects test-5 <obj-list'
148
149
test_done
t/t5400-send-pack.sh
+18
-18
@@ -13,9 +13,9 @@ test_expect_success setup '
13
test_tick &&
14
mkdir mozart mozart/is &&
15
echo "Commit #0" >mozart/is/pink &&
16
- git-update-index --add mozart/is/pink &&
17
- tree=$(git-write-tree) &&
18
- commit=$(echo "Commit #0" | git-commit-tree $tree) &&
16
+ git update-index --add mozart/is/pink &&
17
+ tree=$(git write-tree) &&
18
+ commit=$(echo "Commit #0" | git commit-tree $tree) &&
19
zero=$commit &&
20
parent=$zero &&
21
i=0 &&
@@ -24,18 +24,18 @@ test_expect_success setup '
24
i=$(($i+1)) &&
25
test_tick &&
26
echo "Commit #$i" >mozart/is/pink &&
27
- git-update-index --add mozart/is/pink &&
28
- tree=$(git-write-tree) &&
29
- commit=$(echo "Commit #$i" | git-commit-tree $tree -p $parent) &&
30
- git-update-ref refs/tags/commit$i $commit &&
27
+ git update-index --add mozart/is/pink &&
28
+ tree=$(git write-tree) &&
29
+ commit=$(echo "Commit #$i" | git commit-tree $tree -p $parent) &&
30
+ git update-ref refs/tags/commit$i $commit &&
31
parent=$commit || return 1
32
done &&
33
- git-update-ref HEAD "$commit" &&
33
+ git update-ref HEAD "$commit" &&
34
git-clone ./. victim &&
35
cd victim &&
36
- git-log &&
36
+ git log &&
37
cd .. &&
38
- git-update-ref HEAD "$zero" &&
38
+ git update-ref HEAD "$zero" &&
39
parent=$zero &&
40
i=0 &&
41
while test $i -le $cnt
@@ -43,15 +43,15 @@ test_expect_success setup '
43
i=$(($i+1)) &&
44
test_tick &&
45
echo "Rebase #$i" >mozart/is/pink &&
46
- git-update-index --add mozart/is/pink &&
47
- tree=$(git-write-tree) &&
48
- commit=$(echo "Rebase #$i" | git-commit-tree $tree -p $parent) &&
49
- git-update-ref refs/tags/rebase$i $commit &&
46
+ git update-index --add mozart/is/pink &&
47
+ tree=$(git write-tree) &&
48
+ commit=$(echo "Rebase #$i" | git commit-tree $tree -p $parent) &&
49
+ git update-ref refs/tags/rebase$i $commit &&
50
parent=$commit || return 1
51
done &&
52
- git-update-ref HEAD "$commit" &&
52
+ git update-ref HEAD "$commit" &&
53
echo Rebase &&
54
- git-log'
54
+ git log'
55
56
test_expect_success 'pack the source repository' '
57
git repack -a -d &&
@@ -106,9 +106,9 @@ export HOME ;# this way we force the victim/.git/config to be used.
106
test_expect_success \
107
'pushing with --force should be denied with denyNonFastforwards' '
108
cd victim &&
109
- git-config receive.denyNonFastforwards true &&
109
+ git config receive.denyNonFastforwards true &&
110
cd .. &&
111
- git-update-ref refs/heads/master master^ || return 1
111
+ git update-ref refs/heads/master master^ || return 1
112
git-send-pack --force ./victim/.git/ master && return 1
113
! git diff .git/refs/heads/master victim/.git/refs/heads/master
114
'
t/t5401-update-hooks.sh
+13
-13
@@ -8,19 +8,19 @@ test_description='Test the update hook infrastructure.'
8
9
test_expect_success setup '
10
echo This is a test. >a &&
11
- git-update-index --add a &&
12
- tree0=$(git-write-tree) &&
13
- commit0=$(echo setup | git-commit-tree $tree0) &&
11
+ git update-index --add a &&
12
+ tree0=$(git write-tree) &&
13
+ commit0=$(echo setup | git commit-tree $tree0) &&
14
echo We hope it works. >a &&
15
- git-update-index a &&
16
- tree1=$(git-write-tree) &&
17
- commit1=$(echo modify | git-commit-tree $tree1 -p $commit0) &&
18
- git-update-ref refs/heads/master $commit0 &&
19
- git-update-ref refs/heads/tofail $commit1 &&
15
+ git update-index a &&
16
+ tree1=$(git write-tree) &&
17
+ commit1=$(echo modify | git commit-tree $tree1 -p $commit0) &&
18
+ git update-ref refs/heads/master $commit0 &&
19
+ git update-ref refs/heads/tofail $commit1 &&
20
git-clone ./. victim &&
21
- GIT_DIR=victim/.git git-update-ref refs/heads/tofail $commit1 &&
22
- git-update-ref refs/heads/master $commit1 &&
23
- git-update-ref refs/heads/tofail $commit0
21
+ GIT_DIR=victim/.git git update-ref refs/heads/tofail $commit1 &&
22
+ git update-ref refs/heads/master $commit1 &&
23
+ git update-ref refs/heads/tofail $commit0
24
'
25
26
cat >victim/.git/hooks/pre-receive <<'EOF'
@@ -65,8 +65,8 @@ test_expect_failure push '
65
'
66
67
test_expect_success 'updated as expected' '
68
- test $(GIT_DIR=victim/.git git-rev-parse master) = $commit1 &&
69
- test $(GIT_DIR=victim/.git git-rev-parse tofail) = $commit1
68
+ test $(GIT_DIR=victim/.git git rev-parse master) = $commit1 &&
69
+ test $(GIT_DIR=victim/.git git rev-parse tofail) = $commit1
70
'
71
72
test_expect_success 'hooks ran' '
t/t5500-fetch-pack.sh
+15
-15
@@ -25,12 +25,12 @@ add () {
25
done
26
27
echo "$text" > test.txt
28
- git-update-index --add test.txt
29
- tree=$(git-write-tree)
28
+ git update-index --add test.txt
29
+ tree=$(git write-tree)
30
# make sure timestamps are in correct order
31
sec=$(($sec+1))
32
commit=$(echo "$text" | GIT_AUTHOR_DATE=$sec \
33
- git-commit-tree $tree $parents 2>>log2.txt)
33
+ git commit-tree $tree $parents 2>>log2.txt)
34
export $name=$commit
35
echo $commit > .git/refs/heads/$branch
36
eval ${branch}TIP=$commit
@@ -61,19 +61,19 @@ pull_to_client () {
61
"git-fetch-pack -k -v .. $heads"
62
case "$heads" in *A*) echo $ATIP > .git/refs/heads/A;; esac
63
case "$heads" in *B*) echo $BTIP > .git/refs/heads/B;; esac
64
- git-symbolic-ref HEAD refs/heads/`echo $heads | sed -e 's/^\(.\).*$/\1/'`
64
+ git symbolic-ref HEAD refs/heads/`echo $heads | sed -e 's/^\(.\).*$/\1/'`
65
66
- test_expect_success "fsck" 'git-fsck --full > fsck.txt 2>&1'
66
+ test_expect_success "fsck" 'git fsck --full > fsck.txt 2>&1'
67
68
test_expect_success 'check downloaded results' \
69
'mv .git/objects/pack/pack-* . &&
70
p=`ls -1 pack-*.pack` &&
71
- git-unpack-objects <$p &&
72
- git-fsck --full'
71
+ git unpack-objects <$p &&
72
+ git fsck --full'
73
74
test_expect_success "new object count after $number pull" \
75
'idx=`echo pack-*.idx` &&
76
- pack_count=`git-show-index <$idx | wc -l` &&
76
+ pack_count=`git show-index <$idx | wc -l` &&
77
test $pack_count = $count'
78
test -z "$pack_count" && pack_count=0
79
if [ -z "$no_strict_count_check" ]; then
@@ -97,7 +97,7 @@ pull_to_client () {
97
(
98
mkdir client &&
99
cd client &&
100
- git-init 2>> log2.txt &&
100
+ git init 2>> log2.txt &&
101
git config transfer.unpacklimit 0
102
)
103
@@ -113,7 +113,7 @@ add B1 $A1
113
114
echo $ATIP > .git/refs/heads/A
115
echo $BTIP > .git/refs/heads/B
116
-git-symbolic-ref HEAD refs/heads/B
116
+git symbolic-ref HEAD refs/heads/B
117
118
pull_to_client 1st "B A" $((11*3))
119
@@ -131,7 +131,7 @@ pull_to_client 3rd "A" $((1*3)) # old fails
131
132
test_expect_success "clone shallow" "git-clone --depth 2 . shallow"
133
134
-(cd shallow; git-count-objects -v) > count.shallow
134
+(cd shallow; git count-objects -v) > count.shallow
135
136
test_expect_success "clone shallow object count" \
137
"test \"in-pack: 18\" = \"$(grep in-pack count.shallow)\""
@@ -145,7 +145,7 @@ test_expect_success "clone shallow object count (part 2)" '
145
'
146
147
test_expect_success "fsck in shallow repo" \
148
- "(cd shallow; git-fsck --full)"
148
+ "(cd shallow; git fsck --full)"
149
150
#test_done; exit
151
@@ -155,7 +155,7 @@ add B67 $B66
155
test_expect_success "pull in shallow repo" \
156
"(cd shallow; git pull .. B)"
157
158
-(cd shallow; git-count-objects -v) > count.shallow
158
+(cd shallow; git count-objects -v) > count.shallow
159
test_expect_success "clone shallow object count" \
160
"test \"count: 6\" = \"$(grep count count.shallow)\""
161
@@ -165,14 +165,14 @@ add B69 $B68
165
test_expect_success "deepening pull in shallow repo" \
166
"(cd shallow; git pull --depth 4 .. B)"
167
168
-(cd shallow; git-count-objects -v) > count.shallow
168
+(cd shallow; git count-objects -v) > count.shallow
169
test_expect_success "clone shallow object count" \
170
"test \"count: 12\" = \"$(grep count count.shallow)\""
171
172
test_expect_success "deepening fetch in shallow repo" \
173
"(cd shallow; git fetch --depth 4 .. A:A)"
174
175
-(cd shallow; git-count-objects -v) > count.shallow
175
+(cd shallow; git count-objects -v) > count.shallow
176
test_expect_success "clone shallow object count" \
177
"test \"count: 18\" = \"$(grep count count.shallow)\""
178
t/t6000lib.sh
+2
-2
@@ -17,7 +17,7 @@ unique_commit()
17
_text=$1
18
_tree=$2
19
shift 2
20
- echo $_text | git-commit-tree $(tag $_tree) "$@"
20
+ echo $_text | git commit-tree $(tag $_tree) "$@"
21
}
22
23
# Save the output of a command into the tag specified. Prepend
@@ -62,7 +62,7 @@ as_author()
62
commit_date()
63
{
64
_commit=$1
65
- git-cat-file commit $_commit | sed -n "s/^committer .*> \([0-9]*\) .*/\1/p"
65
+ git cat-file commit $_commit | sed -n "s/^committer .*> \([0-9]*\) .*/\1/p"
66
}
67
68
on_committer_date()
t/t6002-rev-list-bisect.sh
+19
-19
@@ -2,7 +2,7 @@
2
#
3
# Copyright (c) 2005 Jon Seymour
4
#
5
-test_description='Tests git-rev-list --bisect functionality'
5
+test_description='Tests git rev-list --bisect functionality'
6
7
. ./test-lib.sh
8
. ../t6000lib.sh # t6xxx specific functions
@@ -16,11 +16,11 @@ test_bisection_diff()
16
_max_diff=$1
17
_bisect_option=$2
18
shift 2
19
- _bisection=$(git-rev-list $_bisect_option "$@")
20
- _list_size=$(git-rev-list "$@" | wc -l)
19
+ _bisection=$(git rev-list $_bisect_option "$@")
20
+ _list_size=$(git rev-list "$@" | wc -l)
21
_head=$1
22
shift 1
23
- _bisection_size=$(git-rev-list $_bisection "$@" | wc -l)
23
+ _bisection_size=$(git rev-list $_bisection "$@" | wc -l)
24
[ -n "$_list_size" -a -n "$_bisection_size" ] ||
25
error "test_bisection_diff failed"
26
@@ -37,8 +37,8 @@ test_bisection_diff()
37
}
38
39
date >path0
40
-git-update-index --add path0
41
-save_tag tree git-write-tree
40
+git update-index --add path0
41
+save_tag tree git write-tree
42
on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
43
on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
44
on_committer_date "1971-08-16 00:00:02" save_tag l1 unique_commit l1 tree -p l0
@@ -58,7 +58,7 @@ on_committer_date "1971-08-16 00:00:15" save_tag a4 unique_commit a4 tree -p a3
58
on_committer_date "1971-08-16 00:00:16" save_tag l3 unique_commit l3 tree -p a4
59
on_committer_date "1971-08-16 00:00:17" save_tag l4 unique_commit l4 tree -p l3
60
on_committer_date "1971-08-16 00:00:18" save_tag l5 unique_commit l5 tree -p l4
61
-git-update-ref HEAD $(tag l5)
61
+git update-ref HEAD $(tag l5)
62
63
64
# E
@@ -163,23 +163,23 @@ test_sequence()
163
# the bisection point is the head - this is the bad point.
164
#
165
166
-test_output_expect_success "$_bisect_option l5 ^root" 'git-rev-list $_bisect_option l5 ^root' <<EOF
166
+test_output_expect_success "$_bisect_option l5 ^root" 'git rev-list $_bisect_option l5 ^root' <<EOF
167
c3
168
EOF
169
170
-test_output_expect_success "$_bisect_option l5 ^root ^c3" 'git-rev-list $_bisect_option l5 ^root ^c3' <<EOF
170
+test_output_expect_success "$_bisect_option l5 ^root ^c3" 'git rev-list $_bisect_option l5 ^root ^c3' <<EOF
171
b4
172
EOF
173
174
-test_output_expect_success "$_bisect_option l5 ^root ^c3 ^b4" 'git-rev-list $_bisect_option l5 ^c3 ^b4' <<EOF
174
+test_output_expect_success "$_bisect_option l5 ^root ^c3 ^b4" 'git rev-list $_bisect_option l5 ^c3 ^b4' <<EOF
175
l3
176
EOF
177
178
-test_output_expect_success "$_bisect_option l3 ^root ^c3 ^b4" 'git-rev-list $_bisect_option l3 ^root ^c3 ^b4' <<EOF
178
+test_output_expect_success "$_bisect_option l3 ^root ^c3 ^b4" 'git rev-list $_bisect_option l3 ^root ^c3 ^b4' <<EOF
179
a4
180
EOF
181
182
-test_output_expect_success "$_bisect_option l5 ^b3 ^a3 ^b4 ^a4" 'git-rev-list $_bisect_option l3 ^b3 ^a3 ^a4' <<EOF
182
+test_output_expect_success "$_bisect_option l5 ^b3 ^a3 ^b4 ^a4" 'git rev-list $_bisect_option l3 ^b3 ^a3 ^a4' <<EOF
183
l3
184
EOF
185
@@ -187,11 +187,11 @@ EOF
187
# if l3 is bad, then l4 is bad too - so advance the bad pointer by making b4 the known bad head
188
#
189
190
-test_output_expect_success "$_bisect_option l4 ^a2 ^a3 ^b ^a4" 'git-rev-list $_bisect_option l4 ^a2 ^a3 ^a4' <<EOF
190
+test_output_expect_success "$_bisect_option l4 ^a2 ^a3 ^b ^a4" 'git rev-list $_bisect_option l4 ^a2 ^a3 ^a4' <<EOF
191
l3
192
EOF
193
194
-test_output_expect_success "$_bisect_option l3 ^a2 ^a3 ^b ^a4" 'git-rev-list $_bisect_option l3 ^a2 ^a3 ^a4' <<EOF
194
+test_output_expect_success "$_bisect_option l3 ^a2 ^a3 ^b ^a4" 'git rev-list $_bisect_option l3 ^a2 ^a3 ^a4' <<EOF
195
l3
196
EOF
197
@@ -201,15 +201,15 @@ EOF
201
# as another example, let's consider a4 to be the bad head, in which case
202
#
203
204
-test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4" 'git-rev-list $_bisect_option a4 ^a2 ^a3 ^b4' <<EOF
204
+test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4" 'git rev-list $_bisect_option a4 ^a2 ^a3 ^b4' <<EOF
205
c2
206
EOF
207
208
-test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4 ^c2" 'git-rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2' <<EOF
208
+test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4 ^c2" 'git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2' <<EOF
209
c3
210
EOF
211
212
-test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3" 'git-rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3' <<EOF
212
+test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3" 'git rev-list $_bisect_option a4 ^a2 ^a3 ^b4 ^c2 ^c3' <<EOF
213
a4
214
EOF
215
@@ -219,11 +219,11 @@ EOF
219
# or consider c3 to be the bad head
220
#
221
222
-test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4" 'git-rev-list $_bisect_option a4 ^a2 ^a3 ^b4' <<EOF
222
+test_output_expect_success "$_bisect_option a4 ^a2 ^a3 ^b4" 'git rev-list $_bisect_option a4 ^a2 ^a3 ^b4' <<EOF
223
c2
224
EOF
225
226
-test_output_expect_success "$_bisect_option c3 ^a2 ^a3 ^b4 ^c2" 'git-rev-list $_bisect_option c3 ^a2 ^a3 ^b4 ^c2' <<EOF
226
+test_output_expect_success "$_bisect_option c3 ^a2 ^a3 ^b4 ^c2" 'git rev-list $_bisect_option c3 ^a2 ^a3 ^b4 ^c2' <<EOF
227
c3
228
EOF
229
t/t6003-rev-list-topo-order.sh
+38
-38
@@ -3,7 +3,7 @@
3
# Copyright (c) 2005 Jon Seymour
4
#
5
6
-test_description='Tests git-rev-list --topo-order functionality'
6
+test_description='Tests git rev-list --topo-order functionality'
7
8
. ./test-lib.sh
9
. ../t6000lib.sh # t6xxx specific functions
@@ -14,8 +14,8 @@ list_duplicates()
14
}
15
16
date >path0
17
-git-update-index --add path0
18
-save_tag tree git-write-tree
17
+git update-index --add path0
18
+save_tag tree git write-tree
19
on_committer_date "1971-08-16 00:00:00" hide_error save_tag root unique_commit root tree
20
on_committer_date "1971-08-16 00:00:01" save_tag l0 unique_commit l0 tree -p root
21
on_committer_date "1971-08-16 00:00:02" save_tag l1 unique_commit l1 tree -p l0
@@ -77,13 +77,13 @@ save_tag h2 unique_commit g4 tree -p g2
77
save_tag g3 unique_commit g5 tree -p g2
78
save_tag g4 unique_commit g6 tree -p g3 -p h2
79
80
-git-update-ref HEAD $(tag l5)
80
+git update-ref HEAD $(tag l5)
81
82
-test_output_expect_success 'rev-list has correct number of entries' 'git-rev-list HEAD | wc -l | tr -d \" \"' <<EOF
82
+test_output_expect_success 'rev-list has correct number of entries' 'git rev-list HEAD | wc -l | tr -d \" \"' <<EOF
83
19
84
EOF
85
86
-test_output_expect_success 'simple topo order' 'git-rev-list --topo-order HEAD' <<EOF
86
+test_output_expect_success 'simple topo order' 'git rev-list --topo-order HEAD' <<EOF
87
l5
88
l4
89
l3
@@ -105,7 +105,7 @@ l0
105
root
106
EOF
107
108
-test_output_expect_success 'two diamonds topo order (g6)' 'git-rev-list --topo-order g4' <<EOF
108
+test_output_expect_success 'two diamonds topo order (g6)' 'git rev-list --topo-order g4' <<EOF
109
g4
110
h2
111
g3
@@ -115,7 +115,7 @@ g1
115
g0
116
EOF
117
118
-test_output_expect_success 'multiple heads' 'git-rev-list --topo-order a3 b3 c3' <<EOF
118
+test_output_expect_success 'multiple heads' 'git rev-list --topo-order a3 b3 c3' <<EOF
119
a3
120
a2
121
a1
@@ -132,7 +132,7 @@ l0
132
root
133
EOF
134
135
-test_output_expect_success 'multiple heads, prune at a1' 'git-rev-list --topo-order a3 b3 c3 ^a1' <<EOF
135
+test_output_expect_success 'multiple heads, prune at a1' 'git rev-list --topo-order a3 b3 c3 ^a1' <<EOF
136
a3
137
a2
138
c3
@@ -143,7 +143,7 @@ b2
143
b1
144
EOF
145
146
-test_output_expect_success 'multiple heads, prune at l1' 'git-rev-list --topo-order a3 b3 c3 ^l1' <<EOF
146
+test_output_expect_success 'multiple heads, prune at l1' 'git rev-list --topo-order a3 b3 c3 ^l1' <<EOF
147
a3
148
a2
149
a1
@@ -157,7 +157,7 @@ a0
157
l2
158
EOF
159
160
-test_output_expect_success 'cross-epoch, head at l5, prune at l1' 'git-rev-list --topo-order l5 ^l1' <<EOF
160
+test_output_expect_success 'cross-epoch, head at l5, prune at l1' 'git rev-list --topo-order l5 ^l1' <<EOF
161
l5
162
l4
163
l3
@@ -176,7 +176,7 @@ a0
176
l2
177
EOF
178
179
-test_output_expect_success 'duplicated head arguments' 'git-rev-list --topo-order l5 l5 ^l1' <<EOF
179
+test_output_expect_success 'duplicated head arguments' 'git rev-list --topo-order l5 l5 ^l1' <<EOF
180
l5
181
l4
182
l3
@@ -195,7 +195,7 @@ a0
195
l2
196
EOF
197
198
-test_output_expect_success 'prune near topo' 'git-rev-list --topo-order a4 ^c3' <<EOF
198
+test_output_expect_success 'prune near topo' 'git rev-list --topo-order a4 ^c3' <<EOF
199
a4
200
b4
201
a3
@@ -204,52 +204,52 @@ a1
204
b3
205
EOF
206
207
-test_output_expect_success "head has no parent" 'git-rev-list --topo-order root' <<EOF
207
+test_output_expect_success "head has no parent" 'git rev-list --topo-order root' <<EOF
208
root
209
EOF
210
211
-test_output_expect_success "two nodes - one head, one base" 'git-rev-list --topo-order l0' <<EOF
211
+test_output_expect_success "two nodes - one head, one base" 'git rev-list --topo-order l0' <<EOF
212
l0
213
root
214
EOF
215
216
-test_output_expect_success "three nodes one head, one internal, one base" 'git-rev-list --topo-order l1' <<EOF
216
+test_output_expect_success "three nodes one head, one internal, one base" 'git rev-list --topo-order l1' <<EOF
217
l1
218
l0
219
root
220
EOF
221
222
-test_output_expect_success "linear prune l2 ^root" 'git-rev-list --topo-order l2 ^root' <<EOF
222
+test_output_expect_success "linear prune l2 ^root" 'git rev-list --topo-order l2 ^root' <<EOF
223
l2
224
l1
225
l0
226
EOF
227
228
-test_output_expect_success "linear prune l2 ^l0" 'git-rev-list --topo-order l2 ^l0' <<EOF
228
+test_output_expect_success "linear prune l2 ^l0" 'git rev-list --topo-order l2 ^l0' <<EOF
229
l2
230
l1
231
EOF
232
233
-test_output_expect_success "linear prune l2 ^l1" 'git-rev-list --topo-order l2 ^l1' <<EOF
233
+test_output_expect_success "linear prune l2 ^l1" 'git rev-list --topo-order l2 ^l1' <<EOF
234
l2
235
EOF
236
237
-test_output_expect_success "linear prune l5 ^a4" 'git-rev-list --topo-order l5 ^a4' <<EOF
237
+test_output_expect_success "linear prune l5 ^a4" 'git rev-list --topo-order l5 ^a4' <<EOF
238
l5
239
l4
240
l3
241
EOF
242
243
-test_output_expect_success "linear prune l5 ^l3" 'git-rev-list --topo-order l5 ^l3' <<EOF
243
+test_output_expect_success "linear prune l5 ^l3" 'git rev-list --topo-order l5 ^l3' <<EOF
244
l5
245
l4
246
EOF
247
248
-test_output_expect_success "linear prune l5 ^l4" 'git-rev-list --topo-order l5 ^l4' <<EOF
248
+test_output_expect_success "linear prune l5 ^l4" 'git rev-list --topo-order l5 ^l4' <<EOF
249
l5
250
EOF
251
252
-test_output_expect_success "max-count 10 - topo order" 'git-rev-list --topo-order --max-count=10 l5' <<EOF
252
+test_output_expect_success "max-count 10 - topo order" 'git rev-list --topo-order --max-count=10 l5' <<EOF
253
l5
254
l4
255
l3
@@ -262,7 +262,7 @@ a3
262
a2
263
EOF
264
265
-test_output_expect_success "max-count 10 - non topo order" 'git-rev-list --max-count=10 l5' <<EOF
265
+test_output_expect_success "max-count 10 - non topo order" 'git rev-list --max-count=10 l5' <<EOF
266
l5
267
l4
268
l3
@@ -275,7 +275,7 @@ c2
275
b3
276
EOF
277
278
-test_output_expect_success '--max-age=c3, no --topo-order' "git-rev-list --max-age=$(commit_date c3) l5" <<EOF
278
+test_output_expect_success '--max-age=c3, no --topo-order' "git rev-list --max-age=$(commit_date c3) l5" <<EOF
279
l5
280
l4
281
l3
@@ -289,7 +289,7 @@ EOF
289
#
290
# this test fails on --topo-order - a fix is required
291
#
292
-#test_output_expect_success '--max-age=c3, --topo-order' "git-rev-list --topo-order --max-age=$(commit_date c3) l5" <<EOF
292
+#test_output_expect_success '--max-age=c3, --topo-order' "git rev-list --topo-order --max-age=$(commit_date c3) l5" <<EOF
293
#l5
294
#l4
295
#l3
@@ -300,31 +300,31 @@ EOF
300
#a2
301
#EOF
302
303
-test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git-rev-list --topo-order a4 c3" <<EOF
303
+test_output_expect_success 'one specified head reachable from another a4, c3, --topo-order' "list_duplicates git rev-list --topo-order a4 c3" <<EOF
304
EOF
305
306
-test_output_expect_success 'one specified head reachable from another c3, a4, --topo-order' "list_duplicates git-rev-list --topo-order c3 a4" <<EOF
306
+test_output_expect_success 'one specified head reachable from another c3, a4, --topo-order' "list_duplicates git rev-list --topo-order c3 a4" <<EOF
307
EOF
308
309
-test_output_expect_success 'one specified head reachable from another a4, c3, no --topo-order' "list_duplicates git-rev-list a4 c3" <<EOF
309
+test_output_expect_success 'one specified head reachable from another a4, c3, no --topo-order' "list_duplicates git rev-list a4 c3" <<EOF
310
EOF
311
312
-test_output_expect_success 'one specified head reachable from another c3, a4, no --topo-order' "list_duplicates git-rev-list c3 a4" <<EOF
312
+test_output_expect_success 'one specified head reachable from another c3, a4, no --topo-order' "list_duplicates git rev-list c3 a4" <<EOF
313
EOF
314
315
-test_output_expect_success 'graph with c3 and a4 parents of head' "list_duplicates git-rev-list m1" <<EOF
315
+test_output_expect_success 'graph with c3 and a4 parents of head' "list_duplicates git rev-list m1" <<EOF
316
EOF
317
318
-test_output_expect_success 'graph with a4 and c3 parents of head' "list_duplicates git-rev-list m2" <<EOF
318
+test_output_expect_success 'graph with a4 and c3 parents of head' "list_duplicates git rev-list m2" <<EOF
319
EOF
320
321
-test_expect_success "head ^head --topo-order" 'git-rev-list --topo-order a3 ^a3' <<EOF
321
+test_expect_success "head ^head --topo-order" 'git rev-list --topo-order a3 ^a3' <<EOF
322
EOF
323
324
-test_expect_success "head ^head no --topo-order" 'git-rev-list a3 ^a3' <<EOF
324
+test_expect_success "head ^head no --topo-order" 'git rev-list a3 ^a3' <<EOF
325
EOF
326
327
-test_output_expect_success 'simple topo order (l5r1)' 'git-rev-list --topo-order l5r1' <<EOF
327
+test_output_expect_success 'simple topo order (l5r1)' 'git rev-list --topo-order l5r1' <<EOF
328
l5r1
329
r1
330
r0
@@ -350,7 +350,7 @@ l0
350
root
351
EOF
352
353
-test_output_expect_success 'simple topo order (r1l5)' 'git-rev-list --topo-order r1l5' <<EOF
353
+test_output_expect_success 'simple topo order (r1l5)' 'git rev-list --topo-order r1l5' <<EOF
354
r1l5
355
l5
356
l4
@@ -376,13 +376,13 @@ r0
376
alt_root
377
EOF
378
379
-test_output_expect_success "don't print things unreachable from one branch" "git-rev-list a3 ^b3 --topo-order" <<EOF
379
+test_output_expect_success "don't print things unreachable from one branch" "git rev-list a3 ^b3 --topo-order" <<EOF
380
a3
381
a2
382
a1
383
EOF
384
385
-test_output_expect_success "--topo-order a4 l3" "git-rev-list --topo-order a4 l3" <<EOF
385
+test_output_expect_success "--topo-order a4 l3" "git rev-list --topo-order a4 l3" <<EOF
386
l3
387
a4
388
c3
t/t6004-rev-list-path-optim.sh
+4
-4
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-rev-list trivial path optimization test'
3
+test_description='git rev-list trivial path optimization test'
4
5
. ./test-lib.sh
6
@@ -12,9 +12,9 @@ initial=$(git rev-parse --verify HEAD)
12
'
13
14
test_expect_success path-optimization '
15
- commit=$(echo "Unchanged tree" | git-commit-tree "HEAD^{tree}" -p HEAD) &&
16
- test $(git-rev-list $commit | wc -l) = 2 &&
17
- test $(git-rev-list $commit -- . | wc -l) = 1
15
+ commit=$(echo "Unchanged tree" | git commit-tree "HEAD^{tree}" -p HEAD) &&
16
+ test $(git rev-list $commit | wc -l) = 2 &&
17
+ test $(git rev-list $commit -- . | wc -l) = 1
18
'
19
20
test_expect_success 'further setup' '
t/t6005-rev-list-count.sh
+22
-22
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-rev-list --max-count and --skip test'
3
+test_description='git rev-list --max-count and --skip test'
4
5
. ./test-lib.sh
6
@@ -13,39 +13,39 @@ test_expect_success 'setup' '
13
'
14
15
test_expect_success 'no options' '
16
- test $(git-rev-list HEAD | wc -l) = 5
16
+ test $(git rev-list HEAD | wc -l) = 5
17
'
18
19
test_expect_success '--max-count' '
20
- test $(git-rev-list HEAD --max-count=0 | wc -l) = 0 &&
21
- test $(git-rev-list HEAD --max-count=3 | wc -l) = 3 &&
22
- test $(git-rev-list HEAD --max-count=5 | wc -l) = 5 &&
23
- test $(git-rev-list HEAD --max-count=10 | wc -l) = 5
20
+ test $(git rev-list HEAD --max-count=0 | wc -l) = 0 &&
21
+ test $(git rev-list HEAD --max-count=3 | wc -l) = 3 &&
22
+ test $(git rev-list HEAD --max-count=5 | wc -l) = 5 &&
23
+ test $(git rev-list HEAD --max-count=10 | wc -l) = 5
24
'
25
26
test_expect_success '--max-count all forms' '
27
- test $(git-rev-list HEAD --max-count=1 | wc -l) = 1 &&
28
- test $(git-rev-list HEAD -1 | wc -l) = 1 &&
29
- test $(git-rev-list HEAD -n1 | wc -l) = 1 &&
30
- test $(git-rev-list HEAD -n 1 | wc -l) = 1
27
+ test $(git rev-list HEAD --max-count=1 | wc -l) = 1 &&
28
+ test $(git rev-list HEAD -1 | wc -l) = 1 &&
29
+ test $(git rev-list HEAD -n1 | wc -l) = 1 &&
30
+ test $(git rev-list HEAD -n 1 | wc -l) = 1
31
'
32
33
test_expect_success '--skip' '
34
- test $(git-rev-list HEAD --skip=0 | wc -l) = 5 &&
35
- test $(git-rev-list HEAD --skip=3 | wc -l) = 2 &&
36
- test $(git-rev-list HEAD --skip=5 | wc -l) = 0 &&
37
- test $(git-rev-list HEAD --skip=10 | wc -l) = 0
34
+ test $(git rev-list HEAD --skip=0 | wc -l) = 5 &&
35
+ test $(git rev-list HEAD --skip=3 | wc -l) = 2 &&
36
+ test $(git rev-list HEAD --skip=5 | wc -l) = 0 &&
37
+ test $(git rev-list HEAD --skip=10 | wc -l) = 0
38
'
39
40
test_expect_success '--skip --max-count' '
41
- test $(git-rev-list HEAD --skip=0 --max-count=0 | wc -l) = 0 &&
42
- test $(git-rev-list HEAD --skip=0 --max-count=10 | wc -l) = 5 &&
43
- test $(git-rev-list HEAD --skip=3 --max-count=0 | wc -l) = 0 &&
44
- test $(git-rev-list HEAD --skip=3 --max-count=1 | wc -l) = 1 &&
45
- test $(git-rev-list HEAD --skip=3 --max-count=2 | wc -l) = 2 &&
46
- test $(git-rev-list HEAD --skip=3 --max-count=10 | wc -l) = 2 &&
47
- test $(git-rev-list HEAD --skip=5 --max-count=10 | wc -l) = 0 &&
48
- test $(git-rev-list HEAD --skip=10 --max-count=10 | wc -l) = 0
41
+ test $(git rev-list HEAD --skip=0 --max-count=0 | wc -l) = 0 &&
42
+ test $(git rev-list HEAD --skip=0 --max-count=10 | wc -l) = 5 &&
43
+ test $(git rev-list HEAD --skip=3 --max-count=0 | wc -l) = 0 &&
44
+ test $(git rev-list HEAD --skip=3 --max-count=1 | wc -l) = 1 &&
45
+ test $(git rev-list HEAD --skip=3 --max-count=2 | wc -l) = 2 &&
46
+ test $(git rev-list HEAD --skip=3 --max-count=10 | wc -l) = 2 &&
47
+ test $(git rev-list HEAD --skip=5 --max-count=10 | wc -l) = 0 &&
48
+ test $(git rev-list HEAD --skip=10 --max-count=10 | wc -l) = 0
49
'
50
51
test_done
t/t6006-rev-list-format.sh
+5
-5
@@ -1,12 +1,12 @@
1
#!/bin/sh
2
3
-test_description='git-rev-list --pretty=format test'
3
+test_description='git rev-list --pretty=format test'
4
5
. ./test-lib.sh
6
7
test_tick
8
test_expect_success 'setup' '
9
-touch foo && git-add foo && git-commit -m "added foo" &&
9
+touch foo && git add foo && git-commit -m "added foo" &&
10
echo changed >foo && git-commit -a -m "changed foo"
11
'
12
@@ -14,8 +14,8 @@ touch foo && git-add foo && git-commit -m "added foo" &&
14
test_format() {
15
cat >expect.$1
16
test_expect_success "format $1" "
17
-git-rev-list --pretty=format:$2 master >output.$1 &&
18
-git-diff expect.$1 output.$1
17
+git rev-list --pretty=format:$2 master >output.$1 &&
18
+git diff expect.$1 output.$1
19
"
20
}
21
@@ -113,7 +113,7 @@ and it will be encoded in iso8859-1. We should therefore
113
include an iso8859 character: ¡bueno!
114
EOF
115
test_expect_success 'setup complex body' '
116
-git-config i18n.commitencoding iso8859-1 &&
116
+git config i18n.commitencoding iso8859-1 &&
117
echo change2 >foo && git-commit -a -F commit-msg
118
'
119
t/t6010-merge-base.sh
+12
-12
@@ -8,7 +8,7 @@ test_description='Merge base computation.
8
9
. ./test-lib.sh
10
11
-T=$(git-write-tree)
11
+T=$(git write-tree)
12
13
M=1130000000
14
Z=+0000
@@ -29,7 +29,7 @@ doit() {
29
GIT_COMMITTER_DATE="$(($M + $OFFSET)) $Z"
30
GIT_AUTHOR_DATE=$GIT_COMMITTER_DATE
31
export GIT_COMMITTER_DATE GIT_AUTHOR_DATE
32
- commit=$(echo $NAME | git-commit-tree $T $PARENTS)
32
+ commit=$(echo $NAME | git commit-tree $T $PARENTS)
33
echo $commit >.git/refs/tags/$NAME
34
echo $commit
35
}
@@ -51,16 +51,16 @@ G=$(doit 7 G $B $E)
51
H=$(doit 8 H $A $F)
52
53
test_expect_success 'compute merge-base (single)' \
54
- 'MB=$(git-merge-base G H) &&
55
- expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
54
+ 'MB=$(git merge-base G H) &&
55
+ expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"'
56
57
test_expect_success 'compute merge-base (all)' \
58
- 'MB=$(git-merge-base --all G H) &&
59
- expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
58
+ 'MB=$(git merge-base --all G H) &&
59
+ expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"'
60
61
test_expect_success 'compute merge-base with show-branch' \
62
- 'MB=$(git-show-branch --merge-base G H) &&
63
- expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/B"'
62
+ 'MB=$(git show-branch --merge-base G H) &&
63
+ expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/B"'
64
65
# Setup for second test to demonstrate that relying on timestamps in a
66
# distributed SCM to provide a _consistent_ partial ordering of commits
@@ -100,11 +100,11 @@ PL=$(doit 4 PL $L2 $C2)
100
PR=$(doit 4 PR $C2 $R2)
101
102
test_expect_success 'compute merge-base (single)' \
103
- 'MB=$(git-merge-base PL PR) &&
104
- expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/C2"'
103
+ 'MB=$(git merge-base PL PR) &&
104
+ expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/C2"'
105
106
test_expect_success 'compute merge-base (all)' \
107
- 'MB=$(git-merge-base --all PL PR) &&
108
- expr "$(git-name-rev "$MB")" : "[0-9a-f]* tags/C2"'
107
+ 'MB=$(git merge-base --all PL PR) &&
108
+ expr "$(git name-rev "$MB")" : "[0-9a-f]* tags/C2"'
109
110
test_done
t/t6023-merge-file.sh
+5
-5
@@ -56,18 +56,18 @@ printf "propter nomen suum." >> new4.txt
56
57
cp new1.txt test.txt
58
test_expect_success "merge without conflict" \
59
- "git-merge-file test.txt orig.txt new2.txt"
59
+ "git merge-file test.txt orig.txt new2.txt"
60
61
cp new1.txt test2.txt
62
test_expect_success "merge without conflict (missing LF at EOF)" \
63
- "git-merge-file test2.txt orig.txt new2.txt"
63
+ "git merge-file test2.txt orig.txt new2.txt"
64
65
test_expect_success "merge result added missing LF" \
66
"git diff test.txt test2.txt"
67
68
cp test.txt backup.txt
69
test_expect_failure "merge with conflicts" \
70
- "git-merge-file test.txt orig.txt new3.txt"
70
+ "git merge-file test.txt orig.txt new3.txt"
71
72
cat > expect.txt << EOF
73
<<<<<<< test.txt
@@ -90,7 +90,7 @@ test_expect_success "expected conflict markers" "git diff test.txt expect.txt"
90
91
cp backup.txt test.txt
92
test_expect_failure "merge with conflicts, using -L" \
93
- "git-merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
93
+ "git merge-file -L 1 -L 2 test.txt orig.txt new3.txt"
94
95
cat > expect.txt << EOF
96
<<<<<<< 1
@@ -114,7 +114,7 @@ test_expect_success "expected conflict markers, with -L" \
114
115
sed "s/ tu / TU /" < new1.txt > new5.txt
116
test_expect_failure "conflict in removed tail" \
117
- "git-merge-file -p orig.txt new1.txt new5.txt > out"
117
+ "git merge-file -p orig.txt new1.txt new5.txt > out"
118
119
cat > expect << EOF
120
Dominus regit me,
t/t6024-recursive-merge.sh
+4
-4
@@ -28,7 +28,7 @@ echo B > a1 &&
28
GIT_AUTHOR_DATE="2006-12-12 23:00:02" git commit -m B a1 &&
29
30
git checkout -b D A &&
31
-git-rev-parse B > .git/MERGE_HEAD &&
31
+git rev-parse B > .git/MERGE_HEAD &&
32
echo D > a1 &&
33
git update-index a1 &&
34
GIT_AUTHOR_DATE="2006-12-12 23:00:03" git commit -m D &&
@@ -42,19 +42,19 @@ echo C > a1 &&
42
GIT_AUTHOR_DATE="2006-12-12 23:00:05" git commit -m C a1 &&
43
44
git checkout -b E C &&
45
-git-rev-parse B > .git/MERGE_HEAD &&
45
+git rev-parse B > .git/MERGE_HEAD &&
46
echo E > a1 &&
47
git update-index a1 &&
48
GIT_AUTHOR_DATE="2006-12-12 23:00:06" git commit -m E &&
49
50
git checkout -b G E &&
51
-git-rev-parse A > .git/MERGE_HEAD &&
51
+git rev-parse A > .git/MERGE_HEAD &&
52
echo G > a1 &&
53
git update-index a1 &&
54
GIT_AUTHOR_DATE="2006-12-12 23:00:07" git commit -m G &&
55
56
git checkout -b F D &&
57
-git-rev-parse C > .git/MERGE_HEAD &&
57
+git rev-parse C > .git/MERGE_HEAD &&
58
echo F > a1 &&
59
git update-index a1 &&
60
GIT_AUTHOR_DATE="2006-12-12 23:00:08" git commit -m F
t/t6025-merge-symlinks.sh
+7
-7
@@ -12,22 +12,22 @@ if core.symlinks is false.'
12
13
test_expect_success \
14
'setup' '
15
-git-config core.symlinks false &&
15
+git config core.symlinks false &&
16
> file &&
17
-git-add file &&
17
+git add file &&
18
git-commit -m initial &&
19
-git-branch b-symlink &&
20
-git-branch b-file &&
19
+git branch b-symlink &&
20
+git branch b-file &&
21
l=$(echo -n file | git-hash-object -t blob -w --stdin) &&
22
-echo "120000 $l symlink" | git-update-index --index-info &&
22
+echo "120000 $l symlink" | git update-index --index-info &&
23
git-commit -m master &&
24
git-checkout b-symlink &&
25
l=$(echo -n file-different | git-hash-object -t blob -w --stdin) &&
26
-echo "120000 $l symlink" | git-update-index --index-info &&
26
+echo "120000 $l symlink" | git update-index --index-info &&
27
git-commit -m b-symlink &&
28
git-checkout b-file &&
29
echo plain-file > symlink &&
30
-git-add symlink &&
30
+git add symlink &&
31
git-commit -m b-file'
32
33
test_expect_failure \
t/t6101-rev-parse-parents.sh
+14
-14
@@ -3,31 +3,31 @@
3
# Copyright (c) 2005 Johannes Schindelin
4
#
5
6
-test_description='Test git-rev-parse with different parent options'
6
+test_description='Test git rev-parse with different parent options'
7
8
. ./test-lib.sh
9
. ../t6000lib.sh # t6xxx specific functions
10
11
date >path0
12
-git-update-index --add path0
13
-save_tag tree git-write-tree
12
+git update-index --add path0
13
+save_tag tree git write-tree
14
hide_error save_tag start unique_commit "start" tree
15
save_tag second unique_commit "second" tree -p start
16
hide_error save_tag start2 unique_commit "start2" tree
17
save_tag two_parents unique_commit "next" tree -p second -p start2
18
save_tag final unique_commit "final" tree -p two_parents
19
20
-test_expect_success 'start is valid' 'git-rev-parse start | grep "^[0-9a-f]\{40\}$"'
21
-test_expect_success 'start^0' "test $(cat .git/refs/tags/start) = $(git-rev-parse start^0)"
22
-test_expect_success 'start^1 not valid' "if git-rev-parse --verify start^1; then false; else :; fi"
23
-test_expect_success 'second^1 = second^' "test $(git-rev-parse second^1) = $(git-rev-parse second^)"
24
-test_expect_success 'final^1^1^1' "test $(git-rev-parse start) = $(git-rev-parse final^1^1^1)"
25
-test_expect_success 'final^1^1^1 = final^^^' "test $(git-rev-parse final^1^1^1) = $(git-rev-parse final^^^)"
26
-test_expect_success 'final^1^2' "test $(git-rev-parse start2) = $(git-rev-parse final^1^2)"
27
-test_expect_success 'final^1^2 != final^1^1' "test $(git-rev-parse final^1^2) != $(git-rev-parse final^1^1)"
28
-test_expect_success 'final^1^3 not valid' "if git-rev-parse --verify final^1^3; then false; else :; fi"
29
-test_expect_failure '--verify start2^1' 'git-rev-parse --verify start2^1'
30
-test_expect_success '--verify start2^0' 'git-rev-parse --verify start2^0'
20
+test_expect_success 'start is valid' 'git rev-parse start | grep "^[0-9a-f]\{40\}$"'
21
+test_expect_success 'start^0' "test $(cat .git/refs/tags/start) = $(git rev-parse start^0)"
22
+test_expect_success 'start^1 not valid' "if git rev-parse --verify start^1; then false; else :; fi"
23
+test_expect_success 'second^1 = second^' "test $(git rev-parse second^1) = $(git rev-parse second^)"
24
+test_expect_success 'final^1^1^1' "test $(git rev-parse start) = $(git rev-parse final^1^1^1)"
25
+test_expect_success 'final^1^1^1 = final^^^' "test $(git rev-parse final^1^1^1) = $(git rev-parse final^^^)"
26
+test_expect_success 'final^1^2' "test $(git rev-parse start2) = $(git rev-parse final^1^2)"
27
+test_expect_success 'final^1^2 != final^1^1' "test $(git rev-parse final^1^2) != $(git rev-parse final^1^1)"
28
+test_expect_success 'final^1^3 not valid' "if git rev-parse --verify final^1^3; then false; else :; fi"
29
+test_expect_failure '--verify start2^1' 'git rev-parse --verify start2^1'
30
+test_expect_success '--verify start2^0' 'git rev-parse --verify start2^0'
31
32
test_expect_success 'repack for next test' 'git repack -a -d'
33
test_expect_success 'short SHA-1 works' '
t/t6120-describe.sh
+11
-11
@@ -28,39 +28,39 @@ check_describe () {
28
test_expect_success setup '
29
30
test_tick &&
31
- echo one >file && git-add file && git-commit -m initial &&
32
- one=$(git-rev-parse HEAD) &&
31
+ echo one >file && git add file && git-commit -m initial &&
32
+ one=$(git rev-parse HEAD) &&
33
34
test_tick &&
35
- echo two >file && git-add file && git-commit -m second &&
36
- two=$(git-rev-parse HEAD) &&
35
+ echo two >file && git add file && git-commit -m second &&
36
+ two=$(git rev-parse HEAD) &&
37
38
test_tick &&
39
- echo three >file && git-add file && git-commit -m third &&
39
+ echo three >file && git add file && git-commit -m third &&
40
41
test_tick &&
42
- echo A >file && git-add file && git-commit -m A &&
42
+ echo A >file && git add file && git-commit -m A &&
43
test_tick &&
44
git-tag -a -m A A &&
45
46
test_tick &&
47
- echo c >file && git-add file && git-commit -m c &&
47
+ echo c >file && git add file && git-commit -m c &&
48
test_tick &&
49
git-tag c &&
50
51
git reset --hard $two &&
52
test_tick &&
53
- echo B >side && git-add side && git-commit -m B &&
53
+ echo B >side && git add side && git-commit -m B &&
54
test_tick &&
55
git-tag -a -m B B &&
56
57
test_tick &&
58
git-merge -m Merged c &&
59
- merged=$(git-rev-parse HEAD) &&
59
+ merged=$(git rev-parse HEAD) &&
60
61
git reset --hard $two &&
62
test_tick &&
63
- echo D >another && git-add another && git-commit -m D &&
63
+ echo D >another && git add another && git-commit -m D &&
64
test_tick &&
65
git-tag -a -m D D &&
66
@@ -77,7 +77,7 @@ test_expect_success setup '
77
git-merge -m Merged $merged &&
78
79
test_tick &&
80
- echo X >file && echo X >side && git-add file side &&
80
+ echo X >file && echo X >side && git add file side &&
81
git-commit -m x
82
83
'
t/t7001-mv.sh
+16
-16
@@ -1,18 +1,18 @@
1
#!/bin/sh
2
3
-test_description='git-mv in subdirs'
3
+test_description='git mv in subdirs'
4
. ./test-lib.sh
5
6
test_expect_success \
7
'prepare reference tree' \
8
'mkdir path0 path1 &&
9
cp ../../COPYING path0/COPYING &&
10
- git-add path0/COPYING &&
10
+ git add path0/COPYING &&
11
git-commit -m add -a'
12
13
test_expect_success \
14
'moving the file out of subdirectory' \
15
- 'cd path0 && git-mv COPYING ../path1/COPYING'
15
+ 'cd path0 && git mv COPYING ../path1/COPYING'
16
17
# in path0 currently
18
test_expect_success \
@@ -21,12 +21,12 @@ test_expect_success \
21
22
test_expect_success \
23
'checking the commit' \
24
- 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
24
+ 'git diff-tree -r -M --name-status HEAD^ HEAD | \
25
grep -E "^R100.+path0/COPYING.+path1/COPYING"'
26
27
test_expect_success \
28
'moving the file back into subdirectory' \
29
- 'cd path0 && git-mv ../path1/COPYING COPYING'
29
+ 'cd path0 && git mv ../path1/COPYING COPYING'
30
31
# in path0 currently
32
test_expect_success \
@@ -35,18 +35,18 @@ test_expect_success \
35
36
test_expect_success \
37
'checking the commit' \
38
- 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
38
+ 'git diff-tree -r -M --name-status HEAD^ HEAD | \
39
grep -E "^R100.+path1/COPYING.+path0/COPYING"'
40
41
test_expect_success \
42
'adding another file' \
43
'cp ../../README path0/README &&
44
- git-add path0/README &&
44
+ git add path0/README &&
45
git-commit -m add2 -a'
46
47
test_expect_success \
48
'moving whole subdirectory' \
49
- 'git-mv path0 path2'
49
+ 'git mv path0 path2'
50
51
test_expect_success \
52
'commiting the change' \
@@ -54,18 +54,18 @@ test_expect_success \
54
55
test_expect_success \
56
'checking the commit' \
57
- 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
57
+ 'git diff-tree -r -M --name-status HEAD^ HEAD | \
58
grep -E "^R100.+path0/COPYING.+path2/COPYING" &&
59
- git-diff-tree -r -M --name-status HEAD^ HEAD | \
59
+ git diff-tree -r -M --name-status HEAD^ HEAD | \
60
grep -E "^R100.+path0/README.+path2/README"'
61
62
test_expect_success \
63
'succeed when source is a prefix of destination' \
64
- 'git-mv path2/COPYING path2/COPYING-renamed'
64
+ 'git mv path2/COPYING path2/COPYING-renamed'
65
66
test_expect_success \
67
'moving whole subdirectory into subdirectory' \
68
- 'git-mv path2 path1'
68
+ 'git mv path2 path1'
69
70
test_expect_success \
71
'commiting the change' \
@@ -73,18 +73,18 @@ test_expect_success \
73
74
test_expect_success \
75
'checking the commit' \
76
- 'git-diff-tree -r -M --name-status HEAD^ HEAD | \
76
+ 'git diff-tree -r -M --name-status HEAD^ HEAD | \
77
grep -E "^R100.+path2/COPYING.+path1/path2/COPYING" &&
78
- git-diff-tree -r -M --name-status HEAD^ HEAD | \
78
+ git diff-tree -r -M --name-status HEAD^ HEAD | \
79
grep -E "^R100.+path2/README.+path1/path2/README"'
80
81
test_expect_failure \
82
'do not move directory over existing directory' \
83
- 'mkdir path0 && mkdir path0/path2 && git-mv path2 path0'
83
+ 'mkdir path0 && mkdir path0/path2 && git mv path2 path0'
84
85
test_expect_success \
86
'move into "."' \
87
- 'git-mv path1/path2/ .'
87
+ 'git mv path1/path2/ .'
88
89
test_expect_success "Michael Cassar's test case" '
90
rm -fr .git papers partA &&
t/t7003-filter-branch.sh
+7
-7
@@ -27,14 +27,14 @@ test_expect_success 'setup' '
27
make_commit H
28
'
29
30
-H=$(git-rev-parse H)
30
+H=$(git rev-parse H)
31
32
test_expect_success 'rewrite identically' '
33
git-filter-branch H2
34
'
35
36
test_expect_success 'result is really identical' '
37
- test $H = $(git-rev-parse H2)
37
+ test $H = $(git rev-parse H2)
38
'
39
40
test_expect_success 'rewrite, renaming a specific file' '
@@ -51,7 +51,7 @@ test_expect_success 'rewrite one branch, keeping a side branch' '
51
'
52
53
test_expect_success 'common ancestor is still common (unchanged)' '
54
- test "$(git-merge-base modD D)" = "$(git-rev-parse B)"
54
+ test "$(git merge-base modD D)" = "$(git rev-parse B)"
55
'
56
57
test_expect_success 'filter subdirectory only' '
@@ -73,7 +73,7 @@ test_expect_success 'filter subdirectory only' '
73
'
74
75
test_expect_success 'subdirectory filter result looks okay' '
76
- test 2 = $(git-rev-list sub | wc -l) &&
76
+ test 2 = $(git rev-list sub | wc -l) &&
77
git show sub:new &&
78
! git show sub:subdir
79
'
@@ -93,7 +93,7 @@ test_expect_success 'setup and filter history that requires --full-history' '
93
'
94
95
test_expect_success 'subdirectory filter result looks okay' '
96
- test 3 = $(git-rev-list -1 --parents sub-master | wc -w) &&
96
+ test 3 = $(git rev-list -1 --parents sub-master | wc -w) &&
97
git show sub-master^:new &&
98
git show sub-master^2:new &&
99
! git show sub:subdir
@@ -101,9 +101,9 @@ test_expect_success 'subdirectory filter result looks okay' '
101
102
test_expect_success 'use index-filter to move into a subdirectory' '
103
git-filter-branch --index-filter \
104
- "git-ls-files -s | sed \"s-\\t-&newsubdir/-\" |
104
+ "git ls-files -s | sed \"s-\\t-&newsubdir/-\" |
105
GIT_INDEX_FILE=\$GIT_INDEX_FILE.new \
106
- git-update-index --index-info &&
106
+ git update-index --index-info &&
107
mv \$GIT_INDEX_FILE.new \$GIT_INDEX_FILE" directorymoved &&
108
test -z "$(git diff HEAD directorymoved:newsubdir)"'
109
t/t7004-tag.sh
+11
-11
@@ -176,7 +176,7 @@ EOF
176
test_expect_success \
177
'listing tags with substring as pattern must print those matching' '
178
git-tag -l a > actual &&
179
- git-diff expect actual
179
+ git diff expect actual
180
'
181
182
cat >expect <<EOF
@@ -187,7 +187,7 @@ EOF
187
test_expect_success \
188
'listing tags with substring as pattern must print those matching' '
189
git-tag -l .1 > actual &&
190
- git-diff expect actual
190
+ git diff expect actual
191
'
192
193
cat >expect <<EOF
@@ -197,7 +197,7 @@ EOF
197
test_expect_success \
198
'listing tags with substring as pattern must print those matching' '
199
git-tag -l t21 > actual &&
200
- git-diff expect actual
200
+ git diff expect actual
201
'
202
203
cat >expect <<EOF
@@ -207,7 +207,7 @@ EOF
207
test_expect_success \
208
'listing tags using a name as pattern must print those matching' '
209
git-tag -l a1 > actual &&
210
- git-diff expect actual
210
+ git diff expect actual
211
'
212
213
cat >expect <<EOF
@@ -217,7 +217,7 @@ EOF
217
test_expect_success \
218
'listing tags using a name as pattern must print those matching' '
219
git-tag -l v1.0 > actual &&
220
- git-diff expect actual
220
+ git diff expect actual
221
'
222
223
cat >expect <<EOF
@@ -226,14 +226,14 @@ EOF
226
test_expect_success \
227
'listing tags with ? in the pattern should print those matching' '
228
git-tag -l "1.1?" > actual &&
229
- git-diff expect actual
229
+ git diff expect actual
230
'
231
232
>expect
233
test_expect_success \
234
'listing tags using v.* should print nothing because none have v.' '
235
git-tag -l "v.*" > actual &&
236
- git-diff expect actual
236
+ git diff expect actual
237
'
238
239
cat >expect <<EOF
@@ -245,7 +245,7 @@ EOF
245
test_expect_success \
246
'listing tags using v* should print only those having v' '
247
git-tag -l "v*" > actual &&
248
- git-diff expect actual
248
+ git diff expect actual
249
'
250
251
# creating and verifying lightweight tags:
@@ -253,8 +253,8 @@ test_expect_success \
253
test_expect_success \
254
'a non-annotated tag created without parameters should point to HEAD' '
255
git-tag non-annotated-tag &&
256
- test $(git-cat-file -t non-annotated-tag) = commit &&
257
- test $(git-rev-parse non-annotated-tag) = $(git-rev-parse HEAD)
256
+ test $(git cat-file -t non-annotated-tag) = commit &&
257
+ test $(git rev-parse non-annotated-tag) = $(git rev-parse HEAD)
258
'
259
260
test_expect_failure 'trying to verify an unknown tag should fail' \
@@ -475,7 +475,7 @@ echo '-----BEGIN PGP SIGNATURE-----' >>expect
475
test_expect_success 'creating a signed tag with -m message should succeed' '
476
git-tag -s -m "A signed tag message" signed-tag &&
477
get_tag_msg signed-tag >actual &&
478
- git-diff expect actual
478
+ git diff expect actual
479
'
480
481
test_expect_success 'verifying a signed tag should succeed' \
t/t7101-reset.sh
+5
-5
@@ -10,7 +10,7 @@ test_expect_success \
10
'creating initial files' \
11
'mkdir path0 &&
12
cp ../../COPYING path0/COPYING &&
13
- git-add path0/COPYING &&
13
+ git add path0/COPYING &&
14
git-commit -m add -a'
15
16
test_expect_success \
@@ -21,10 +21,10 @@ test_expect_success \
21
cp ../../COPYING path1/COPYING &&
22
cp ../../COPYING COPYING &&
23
cp ../../COPYING path0/COPYING-TOO &&
24
- git-add path1/path2/COPYING &&
25
- git-add path1/COPYING &&
26
- git-add COPYING &&
27
- git-add path0/COPYING-TOO &&
24
+ git add path1/path2/COPYING &&
25
+ git add path1/COPYING &&
26
+ git add COPYING &&
27
+ git add path0/COPYING-TOO &&
28
git-commit -m change -a'
29
30
test_expect_success \
t/t7300-clean.sh
+3
-3
@@ -13,10 +13,10 @@ test_expect_success 'setup' '
13
touch src/part1.c Makefile &&
14
echo build >.gitignore &&
15
echo \*.o >>.gitignore &&
16
- git-add . &&
16
+ git add . &&
17
git-commit -m setup &&
18
touch src/part2.c README &&
19
- git-add .
19
+ git add .
20
21
'
22
@@ -141,7 +141,7 @@ test_expect_success 'git-clean -d -X' '
141
142
test_expect_success 'clean.requireForce' '
143
144
- git-config clean.requireForce true &&
144
+ git config clean.requireForce true &&
145
! git-clean
146
147
'
t/t7400-submodule-basic.sh
+16
-16
@@ -23,24 +23,24 @@ subcommands of git-submodule.
23
test_expect_success 'Prepare submodule testing' '
24
mkdir lib &&
25
cd lib &&
26
- git-init &&
26
+ git init &&
27
echo a >a &&
28
- git-add a &&
28
+ git add a &&
29
git-commit -m "submodule commit 1" &&
30
git-tag -a -m "rev-1" rev-1 &&
31
- rev1=$(git-rev-parse HEAD) &&
31
+ rev1=$(git rev-parse HEAD) &&
32
if test -z "$rev1"
33
then
34
- echo "[OOPS] submodule git-rev-parse returned nothing"
34
+ echo "[OOPS] submodule git rev-parse returned nothing"
35
false
36
fi &&
37
cd .. &&
38
echo a >a &&
39
echo z >z &&
40
- git-add a lib z &&
40
+ git add a lib z &&
41
git-commit -m "super commit 1" &&
42
mv lib .subrepo &&
43
- GIT_CONFIG=.gitmodules git-config submodule.example.url git://example.com/lib.git
43
+ GIT_CONFIG=.gitmodules git config submodule.example.url git://example.com/lib.git
44
'
45
46
test_expect_success 'status should fail for unmapped paths' '
@@ -48,9 +48,9 @@ test_expect_success 'status should fail for unmapped paths' '
48
then
49
echo "[OOPS] submodule status succeeded"
50
false
51
- elif ! GIT_CONFIG=.gitmodules git-config submodule.example.path lib
51
+ elif ! GIT_CONFIG=.gitmodules git config submodule.example.path lib
52
then
53
- echo "[OOPS] git-config failed to update .gitmodules"
53
+ echo "[OOPS] git config failed to update .gitmodules"
54
false
55
fi
56
'
@@ -66,12 +66,12 @@ test_expect_success 'status should initially be "missing"' '
66
67
test_expect_success 'init should register submodule url in .git/config' '
68
git-submodule init &&
69
- url=$(git-config submodule.example.url) &&
69
+ url=$(git config submodule.example.url) &&
70
if test "$url" != "git://example.com/lib.git"
71
then
72
echo "[OOPS] init succeeded but submodule url is wrong"
73
false
74
- elif ! git-config submodule.example.url ./.subrepo
74
+ elif ! git config submodule.example.url ./.subrepo
75
then
76
echo "[OOPS] init succeeded but update of url failed"
77
false
@@ -113,7 +113,7 @@ test_expect_success 'update should work when path is an empty dir' '
113
rm -rf lib &&
114
mkdir lib &&
115
git-submodule update &&
116
- head=$(cd lib && git-rev-parse HEAD) &&
116
+ head=$(cd lib && git rev-parse HEAD) &&
117
if test -z "$head"
118
then
119
echo "[OOPS] Failed to obtain submodule head"
@@ -132,13 +132,13 @@ test_expect_success 'status should be "up-to-date" after update' '
132
test_expect_success 'status should be "modified" after submodule commit' '
133
cd lib &&
134
echo b >b &&
135
- git-add b &&
135
+ git add b &&
136
git-commit -m "submodule commit 2" &&
137
- rev2=$(git-rev-parse HEAD) &&
137
+ rev2=$(git rev-parse HEAD) &&
138
cd .. &&
139
if test -z "$rev2"
140
then
141
- echo "[OOPS] submodule git-rev-parse returned nothing"
141
+ echo "[OOPS] submodule git rev-parse returned nothing"
142
false
143
fi &&
144
git-submodule status | grep "^+$rev2"
@@ -150,10 +150,10 @@ test_expect_success 'the --cached sha1 should be rev1' '
150
151
test_expect_success 'update should checkout rev1' '
152
git-submodule update &&
153
- head=$(cd lib && git-rev-parse HEAD) &&
153
+ head=$(cd lib && git rev-parse HEAD) &&
154
if test -z "$head"
155
then
156
- echo "[OOPS] submodule git-rev-parse returned nothing"
156
+ echo "[OOPS] submodule git rev-parse returned nothing"
157
false
158
elif test "$head" != "$rev1"
159
then
t/t8001-annotate.sh
+1
-1
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-annotate'
3
+test_description='git annotate'
4
. ./test-lib.sh
5
6
PROG='git annotate'
t/t8002-blame.sh
+1
-1
@@ -1,6 +1,6 @@
1
#!/bin/sh
2
3
-test_description='git-blame'
3
+test_description='git blame'
4
. ./test-lib.sh
5
6
PROG='git blame -c'
t/t9100-git-svn-basic.sh
+6
-6
@@ -86,10 +86,10 @@ test_expect_failure "$name" "
86
rm -f '$GIT_DIR'/index &&
87
git checkout -f -b mybranch3 remotes/git-svn &&
88
rm bar/zzz &&
89
- git-update-index --remove bar/zzz &&
89
+ git update-index --remove bar/zzz &&
90
mkdir bar/zzz &&
91
echo yyy > bar/zzz/yyy &&
92
- git-update-index --add bar/zzz/yyy &&
92
+ git update-index --add bar/zzz/yyy &&
93
git commit -m '$name' &&
94
git-svn set-tree --find-copies-harder --rmdir \
95
remotes/git-svn..mybranch3" || true
@@ -191,8 +191,8 @@ GIT_SVN_ID=alt
191
export GIT_SVN_ID
192
test_expect_success "$name" \
193
"git-svn init $svnrepo && git-svn fetch &&
194
- git-rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
195
- git-rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
194
+ git rev-list --pretty=raw remotes/git-svn | grep ^tree | uniq > a &&
195
+ git rev-list --pretty=raw remotes/alt | grep ^tree | uniq > b &&
196
git diff a b"
197
198
name='check imported tree checksums expected tree checksums'
@@ -214,7 +214,7 @@ EOF
214
test_expect_success "$name" "git diff a expected"
215
216
test_expect_failure 'exit if remote refs are ambigious' "
217
- git-config --add svn-remote.svn.fetch \
217
+ git config --add svn-remote.svn.fetch \
218
bar:refs/remotes/git-svn &&
219
git-svn migrate
220
"
@@ -222,7 +222,7 @@ test_expect_failure 'exit if remote refs are ambigious' "
222
test_expect_failure 'exit if init-ing a would clobber a URL' "
223
svnadmin create ${PWD}/svnrepo2 &&
224
svn mkdir -m 'mkdir bar' ${svnrepo}2/bar &&
225
- git-config --unset svn-remote.svn.fetch \
225
+ git config --unset svn-remote.svn.fetch \
226
'^bar:refs/remotes/git-svn$' &&
227
git-svn init ${svnrepo}2/bar
228
"
t/t9104-git-svn-follow-parent.sh
+15
-15
@@ -30,31 +30,31 @@ test_expect_success 'initialize repo' "
30
test_expect_success 'init and fetch a moved directory' "
31
git-svn init --minimize-url -i thunk $svnrepo/thunk &&
32
git-svn fetch -i thunk &&
33
- test \"\`git-rev-parse --verify refs/remotes/thunk@2\`\" \
34
- = \"\`git-rev-parse --verify refs/remotes/thunk~1\`\" &&
35
- test \"\`git-cat-file blob refs/remotes/thunk:readme |\
33
+ test \"\`git rev-parse --verify refs/remotes/thunk@2\`\" \
34
+ = \"\`git rev-parse --verify refs/remotes/thunk~1\`\" &&
35
+ test \"\`git cat-file blob refs/remotes/thunk:readme |\
36
sed -n -e '3p'\`\" = goodbye &&
37
- test -z \"\`git-config --get svn-remote.svn.fetch \
37
+ test -z \"\`git config --get svn-remote.svn.fetch \
38
'^trunk:refs/remotes/thunk@2$'\`\"
39
"
40
41
test_expect_success 'init and fetch from one svn-remote' "
42
- git-config svn-remote.svn.url $svnrepo &&
43
- git-config --add svn-remote.svn.fetch \
42
+ git config svn-remote.svn.url $svnrepo &&
43
+ git config --add svn-remote.svn.fetch \
44
trunk:refs/remotes/svn/trunk &&
45
- git-config --add svn-remote.svn.fetch \
45
+ git config --add svn-remote.svn.fetch \
46
thunk:refs/remotes/svn/thunk &&
47
git-svn fetch -i svn/thunk &&
48
- test \"\`git-rev-parse --verify refs/remotes/svn/trunk\`\" \
49
- = \"\`git-rev-parse --verify refs/remotes/svn/thunk~1\`\" &&
50
- test \"\`git-cat-file blob refs/remotes/svn/thunk:readme |\
48
+ test \"\`git rev-parse --verify refs/remotes/svn/trunk\`\" \
49
+ = \"\`git rev-parse --verify refs/remotes/svn/thunk~1\`\" &&
50
+ test \"\`git cat-file blob refs/remotes/svn/thunk:readme |\
51
sed -n -e '3p'\`\" = goodbye
52
"
53
54
test_expect_success 'follow deleted parent' "
55
svn cp -m 'resurrecting trunk as junk' \
56
-r2 $svnrepo/trunk $svnrepo/junk &&
57
- git-config --add svn-remote.svn.fetch \
57
+ git config --add svn-remote.svn.fetch \
58
junk:refs/remotes/svn/junk &&
59
git-svn fetch -i svn/thunk &&
60
git-svn fetch -i svn/junk &&
@@ -71,13 +71,13 @@ test_expect_success 'follow larger parent' "
71
git-svn init --minimize-url -i larger \
72
$svnrepo/another-larger/trunk/thunk/bump/thud &&
73
git-svn fetch -i larger &&
74
- git-rev-parse --verify refs/remotes/larger &&
75
- git-rev-parse --verify \
74
+ git rev-parse --verify refs/remotes/larger &&
75
+ git rev-parse --verify \
76
refs/remotes/larger-parent/trunk/thunk/bump/thud &&
77
- test \"\`git-merge-base \
77
+ test \"\`git merge-base \
78
refs/remotes/larger-parent/trunk/thunk/bump/thud \
79
refs/remotes/larger\`\" = \
80
- \"\`git-rev-parse refs/remotes/larger\`\"
80
+ \"\`git rev-parse refs/remotes/larger\`\"
81
true
82
"
83
t/t9107-git-svn-migrate.sh
+13
-13
@@ -19,9 +19,9 @@ test_expect_success 'setup old-looking metadata' "
19
mv $GIT_DIR/svn/* $GIT_DIR/ &&
20
mv $GIT_DIR/svn/.metadata $GIT_DIR/ &&
21
rmdir $GIT_DIR/svn &&
22
- git-update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&
23
- git-update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&
24
- git-update-ref -d refs/remotes/git-svn refs/remotes/git-svn
22
+ git update-ref refs/heads/git-svn-HEAD refs/remotes/git-svn &&
23
+ git update-ref refs/heads/svn-HEAD refs/remotes/git-svn &&
24
+ git update-ref -d refs/remotes/git-svn refs/remotes/git-svn
25
"
26
27
head=`git rev-parse --verify refs/heads/git-svn-HEAD^0`
@@ -33,8 +33,8 @@ test_expect_success 'initialize old-style (v0) git-svn layout' "
33
echo $svnrepo > $GIT_DIR/svn/info/url &&
34
git-svn migrate &&
35
! test -d $GIT_DIR/git-svn &&
36
- git-rev-parse --verify refs/remotes/git-svn^0 &&
37
- git-rev-parse --verify refs/remotes/svn^0 &&
36
+ git rev-parse --verify refs/remotes/git-svn^0 &&
37
+ git rev-parse --verify refs/remotes/svn^0 &&
38
test \`git config --get svn-remote.svn.url\` = '$svnrepo' &&
39
test \`git config --get svn-remote.svn.fetch\` = \
40
':refs/remotes/git-svn'
@@ -42,20 +42,20 @@ test_expect_success 'initialize old-style (v0) git-svn layout' "
42
43
test_expect_success 'initialize a multi-repository repo' "
44
git-svn init $svnrepo -T trunk -t tags -b branches &&
45
- git-config --get-all svn-remote.svn.fetch > fetch.out &&
45
+ git config --get-all svn-remote.svn.fetch > fetch.out &&
46
grep '^trunk:refs/remotes/trunk$' fetch.out &&
47
- test -n \"\`git-config --get svn-remote.svn.branches \
47
+ test -n \"\`git config --get svn-remote.svn.branches \
48
'^branches/\*:refs/remotes/\*$'\`\" &&
49
- test -n \"\`git-config --get svn-remote.svn.tags \
49
+ test -n \"\`git config --get svn-remote.svn.tags \
50
'^tags/\*:refs/remotes/tags/\*$'\`\" &&
51
git config --unset svn-remote.svn.branches \
52
'^branches/\*:refs/remotes/\*$' &&
53
git config --unset svn-remote.svn.tags \
54
'^tags/\*:refs/remotes/tags/\*$' &&
55
- git-config --add svn-remote.svn.fetch 'branches/a:refs/remotes/a' &&
56
- git-config --add svn-remote.svn.fetch 'branches/b:refs/remotes/b' &&
55
+ git config --add svn-remote.svn.fetch 'branches/a:refs/remotes/a' &&
56
+ git config --add svn-remote.svn.fetch 'branches/b:refs/remotes/b' &&
57
for i in tags/0.1 tags/0.2 tags/0.3; do
58
- git-config --add svn-remote.svn.fetch \
58
+ git config --add svn-remote.svn.fetch \
59
\$i:refs/remotes/\$i || exit 1; done
60
"
61
@@ -86,8 +86,8 @@ test_expect_success 'migrate --minimize on old inited layout' "
86
echo $svnrepo\$path > $GIT_DIR/svn/\$ref/info/url ) || exit 1;
87
done &&
88
git-svn migrate --minimize &&
89
- test -z \"\`git-config -l |grep -v '^svn-remote\.git-svn\.'\`\" &&
90
- git-config --get-all svn-remote.svn.fetch > fetch.out &&
89
+ test -z \"\`git config -l |grep -v '^svn-remote\.git-svn\.'\`\" &&
90
+ git config --get-all svn-remote.svn.fetch > fetch.out &&
91
grep '^trunk:refs/remotes/trunk$' fetch.out &&
92
grep '^branches/a:refs/remotes/a$' fetch.out &&
93
grep '^branches/b:refs/remotes/b$' fetch.out &&
t/t9110-git-svn-use-svm-props.sh
+10
-10
@@ -13,7 +13,7 @@ test_expect_success 'load svm repo' "
13
git-svn init --minimize-url -R argh -i dir $svnrepo/mirror/argh &&
14
git-svn init --minimize-url -R argh -i e \
15
$svnrepo/mirror/argh/a/b/c/d/e &&
16
- git-config svn.useSvmProps true &&
16
+ git config svn.useSvmProps true &&
17
git-svn fetch --all
18
"
19
@@ -21,31 +21,31 @@ uuid=161ce429-a9dd-4828-af4a-52023f968c89
21
22
bar_url=http://mayonaise/svnrepo/bar
23
test_expect_success 'verify metadata for /bar' "
24
- git-cat-file commit refs/remotes/bar | \
24
+ git cat-file commit refs/remotes/bar | \
25
grep '^git-svn-id: $bar_url@12 $uuid$' &&
26
- git-cat-file commit refs/remotes/bar~1 | \
26
+ git cat-file commit refs/remotes/bar~1 | \
27
grep '^git-svn-id: $bar_url@11 $uuid$' &&
28
- git-cat-file commit refs/remotes/bar~2 | \
28
+ git cat-file commit refs/remotes/bar~2 | \
29
grep '^git-svn-id: $bar_url@10 $uuid$' &&
30
- git-cat-file commit refs/remotes/bar~3 | \
30
+ git cat-file commit refs/remotes/bar~3 | \
31
grep '^git-svn-id: $bar_url@9 $uuid$' &&
32
- git-cat-file commit refs/remotes/bar~4 | \
32
+ git cat-file commit refs/remotes/bar~4 | \
33
grep '^git-svn-id: $bar_url@6 $uuid$' &&
34
- git-cat-file commit refs/remotes/bar~5 | \
34
+ git cat-file commit refs/remotes/bar~5 | \
35
grep '^git-svn-id: $bar_url@1 $uuid$'
36
"
37
38
e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
39
test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
40
- git-cat-file commit refs/remotes/e | \
40
+ git cat-file commit refs/remotes/e | \
41
grep '^git-svn-id: $e_url@1 $uuid$'
42
"
43
44
dir_url=http://mayonaise/svnrepo/dir
45
test_expect_success 'verify metadata for /dir' "
46
- git-cat-file commit refs/remotes/dir | \
46
+ git cat-file commit refs/remotes/dir | \
47
grep '^git-svn-id: $dir_url@2 $uuid$' &&
48
- git-cat-file commit refs/remotes/dir~1 | \
48
+ git cat-file commit refs/remotes/dir~1 | \
49
grep '^git-svn-id: $dir_url@1 $uuid$'
50
"
51
t/t9111-git-svn-use-svnsync-props.sh
+10
-10
@@ -12,7 +12,7 @@ test_expect_success 'load svnsync repo' "
12
git-svn init --minimize-url -R arr -i bar $svnrepo/bar &&
13
git-svn init --minimize-url -R argh -i dir $svnrepo/dir &&
14
git-svn init --minimize-url -R argh -i e $svnrepo/dir/a/b/c/d/e &&
15
- git-config svn.useSvnsyncProps true &&
15
+ git config svn.useSvnsyncProps true &&
16
git-svn fetch --all
17
"
18
@@ -20,31 +20,31 @@ uuid=161ce429-a9dd-4828-af4a-52023f968c89
20
21
bar_url=http://mayonaise/svnrepo/bar
22
test_expect_success 'verify metadata for /bar' "
23
- git-cat-file commit refs/remotes/bar | \
23
+ git cat-file commit refs/remotes/bar | \
24
grep '^git-svn-id: $bar_url@12 $uuid$' &&
25
- git-cat-file commit refs/remotes/bar~1 | \
25
+ git cat-file commit refs/remotes/bar~1 | \
26
grep '^git-svn-id: $bar_url@11 $uuid$' &&
27
- git-cat-file commit refs/remotes/bar~2 | \
27
+ git cat-file commit refs/remotes/bar~2 | \
28
grep '^git-svn-id: $bar_url@10 $uuid$' &&
29
- git-cat-file commit refs/remotes/bar~3 | \
29
+ git cat-file commit refs/remotes/bar~3 | \
30
grep '^git-svn-id: $bar_url@9 $uuid$' &&
31
- git-cat-file commit refs/remotes/bar~4 | \
31
+ git cat-file commit refs/remotes/bar~4 | \
32
grep '^git-svn-id: $bar_url@6 $uuid$' &&
33
- git-cat-file commit refs/remotes/bar~5 | \
33
+ git cat-file commit refs/remotes/bar~5 | \
34
grep '^git-svn-id: $bar_url@1 $uuid$'
35
"
36
37
e_url=http://mayonaise/svnrepo/dir/a/b/c/d/e
38
test_expect_success 'verify metadata for /dir/a/b/c/d/e' "
39
- git-cat-file commit refs/remotes/e | \
39
+ git cat-file commit refs/remotes/e | \
40
grep '^git-svn-id: $e_url@1 $uuid$'
41
"
42
43
dir_url=http://mayonaise/svnrepo/dir
44
test_expect_success 'verify metadata for /dir' "
45
- git-cat-file commit refs/remotes/dir | \
45
+ git cat-file commit refs/remotes/dir | \
46
grep '^git-svn-id: $dir_url@2 $uuid$' &&
47
- git-cat-file commit refs/remotes/dir~1 | \
47
+ git cat-file commit refs/remotes/dir~1 | \
48
grep '^git-svn-id: $dir_url@1 $uuid$'
49
"
50
t/t9300-fast-import.sh
+50
-50
@@ -60,10 +60,10 @@ INPUT_END
60
test_expect_success \
61
'A: create pack from stdin' \
62
'git-fast-import --export-marks=marks.out <input &&
63
- git-whatchanged master'
63
+ git whatchanged master'
64
test_expect_success \
65
'A: verify pack' \
66
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
66
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
67
68
cat >expect <<EOF
69
author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
@@ -73,7 +73,7 @@ initial
73
EOF
74
test_expect_success \
75
'A: verify commit' \
76
- 'git-cat-file commit master | sed 1d >actual &&
76
+ 'git cat-file commit master | sed 1d >actual &&
77
git diff expect actual'
78
79
cat >expect <<EOF
@@ -83,29 +83,29 @@ cat >expect <<EOF
83
EOF
84
test_expect_success \
85
'A: verify tree' \
86
- 'git-cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
86
+ 'git cat-file -p master^{tree} | sed "s/ [0-9a-f]* / /" >actual &&
87
git diff expect actual'
88
89
echo "$file2_data" >expect
90
test_expect_success \
91
'A: verify file2' \
92
- 'git-cat-file blob master:file2 >actual && git diff expect actual'
92
+ 'git cat-file blob master:file2 >actual && git diff expect actual'
93
94
echo "$file3_data" >expect
95
test_expect_success \
96
'A: verify file3' \
97
- 'git-cat-file blob master:file3 >actual && git diff expect actual'
97
+ 'git cat-file blob master:file3 >actual && git diff expect actual'
98
99
printf "$file4_data" >expect
100
test_expect_success \
101
'A: verify file4' \
102
- 'git-cat-file blob master:file4 >actual && git diff expect actual'
102
+ 'git cat-file blob master:file4 >actual && git diff expect actual'
103
104
cat >expect <<EOF
105
-:2 `git-rev-parse --verify master:file2`
106
-:3 `git-rev-parse --verify master:file3`
107
-:4 `git-rev-parse --verify master:file4`
108
-:5 `git-rev-parse --verify master^0`
105
+:2 `git rev-parse --verify master:file2`
106
+:3 `git rev-parse --verify master:file3`
107
+:4 `git rev-parse --verify master:file4`
108
+:5 `git rev-parse --verify master^0`
109
EOF
110
test_expect_success \
111
'A: verify marks output' \
@@ -134,19 +134,19 @@ INPUT_END
134
test_expect_success \
135
'A: verify marks import does not crash' \
136
'git-fast-import --import-marks=marks.out <input &&
137
- git-whatchanged verify--import-marks'
137
+ git whatchanged verify--import-marks'
138
test_expect_success \
139
'A: verify pack' \
140
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
140
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
141
cat >expect <<EOF
142
:000000 100755 0000000000000000000000000000000000000000 7123f7f44e39be127c5eb701e5968176ee9d78b1 A copy-of-file2
143
EOF
144
-git-diff-tree -M -r master verify--import-marks >actual
144
+git diff-tree -M -r master verify--import-marks >actual
145
test_expect_success \
146
'A: verify diff' \
147
'compare_diff_raw expect actual &&
148
- test `git-rev-parse --verify master:file2` \
149
- = `git-rev-parse --verify verify--import-marks:copy-of-file2`'
148
+ test `git rev-parse --verify master:file2` \
149
+ = `git rev-parse --verify verify--import-marks:copy-of-file2`'
150
151
###
152
### series B
@@ -175,7 +175,7 @@ rm -f .git/objects/pack_* .git/objects/index_*
175
###
176
177
newf=`echo hi newf | git-hash-object -w --stdin`
178
-oldf=`git-rev-parse --verify master:file2`
178
+oldf=`git rev-parse --verify master:file2`
179
test_tick
180
cat >input <<INPUT_END
181
commit refs/heads/branch
@@ -193,17 +193,17 @@ INPUT_END
193
test_expect_success \
194
'C: incremental import create pack from stdin' \
195
'git-fast-import <input &&
196
- git-whatchanged branch'
196
+ git whatchanged branch'
197
test_expect_success \
198
'C: verify pack' \
199
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
199
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
200
test_expect_success \
201
'C: validate reuse existing blob' \
202
- 'test $newf = `git-rev-parse --verify branch:file2/newf`
203
- test $oldf = `git-rev-parse --verify branch:file2/oldf`'
202
+ 'test $newf = `git rev-parse --verify branch:file2/newf`
203
+ test $oldf = `git rev-parse --verify branch:file2/oldf`'
204
205
cat >expect <<EOF
206
-parent `git-rev-parse --verify master^0`
206
+parent `git rev-parse --verify master^0`
207
author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
208
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
209
@@ -211,7 +211,7 @@ second
211
EOF
212
test_expect_success \
213
'C: verify commit' \
214
- 'git-cat-file commit branch | sed 1d >actual &&
214
+ 'git cat-file commit branch | sed 1d >actual &&
215
git diff expect actual'
216
217
cat >expect <<EOF
@@ -219,7 +219,7 @@ cat >expect <<EOF
219
:100644 100644 7123f7f44e39be127c5eb701e5968176ee9d78b1 7123f7f44e39be127c5eb701e5968176ee9d78b1 R100 file2 file2/oldf
220
:100644 000000 0d92e9f3374ae2947c23aa477cbc68ce598135f1 0000000000000000000000000000000000000000 D file3
221
EOF
222
-git-diff-tree -M -r master branch >actual
222
+git diff-tree -M -r master branch >actual
223
test_expect_success \
224
'C: validate rename result' \
225
'compare_diff_raw expect actual'
@@ -251,16 +251,16 @@ INPUT_END
251
test_expect_success \
252
'D: inline data in commit' \
253
'git-fast-import <input &&
254
- git-whatchanged branch'
254
+ git whatchanged branch'
255
test_expect_success \
256
'D: verify pack' \
257
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
257
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
258
259
cat >expect <<EOF
260
:000000 100755 0000000000000000000000000000000000000000 35a59026a33beac1569b1c7f66f3090ce9c09afc A newdir/exec.sh
261
:000000 100644 0000000000000000000000000000000000000000 046d0371e9220107917db0d0e030628de8a1de9b A newdir/interesting
262
EOF
263
-git-diff-tree -M -r branch^ branch >actual
263
+git diff-tree -M -r branch^ branch >actual
264
test_expect_success \
265
'D: validate new files added' \
266
'compare_diff_raw expect actual'
@@ -268,13 +268,13 @@ test_expect_success \
268
echo "$file5_data" >expect
269
test_expect_success \
270
'D: verify file5' \
271
- 'git-cat-file blob branch:newdir/interesting >actual &&
271
+ 'git cat-file blob branch:newdir/interesting >actual &&
272
git diff expect actual'
273
274
echo "$file6_data" >expect
275
test_expect_success \
276
'D: verify file6' \
277
- 'git-cat-file blob branch:newdir/exec.sh >actual &&
277
+ 'git cat-file blob branch:newdir/exec.sh >actual &&
278
git diff expect actual'
279
280
###
@@ -300,7 +300,7 @@ test_expect_success \
300
'git-fast-import --date-format=rfc2822 <input'
301
test_expect_success \
302
'E: verify pack' \
303
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
303
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
304
305
cat >expect <<EOF
306
author $GIT_AUTHOR_NAME <$GIT_AUTHOR_EMAIL> 1170778938 -0500
@@ -310,14 +310,14 @@ RFC 2822 type date
310
EOF
311
test_expect_success \
312
'E: verify commit' \
313
- 'git-cat-file commit branch | sed 1,2d >actual &&
313
+ 'git cat-file commit branch | sed 1,2d >actual &&
314
git diff expect actual'
315
316
###
317
### series F
318
###
319
320
-old_branch=`git-rev-parse --verify branch^0`
320
+old_branch=`git rev-parse --verify branch^0`
321
test_tick
322
cat >input <<INPUT_END
323
commit refs/heads/branch
@@ -339,7 +339,7 @@ test_expect_success \
339
echo BAD gfi did not fail
340
return 1
341
else
342
- if test $old_branch = `git-rev-parse --verify branch^0`
342
+ if test $old_branch = `git rev-parse --verify branch^0`
343
then
344
: branch unaffected and failure returned
345
return 0
@@ -351,11 +351,11 @@ test_expect_success \
351
'
352
test_expect_success \
353
'F: verify pack' \
354
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
354
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
355
356
cat >expect <<EOF
357
-tree `git-rev-parse branch~1^{tree}`
358
-parent `git-rev-parse branch~1`
357
+tree `git rev-parse branch~1^{tree}`
358
+parent `git rev-parse branch~1`
359
author $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
360
committer $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> $GIT_COMMITTER_DATE
361
@@ -363,14 +363,14 @@ losing things already?
363
EOF
364
test_expect_success \
365
'F: verify other commit' \
366
- 'git-cat-file commit other >actual &&
366
+ 'git cat-file commit other >actual &&
367
git diff expect actual'
368
369
###
370
### series G
371
###
372
373
-old_branch=`git-rev-parse --verify branch^0`
373
+old_branch=`git rev-parse --verify branch^0`
374
test_tick
375
cat >input <<INPUT_END
376
commit refs/heads/branch
@@ -387,11 +387,11 @@ test_expect_success \
387
'git-fast-import --force <input'
388
test_expect_success \
389
'G: verify pack' \
390
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
390
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
391
test_expect_success \
392
'G: branch changed, but logged' \
393
- 'test $old_branch != `git-rev-parse --verify branch^0` &&
394
- test $old_branch = `git-rev-parse --verify branch@{1}`'
393
+ 'test $old_branch != `git rev-parse --verify branch^0` &&
394
+ test $old_branch = `git rev-parse --verify branch@{1}`'
395
396
###
397
### series H
@@ -421,10 +421,10 @@ INPUT_END
421
test_expect_success \
422
'H: deletall, add 1' \
423
'git-fast-import <input &&
424
- git-whatchanged H'
424
+ git whatchanged H'
425
test_expect_success \
426
'H: verify pack' \
427
- 'for p in .git/objects/pack/*.pack;do git-verify-pack $p||exit;done'
427
+ 'for p in .git/objects/pack/*.pack;do git verify-pack $p||exit;done'
428
429
cat >expect <<EOF
430
:100755 000000 f1fb5da718392694d0076d677d6d0e364c79b0bc 0000000000000000000000000000000000000000 D file2/newf
@@ -433,7 +433,7 @@ cat >expect <<EOF
433
:100644 100644 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 fcf778cda181eaa1cbc9e9ce3a2e15ee9f9fe791 R100 newdir/interesting h/e/l/lo
434
:100755 000000 e74b7d465e52746be2b4bae983670711e6e66657 0000000000000000000000000000000000000000 D newdir/exec.sh
435
EOF
436
-git-diff-tree -M -r H^ H >actual
436
+git diff-tree -M -r H^ H >actual
437
test_expect_success \
438
'H: validate old files removed, new files added' \
439
'compare_diff_raw expect actual'
@@ -441,7 +441,7 @@ test_expect_success \
441
echo "$file5_data" >expect
442
test_expect_success \
443
'H: verify file' \
444
- 'git-cat-file blob H:h/e/l/lo >actual &&
444
+ 'git cat-file blob H:h/e/l/lo >actual &&
445
git diff expect actual'
446
447
###
@@ -463,7 +463,7 @@ test_expect_success \
463
'git-fast-import --export-pack-edges=edges.list <input'
464
465
cat >expect <<EOF
466
-.git/objects/pack/pack-.pack: `git-rev-parse --verify export-boundary`
466
+.git/objects/pack/pack-.pack: `git rev-parse --verify export-boundary`
467
EOF
468
test_expect_success \
469
'I: verify edge list' \
@@ -497,7 +497,7 @@ test_expect_success \
497
'git-fast-import <input'
498
test_expect_success \
499
'J: branch has 1 commit, empty tree' \
500
- 'test 1 = `git-rev-list J | wc -l` &&
500
+ 'test 1 = `git rev-list J | wc -l` &&
501
test 0 = `git ls-tree J | wc -l`'
502
503
###
@@ -527,8 +527,8 @@ test_expect_success \
527
'git-fast-import <input'
528
test_expect_success \
529
'K: verify K^1 = branch^1' \
530
- 'test `git-rev-parse --verify branch^1` \
531
- = `git-rev-parse --verify K^1`'
530
+ 'test `git rev-parse --verify branch^1` \
531
+ = `git rev-parse --verify K^1`'
532
533
###
534
### series L
@@ -577,7 +577,7 @@ EXPECT_END
577
test_expect_success \
578
'L: verify internal tree sorting' \
579
'git-fast-import <input &&
580
- git-diff --raw L^ L >output &&
580
+ git diff --raw L^ L >output &&
581
git diff expect output'
582
583
test_done