#!/bin/sh # # Copyright (c) 2007 Johannes E. Schindelin # global test_description := ''git rev-list involving submodules that this repo has'' source ./test-lib.sh test_expect_success 'setup' ' : > file && git add file && test_tick && git commit -m initial && echo 1 > file && test_tick && git commit -m second file && echo 2 > file && test_tick && git commit -m third file && rm .git/index && : > super-file && git add super-file && git submodule add "$(pwd)" sub && git symbolic-ref HEAD refs/heads/super && test_tick && git commit -m super-initial && echo 1 > super-file && test_tick && git commit -m super-first super-file && echo 2 > super-file && test_tick && git commit -m super-second super-file ' test_expect_success "Ilari's test" ' git rev-list --objects super master ^super^ ' test_done (CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"git rev-list involving submodules that this repo has">)} spids: [13] ) ] spids: [13] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ )} { (SQ <"\n"> <"\t: > file &&\n"> <"\tgit add file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m initial &&\n"> <"\techo 1 > file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m second file &&\n"> <"\techo 2 > file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m third file &&\n"> <"\n"> <"\trm .git/index &&\n"> <"\n"> <"\t: > super-file &&\n"> <"\tgit add super-file &&\n"> <"\tgit submodule add \"$(pwd)\" sub &&\n"> <"\tgit symbolic-ref HEAD refs/heads/super &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m super-initial &&\n"> <"\techo 1 > super-file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m super-first super-file &&\n"> <"\techo 2 > super-file &&\n"> <"\ttest_tick &&\n"> <"\tgit commit -m super-second super-file\n"> ) } ) (C {(test_expect_success)} {(DQ ("Ilari's test"))} {(SQ <"\n"> <"\tgit rev-list --objects super master ^super^\n">)} ) (C {(test_done)}) ] )