t3200 (branch): modernize style
Style is inconsistent throughout the file. Make the following changes: 1. Indent everything with tabs. 2. Put the opening quote (') for the test in the same line as test_expect_success, and the closing quote on a line by itself. 3. Do not add extra space between redirection operator and filename, i.e. "cmd >dst", not "cmd > dst". Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ramkumar Ramachandra committed
Mar 20, 2013 at 18:00 UTC
0d158ebb92c1302d987304fa7b717ba4d72aecdf
1 file changed
+244
-233
t/t3200-branch.sh
+244
-233
@@ -7,20 +7,18 @@ test_description='git branch assorted tests'
7
8
. ./test-lib.sh
9
10
-test_expect_success \
11
- 'prepare a trivial repository' \
12
- 'echo Hello > A &&
13
- git update-index --add A &&
14
- git commit -m "Initial commit." &&
15
- echo World >> A &&
16
- git update-index --add A &&
17
- git commit -m "Second commit." &&
18
- HEAD=$(git rev-parse --verify HEAD)'
19
-
20
-test_expect_success \
21
- 'git branch --help should not have created a bogus branch' '
22
- test_might_fail git branch --help </dev/null >/dev/null 2>/dev/null &&
23
- test_path_is_missing .git/refs/heads/--help
10
+test_expect_success 'prepare a trivial repository' '
11
+ echo Hello >A &&
12
+ git update-index --add A &&
13
+ git commit -m "Initial commit." &&
14
+ echo World >>A &&
15
+ git update-index --add A &&
16
+ git commit -m "Second commit." &&
17
+ HEAD=$(git rev-parse --verify HEAD)'
18
+
19
+test_expect_success 'git branch --help should not have created a bogus branch' '
20
+ test_might_fail git branch --help </dev/null >/dev/null 2>/dev/null &&
21
+ test_path_is_missing .git/refs/heads/--help
22
'
23
24
test_expect_success 'branch -h in broken repository' '
@@ -34,63 +32,63 @@ test_expect_success 'branch -h in broken repository' '
32
test_i18ngrep "[Uu]sage" broken/usage
33
'
34
37
-test_expect_success \
38
- 'git branch abc should create a branch' \
39
- 'git branch abc && test_path_is_file .git/refs/heads/abc'
35
+test_expect_success 'git branch abc should create a branch' '
36
+ git branch abc && test_path_is_file .git/refs/heads/abc
37
+'
38
41
-test_expect_success \
42
- 'git branch a/b/c should create a branch' \
43
- 'git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c'
39
+test_expect_success 'git branch a/b/c should create a branch' '
40
+ git branch a/b/c && test_path_is_file .git/refs/heads/a/b/c
41
+'
42
43
cat >expect <<EOF
44
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
45
EOF
48
-test_expect_success \
49
- 'git branch -l d/e/f should create a branch and a log' \
50
- 'GIT_COMMITTER_DATE="2005-05-26 23:30" \
51
- git branch -l d/e/f &&
52
- test_path_is_file .git/refs/heads/d/e/f &&
53
- test_path_is_file .git/logs/refs/heads/d/e/f &&
54
- test_cmp expect .git/logs/refs/heads/d/e/f'
55
-
56
-test_expect_success \
57
- 'git branch -d d/e/f should delete a branch and a log' \
58
- 'git branch -d d/e/f &&
59
- test_path_is_missing .git/refs/heads/d/e/f &&
60
- test_path_is_missing .git/logs/refs/heads/d/e/f'
61
-
62
-test_expect_success \
63
- 'git branch j/k should work after branch j has been deleted' \
64
- 'git branch j &&
65
- git branch -d j &&
66
- git branch j/k'
67
-
68
-test_expect_success \
69
- 'git branch l should work after branch l/m has been deleted' \
70
- 'git branch l/m &&
71
- git branch -d l/m &&
72
- git branch l'
73
-
74
-test_expect_success \
75
- 'git branch -m dumps usage' \
76
- 'test_expect_code 128 git branch -m 2>err &&
77
- test_i18ngrep "too many branches for a rename operation" err'
78
-
79
-test_expect_success \
80
- 'git branch -m m m/m should work' \
81
- 'git branch -l m &&
82
- git branch -m m m/m &&
83
- test_path_is_file .git/logs/refs/heads/m/m'
84
-
85
-test_expect_success \
86
- 'git branch -m n/n n should work' \
87
- 'git branch -l n/n &&
46
+test_expect_success 'git branch -l d/e/f should create a branch and a log' '
47
+ GIT_COMMITTER_DATE="2005-05-26 23:30" \
48
+ git branch -l d/e/f &&
49
+ test_path_is_file .git/refs/heads/d/e/f &&
50
+ test_path_is_file .git/logs/refs/heads/d/e/f &&
51
+ test_cmp expect .git/logs/refs/heads/d/e/f
52
+'
53
+
54
+test_expect_success 'git branch -d d/e/f should delete a branch and a log' '
55
+ git branch -d d/e/f &&
56
+ test_path_is_missing .git/refs/heads/d/e/f &&
57
+ test_path_is_missing .git/logs/refs/heads/d/e/f
58
+'
59
+
60
+test_expect_success 'git branch j/k should work after branch j has been deleted' '
61
+ git branch j &&
62
+ git branch -d j &&
63
+ git branch j/k
64
+'
65
+
66
+test_expect_success 'git branch l should work after branch l/m has been deleted' '
67
+ git branch l/m &&
68
+ git branch -d l/m &&
69
+ git branch l
70
+'
71
+
72
+test_expect_success 'git branch -m dumps usage' '
73
+ test_expect_code 128 git branch -m 2>err &&
74
+ test_i18ngrep "too many branches for a rename operation" err
75
+'
76
+
77
+test_expect_success 'git branch -m m m/m should work' '
78
+ git branch -l m &&
79
+ git branch -m m m/m &&
80
+ test_path_is_file .git/logs/refs/heads/m/m
81
+'
82
+
83
+test_expect_success 'git branch -m n/n n should work' '
84
+ git branch -l n/n &&
85
git branch -m n/n n &&
89
- test_path_is_file .git/logs/refs/heads/n'
86
+ test_path_is_file .git/logs/refs/heads/n
87
+'
88
89
test_expect_success 'git branch -m o/o o should fail when o/p exists' '
90
git branch o/o &&
93
- git branch o/p &&
91
+ git branch o/p &&
92
test_must_fail git branch -m o/o o
93
'
94
@@ -248,19 +246,20 @@ mv .git/config-saved .git/config
246
247
git config branch.s/s.dummy Hello
248
251
-test_expect_success \
252
- 'git branch -m s/s s should work when s/t is deleted' \
253
- 'git branch -l s/s &&
249
+test_expect_success 'git branch -m s/s s should work when s/t is deleted' '
250
+ git branch -l s/s &&
251
test_path_is_file .git/logs/refs/heads/s/s &&
255
- git branch -l s/t &&
252
+ git branch -l s/t &&
253
test_path_is_file .git/logs/refs/heads/s/t &&
257
- git branch -d s/t &&
258
- git branch -m s/s s &&
259
- test_path_is_file .git/logs/refs/heads/s'
254
+ git branch -d s/t &&
255
+ git branch -m s/s s &&
256
+ test_path_is_file .git/logs/refs/heads/s
257
+'
258
261
-test_expect_success 'config information was renamed, too' \
262
- "test $(git config branch.s.dummy) = Hello &&
263
- test_must_fail git config branch.s/s/dummy"
259
+test_expect_success 'config information was renamed, too' '
260
+ test $(git config branch.s.dummy) = Hello &&
261
+ test_must_fail git config branch.s/s/dummy
262
+'
263
264
test_expect_success 'deleting a symref' '
265
git branch target &&
@@ -281,8 +280,7 @@ test_expect_success 'deleting a dangling symref' '
280
test_i18ncmp expect actual
281
'
282
284
-test_expect_success 'renaming a symref is not allowed' \
285
-'
283
+test_expect_success 'renaming a symref is not allowed' '
284
git symbolic-ref refs/heads/master2 refs/heads/master &&
285
test_must_fail git branch -m master2 master3 &&
286
git symbolic-ref refs/heads/master2 &&
@@ -290,146 +288,159 @@ test_expect_success 'renaming a symref is not allowed' \
288
test_path_is_missing .git/refs/heads/master3
289
'
290
293
-test_expect_success SYMLINKS \
294
- 'git branch -m u v should fail when the reflog for u is a symlink' '
295
- git branch -l u &&
296
- mv .git/logs/refs/heads/u real-u &&
297
- ln -s real-u .git/logs/refs/heads/u &&
298
- test_must_fail git branch -m u v
299
-'
300
-
301
-test_expect_success 'test tracking setup via --track' \
302
- 'git config remote.local.url . &&
303
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
304
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
305
- git branch --track my1 local/master &&
306
- test $(git config branch.my1.remote) = local &&
307
- test $(git config branch.my1.merge) = refs/heads/master'
308
-
309
-test_expect_success 'test tracking setup (non-wildcard, matching)' \
310
- 'git config remote.local.url . &&
311
- git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
312
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
313
- git branch --track my4 local/master &&
314
- test $(git config branch.my4.remote) = local &&
315
- test $(git config branch.my4.merge) = refs/heads/master'
316
-
317
-test_expect_success 'test tracking setup (non-wildcard, not matching)' \
318
- 'git config remote.local.url . &&
319
- git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
320
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
321
- git branch --track my5 local/master &&
322
- ! test "$(git config branch.my5.remote)" = local &&
323
- ! test "$(git config branch.my5.merge)" = refs/heads/master'
324
-
325
-test_expect_success 'test tracking setup via config' \
326
- 'git config branch.autosetupmerge true &&
327
- git config remote.local.url . &&
328
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
329
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
330
- git branch my3 local/master &&
331
- test $(git config branch.my3.remote) = local &&
332
- test $(git config branch.my3.merge) = refs/heads/master'
333
-
334
-test_expect_success 'test overriding tracking setup via --no-track' \
335
- 'git config branch.autosetupmerge true &&
336
- git config remote.local.url . &&
337
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
338
- (git show-ref -q refs/remotes/local/master || git fetch local) &&
339
- git branch --no-track my2 local/master &&
340
- git config branch.autosetupmerge false &&
341
- ! test "$(git config branch.my2.remote)" = local &&
342
- ! test "$(git config branch.my2.merge)" = refs/heads/master'
343
-
344
-test_expect_success 'no tracking without .fetch entries' \
345
- 'git config branch.autosetupmerge true &&
346
- git branch my6 s &&
347
- git config branch.automsetupmerge false &&
348
- test -z "$(git config branch.my6.remote)" &&
349
- test -z "$(git config branch.my6.merge)"'
350
-
351
-test_expect_success 'test tracking setup via --track but deeper' \
352
- 'git config remote.local.url . &&
353
- git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
354
- (git show-ref -q refs/remotes/local/o/o || git fetch local) &&
355
- git branch --track my7 local/o/o &&
356
- test "$(git config branch.my7.remote)" = local &&
357
- test "$(git config branch.my7.merge)" = refs/heads/o/o'
358
-
359
-test_expect_success 'test deleting branch deletes branch config' \
360
- 'git branch -d my7 &&
361
- test -z "$(git config branch.my7.remote)" &&
362
- test -z "$(git config branch.my7.merge)"'
363
-
364
-test_expect_success 'test deleting branch without config' \
365
- 'git branch my7 s &&
366
- sha1=$(git rev-parse my7 | cut -c 1-7) &&
367
- echo "Deleted branch my7 (was $sha1)." >expect &&
368
- git branch -d my7 >actual 2>&1 &&
369
- test_i18ncmp expect actual'
370
-
371
-test_expect_success 'test --track without .fetch entries' \
372
- 'git branch --track my8 &&
373
- test "$(git config branch.my8.remote)" &&
374
- test "$(git config branch.my8.merge)"'
375
-
376
-test_expect_success \
377
- 'branch from non-branch HEAD w/autosetupmerge=always' \
378
- 'git config branch.autosetupmerge always &&
379
- git branch my9 HEAD^ &&
380
- git config branch.autosetupmerge false'
381
-
382
-test_expect_success \
383
- 'branch from non-branch HEAD w/--track causes failure' \
384
- 'test_must_fail git branch --track my10 HEAD^'
385
-
386
-test_expect_success \
387
- 'branch from tag w/--track causes failure' \
388
- 'git tag foobar &&
389
- test_must_fail git branch --track my11 foobar'
390
-
391
-test_expect_success 'use --set-upstream-to modify HEAD' \
392
- 'test_config branch.master.remote foo &&
393
- test_config branch.master.merge foo &&
394
- git branch my12
395
- git branch --set-upstream-to my12 &&
396
- test "$(git config branch.master.remote)" = "." &&
397
- test "$(git config branch.master.merge)" = "refs/heads/my12"'
398
-
399
-test_expect_success 'use --set-upstream-to modify a particular branch' \
400
- 'git branch my13
401
- git branch --set-upstream-to master my13 &&
402
- test "$(git config branch.my13.remote)" = "." &&
403
- test "$(git config branch.my13.merge)" = "refs/heads/master"'
404
-
405
-test_expect_success '--unset-upstream should fail if given a non-existent branch' \
406
- 'test_must_fail git branch --unset-upstream i-dont-exist'
407
-
408
-test_expect_success 'test --unset-upstream on HEAD' \
409
- 'git branch my14
410
- test_config branch.master.remote foo &&
411
- test_config branch.master.merge foo &&
412
- git branch --set-upstream-to my14 &&
413
- git branch --unset-upstream &&
414
- test_must_fail git config branch.master.remote &&
415
- test_must_fail git config branch.master.merge &&
416
- # fail for a branch without upstream set
417
- test_must_fail git branch --unset-upstream
418
-'
419
-
420
-test_expect_success 'test --unset-upstream on a particular branch' \
421
- 'git branch my15
422
- git branch --set-upstream-to master my14 &&
423
- git branch --unset-upstream my14 &&
424
- test_must_fail git config branch.my14.remote &&
425
- test_must_fail git config branch.my14.merge'
426
-
427
-test_expect_success '--set-upstream shows message when creating a new branch that exists as remote-tracking' \
428
- 'git update-ref refs/remotes/origin/master HEAD &&
429
- git branch --set-upstream origin/master 2>actual &&
430
- test_when_finished git update-ref -d refs/remotes/origin/master &&
431
- test_when_finished git branch -d origin/master &&
432
- cat >expected <<EOF &&
291
+test_expect_success SYMLINKS 'git branch -m u v should fail when the reflog for u is a symlink' '
292
+ git branch -l u &&
293
+ mv .git/logs/refs/heads/u real-u &&
294
+ ln -s real-u .git/logs/refs/heads/u &&
295
+ test_must_fail git branch -m u v
296
+'
297
+
298
+test_expect_success 'test tracking setup via --track' '
299
+ git config remote.local.url . &&
300
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
301
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
302
+ git branch --track my1 local/master &&
303
+ test $(git config branch.my1.remote) = local &&
304
+ test $(git config branch.my1.merge) = refs/heads/master
305
+'
306
+
307
+test_expect_success 'test tracking setup (non-wildcard, matching)' '
308
+ git config remote.local.url . &&
309
+ git config remote.local.fetch refs/heads/master:refs/remotes/local/master &&
310
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
311
+ git branch --track my4 local/master &&
312
+ test $(git config branch.my4.remote) = local &&
313
+ test $(git config branch.my4.merge) = refs/heads/master
314
+'
315
+
316
+test_expect_success 'test tracking setup (non-wildcard, not matching)' '
317
+ git config remote.local.url . &&
318
+ git config remote.local.fetch refs/heads/s:refs/remotes/local/s &&
319
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
320
+ git branch --track my5 local/master &&
321
+ ! test "$(git config branch.my5.remote)" = local &&
322
+ ! test "$(git config branch.my5.merge)" = refs/heads/master
323
+'
324
+
325
+test_expect_success 'test tracking setup via config' '
326
+ git config branch.autosetupmerge true &&
327
+ git config remote.local.url . &&
328
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
329
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
330
+ git branch my3 local/master &&
331
+ test $(git config branch.my3.remote) = local &&
332
+ test $(git config branch.my3.merge) = refs/heads/master
333
+'
334
+
335
+test_expect_success 'test overriding tracking setup via --no-track' '
336
+ git config branch.autosetupmerge true &&
337
+ git config remote.local.url . &&
338
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
339
+ (git show-ref -q refs/remotes/local/master || git fetch local) &&
340
+ git branch --no-track my2 local/master &&
341
+ git config branch.autosetupmerge false &&
342
+ ! test "$(git config branch.my2.remote)" = local &&
343
+ ! test "$(git config branch.my2.merge)" = refs/heads/master
344
+'
345
+
346
+test_expect_success 'no tracking without .fetch entries' '
347
+ git config branch.autosetupmerge true &&
348
+ git branch my6 s &&
349
+ git config branch.automsetupmerge false &&
350
+ test -z "$(git config branch.my6.remote)" &&
351
+ test -z "$(git config branch.my6.merge)"
352
+'
353
+
354
+test_expect_success 'test tracking setup via --track but deeper' '
355
+ git config remote.local.url . &&
356
+ git config remote.local.fetch refs/heads/*:refs/remotes/local/* &&
357
+ (git show-ref -q refs/remotes/local/o/o || git fetch local) &&
358
+ git branch --track my7 local/o/o &&
359
+ test "$(git config branch.my7.remote)" = local &&
360
+ test "$(git config branch.my7.merge)" = refs/heads/o/o
361
+'
362
+
363
+test_expect_success 'test deleting branch deletes branch config' '
364
+ git branch -d my7 &&
365
+ test -z "$(git config branch.my7.remote)" &&
366
+ test -z "$(git config branch.my7.merge)"
367
+'
368
+
369
+test_expect_success 'test deleting branch without config' '
370
+ git branch my7 s &&
371
+ sha1=$(git rev-parse my7 | cut -c 1-7) &&
372
+ echo "Deleted branch my7 (was $sha1)." >expect &&
373
+ git branch -d my7 >actual 2>&1 &&
374
+ test_i18ncmp expect actual
375
+'
376
+
377
+test_expect_success 'test --track without .fetch entries' '
378
+ git branch --track my8 &&
379
+ test "$(git config branch.my8.remote)" &&
380
+ test "$(git config branch.my8.merge)"
381
+'
382
+
383
+test_expect_success 'branch from non-branch HEAD w/autosetupmerge=always' '
384
+ git config branch.autosetupmerge always &&
385
+ git branch my9 HEAD^ &&
386
+ git config branch.autosetupmerge false
387
+'
388
+
389
+test_expect_success 'branch from non-branch HEAD w/--track causes failure' '
390
+ test_must_fail git branch --track my10 HEAD^
391
+'
392
+
393
+test_expect_success 'branch from tag w/--track causes failure' '
394
+ git tag foobar &&
395
+ test_must_fail git branch --track my11 foobar
396
+'
397
+
398
+test_expect_success 'use --set-upstream-to modify HEAD' '
399
+ test_config branch.master.remote foo &&
400
+ test_config branch.master.merge foo &&
401
+ git branch my12
402
+ git branch --set-upstream-to my12 &&
403
+ test "$(git config branch.master.remote)" = "." &&
404
+ test "$(git config branch.master.merge)" = "refs/heads/my12"
405
+'
406
+
407
+test_expect_success 'use --set-upstream-to modify a particular branch' '
408
+ git branch my13
409
+ git branch --set-upstream-to master my13 &&
410
+ test "$(git config branch.my13.remote)" = "." &&
411
+ test "$(git config branch.my13.merge)" = "refs/heads/master"
412
+'
413
+
414
+test_expect_success '--unset-upstream should fail if given a non-existent branch' '
415
+ test_must_fail git branch --unset-upstream i-dont-exist
416
+'
417
+
418
+test_expect_success 'test --unset-upstream on HEAD' '
419
+ git branch my14
420
+ test_config branch.master.remote foo &&
421
+ test_config branch.master.merge foo &&
422
+ git branch --set-upstream-to my14 &&
423
+ git branch --unset-upstream &&
424
+ test_must_fail git config branch.master.remote &&
425
+ test_must_fail git config branch.master.merge &&
426
+ # fail for a branch without upstream set
427
+ test_must_fail git branch --unset-upstream
428
+'
429
+
430
+test_expect_success 'test --unset-upstream on a particular branch' '
431
+ git branch my15
432
+ git branch --set-upstream-to master my14 &&
433
+ git branch --unset-upstream my14 &&
434
+ test_must_fail git config branch.my14.remote &&
435
+ test_must_fail git config branch.my14.merge
436
+'
437
+
438
+test_expect_success '--set-upstream shows message when creating a new branch that exists as remote-tracking' '
439
+ git update-ref refs/remotes/origin/master HEAD &&
440
+ git branch --set-upstream origin/master 2>actual &&
441
+ test_when_finished git update-ref -d refs/remotes/origin/master &&
442
+ test_when_finished git branch -d origin/master &&
443
+ cat >expected <<EOF &&
444
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
445
446
If you wanted to make '"'master'"' track '"'origin/master'"', do this:
@@ -437,38 +448,38 @@ If you wanted to make '"'master'"' track '"'origin/master'"', do this:
448
git branch -d origin/master
449
git branch --set-upstream-to origin/master
450
EOF
440
- test_cmp expected actual
451
+ test_cmp expected actual
452
'
453
443
-test_expect_success '--set-upstream with two args only shows the deprecation message' \
444
- 'git branch --set-upstream master my13 2>actual &&
445
- test_when_finished git branch --unset-upstream master &&
446
- cat >expected <<EOF &&
454
+test_expect_success '--set-upstream with two args only shows the deprecation message' '
455
+ git branch --set-upstream master my13 2>actual &&
456
+ test_when_finished git branch --unset-upstream master &&
457
+ cat >expected <<EOF &&
458
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
459
EOF
449
- test_cmp expected actual
460
+ test_cmp expected actual
461
'
462
452
-test_expect_success '--set-upstream with one arg only shows the deprecation message if the branch existed' \
453
- 'git branch --set-upstream my13 2>actual &&
454
- test_when_finished git branch --unset-upstream my13 &&
455
- cat >expected <<EOF &&
463
+test_expect_success '--set-upstream with one arg only shows the deprecation message if the branch existed' '
464
+ git branch --set-upstream my13 2>actual &&
465
+ test_when_finished git branch --unset-upstream my13 &&
466
+ cat >expected <<EOF &&
467
The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to
468
EOF
458
- test_cmp expected actual
469
+ test_cmp expected actual
470
'
471
472
# Keep this test last, as it changes the current branch
473
cat >expect <<EOF
474
$_z40 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master
475
EOF
465
-test_expect_success \
466
- 'git checkout -b g/h/i -l should create a branch and a log' \
467
- 'GIT_COMMITTER_DATE="2005-05-26 23:30" \
468
- git checkout -b g/h/i -l master &&
469
- test_path_is_file .git/refs/heads/g/h/i &&
470
- test_path_is_file .git/logs/refs/heads/g/h/i &&
471
- test_cmp expect .git/logs/refs/heads/g/h/i'
476
+test_expect_success 'git checkout -b g/h/i -l should create a branch and a log' '
477
+ GIT_COMMITTER_DATE="2005-05-26 23:30" \
478
+ git checkout -b g/h/i -l master &&
479
+ test_path_is_file .git/refs/heads/g/h/i &&
480
+ test_path_is_file .git/logs/refs/heads/g/h/i &&
481
+ test_cmp expect .git/logs/refs/heads/g/h/i
482
+'
483
484
test_expect_success 'checkout -b makes reflog by default' '
485
git checkout master &&
@@ -739,7 +750,7 @@ test_expect_success 'detect misconfigured autosetuprebase (bad value)' '
750
751
test_expect_success 'detect misconfigured autosetuprebase (no value)' '
752
git config --unset branch.autosetuprebase &&
742
- echo "[branch] autosetuprebase" >> .git/config &&
753
+ echo "[branch] autosetuprebase" >>.git/config &&
754
test_must_fail git branch &&
755
git config --unset branch.autosetuprebase
756
'