![]() ![]() gitmodules repeatedly seems like a suboptimal way Haven't checked if these are the only files that are testing this, butĮven if not, checking. To testing both a regular file diff and a submodule diff together. To play devil's advocate, there's a small integration test-style benefit That would be my preferredĪpproach, since it keeps the irrelevant details out of the test. + git diff-index -p -submodule=log HEAD - :!.gitmodules >actual &Īnd then we wouldn't have to adjust the diff. git diff-index -p -submodule=log HEAD >actual & Gitmodules_hash1=$(git rev-parse -short $(git hash-object. Submodule diffing behavior, so wouldn't it make sense to ignoreĮ.g. ![]() sm1 > Submodule sm1 0000000.$head1 (new submodule) > EOF > test_cmp expected actualīut in this file and the next (t4041 and t4060), we are checking gitmodules)) & > git diff-index -p -submodule=log HEAD >actual & > cat >expected + diff -git a/.gitmodules b/.gitmodules > + new file mode 100644 > + index 0000000.$gitmodules_hash1 > + - /dev/null > + +++ b/.gitmodules > -0,0 +1,3 > + + > + + path = sm1 > + + url =. sm1 & > + gitmodules_hash1=$(git rev-parse -short $(git hash-object. sub2 & > git commit -q -m "subprojects added" & > GIT_PRINT_SHA1_ELLIPSIS="yes" git diff-tree -abbrev=5 HEAD^ HEAD |cut -d" " -f-3,5- >current & > git branch save HEAD & > cat >expected + :000000 100644 00000. > diff -git a/t/t3040-subprojects-basic.sh b/t/t3040-subprojects-basic.sh > index 61da7e3b94.a0f14db3d2 100755 > - a/t/t3040-subprojects-basic.sh > +++ b/t/t3040-subprojects-basic.sh > -19,11 +19,12 test_expect_success 'setup: create subprojects' ' > ( cd sub2 & git init & : >Makefile & git add * & > git commit -q -m "subproject 2" ) & > git update-index -add sub1 & > - git add sub2 & > + git submodule add. gitmodules file.Īdjusting the diff makes sense when the. Specifically, in this commit we update > test cases where expected diffs must change due to the presence of a >. > This commit continues the previous work of updating the test suite to > use `git submodule add` to create submodules instead of using `git add` > to include embedded repositories. Subject: tests: use `git submodule add` and fix expected diffsĬontent-Type: text/plain charset="UTF-8" JzQgPosDVk/Mmr3MDyWgrgRwnoEKgyKijOkm3fo5T4MQyrtVh0lNQIggJS9dQzzZ+Hw=ĪK7set9YigkXZWn+Ylv2PtMSHn6MPdQscJKwMMVWIm0JimNVKRs0J9pxiFf2SW+A/lkxu0baJ+pLcP3cL5YjYjg= OSj7BJW5fVZ25coha37TKMiwCKa8sQ/lfgAdASaycR9yrHk1elbCVH5ngdnmn1uSOQeRQWKj2ii X-Gm-Message-State: AO0yUKUbGpNXhpltcuKqdcImUHXuKmbp0YZHND8dwdEBF0PhcaZACGX1 LEisHnNXx8CNSwnqHSUFX18+pNFQk+N1z80+MKwNMt9pr3Naynj1ABkIiT0MiG/xv9/n YkuDcwAawB2dEm0Yy7xj/Yx0JhLfKrTkl9xqIuUftR2+6GjQnAPFhl6gv/EViBe/b2pI Q6a6Kg1n/Bu5kmARj7jRNHhILPNQoaW0KriJe6WBCM1V+uJgO5uYGBlyjLrJCINsJWsG :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to ī=lOFqflep+0dZ5ALc8zwgrp5iqJyMweFU+RTMVnr1xTIUKRIxr4kNPcyMfD4TlDX3tLī6p1WRzjzGDDnjFU8Ym1TfDr7XGtF66yvhoKr1x2qju14NbjjruJQjOzcik81iQHk91j X-Google-DKIM-Signature: v=1 a=rsa-sha256 c=relaxed/relaxed TzO+VTraYpJGlwYmIz5GNzCaBke0P9LmONRRKGh491PAKaIhV4iVRE+2D7KkY/WMs9aB XIuBuu6no/qWN/XMvW圓58+tPvbViuuxSoJwRCTX61qZz6jl+UbsCIn4Vo/aqg9Rmw09 N2lJ/SIGfCKKIp0pugxnHRh/Ow539b12VQsMpMK8G3ihWui8NinUDZPhoCugR3WRSbn3ĦIfyyRspb/rJ4xlE8XJWupGJuR6rPCIn/hkT0dGikSizpEXpi8dCCFHwKXL/dkVCQh2V :date:from:to:cc:subject:date:message-id:reply-to īh=szMBxcd2fJhk+Yu9QkKAojMWq8dbuky/TvC4i1sj5us= ī=fVuvPq6qv38Eb0m4645bFUPcXdNu49UFrJBeIUqaByW03TbQPSfGtcstYTyfTf0CKy ![]() H=cc:to:from:subject:message-id:references:mime-version:in-reply-to Received: from (īy (Postfix) with ESMTPS id B991D30193 Received: from ( )īy (Postfix) with ESMTP id A1343C64ED6 X-Spam-Checker-Version: SpamAssassin 3.4.0 () onĪ ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |