anchor.diff:  
     final gitDir = new GitDir(workingDir);
   
  +  List<String> gitArgs;
  +  String sourceDirTreeSha;
  +
     return gitDir.lsTree(sourceBranch, subTreesOnly: true, path: sourceDir)
         .then((List<TreeEntry> entries) {
           assert(entries.length <= 1);
           if(entries.isEmpty) {
             throw 'Could not find a matching dir on the provided branch';
           }
  -        return _fromSourceDirTree(ctx, entries.single, targetBranch, sourceDir, sourceBranch, gitDir);
  -      });
  -}
   
  -Future<bool> _fromSourceDirTree(TaskContext ctx, TreeEntry tree,
  -    String targetBranch, String sourceDir, String sourceBranch, GitDir gitDir) {
  -  final sha = tree.sha;
  +        final tree = entries.single;
   
  -  final gitArgs = new List<String>.from(['commit-tree', sha]);
  +        sourceDirTreeSha = tree.sha;
   
  -  return gitDir.getBranchReference(targetBranch)
  +        gitArgs = ['commit-tree', sourceDirTreeSha];
  +
  +        return gitDir.getBranchReference(targetBranch);
  +      })
         .then((BranchReference branchRef) {
   
           if(branchRef == null) {
             // branch does not exist. New branch!
  -          return _goCommit(ctx, 'created', gitArgs, sourceBranch,
  -              sourceDir, targetBranch, gitDir);
  +          return _doCommit(ctx, 'created', gitArgs, sourceBranch, sourceDir,
  +              targetBranch, gitDir);
           } else {
  -          // existing branch
  -          return _withExistingBranch(ctx, branchRef, sha, sourceDir, gitArgs,
  -              sourceBranch, targetBranch, gitDir);
  +          // existing branch, need to find the tree info so we can create
  +          // a valid commit w/ the right parent
  +          return _withExistingBranch(ctx, branchRef, sourceDirTreeSha, sourceDir,
  +              gitArgs, sourceBranch, targetBranch, gitDir);
           }
         });
   }
  
positive.code:         final newCommitSha = pr.stdout.trim();
          ctx.info('Create new commit: $newCommitSha');
  
          return gitDir.runCommand(['update-ref', branchNameRef, newCommitSha]);
        })
        .then((ProcessResult pr) {
  
negative.code: Future<bool> _withExistingBranch(TaskContext ctx, BranchReference targetBranchRef, String dirSha,
      String sourceDir, List<String> gitArgs, String sourceBranch, String targetBranch, GitDir gitDir) {
  
    return gitDir.getCommit(targetBranchRef.sha)
        .then((Commit commitObj) {
          if(commitObj.treeSha == dirSha) {
            ctx.fine('There have been no changes to "$sourceDir" since the last commit');
            return new Future.immediate(true);
          } else {
            gitArgs.addAll(['-p', targetBranchRef.sha]);
            return _doCommit(ctx, 'updated', gitArgs, sourceBranch, sourceDir,
                targetBranch, gitDir);
          }
        });
  }
  
  Future<bool> _doCommit(TaskContext ctx, String verb, List<String> gitArgs,
      String sourceBranch, String sourceDir, String targetBranch, GitDir gitDir) {
  
    return gitDir.getBranchReference(sourceBranch)
        .then((BranchReference branchRef) {
  