anchor.diff:            'subdir', [d.libPubspec('sub1', '1.0.0'), d.libDir('sub1', '1.0.0')])
       ]);
       await repo.create();
  -    var revision = await repo.revParse('HEAD');
  +    var oldRevision = await repo.revParse('HEAD');
   
       deleteEntry(p.join(d.sandbox, 'foo.git', 'subdir'));
   
  
positive.code:       d.dir(
            'subdir', [d.libPubspec('sub2', '1.0.0'), d.libDir('sub2', '1.0.0')])
      ]).commit();
  
      await d.appDir({
        "sub1": {
          "git": {"url": "../foo.git", "path": "subdir", "ref": revision}
        },
        "sub2": {
          "git": {"url": "../foo.git", "path": "subdir"}
  
negative.code:     await d.dir(cachePath, [
        d.dir('git', [
          d.dir('cache', [d.gitPackageRepoCacheDir('foo')]),
          d.dir('foo-$oldRevision', [
            d.dir('subdir', [d.libDir('sub1', '1.0.0')])
          ]),
          d.dir('foo-$newRevision', [
            d.dir('subdir', [d.libDir('sub2', '1.0.0')])
          ])
        ])
      ]).validate();
  
      await d.appPackagesFile({
        'sub1': pathInCache('git/foo-$oldRevision/subdir'),
        'sub2': pathInCache('git/foo-$newRevision/subdir')
      }).validate();
    });
  }
  