anchor.diff:    GitDir gitDir;
   
     String sourceDirTreeSha;
  +  String commitMsg;
   
     return GitDir.fromExisting(workingDir)
         .then((GitDir value) {
  
positive.code: 
          sourceDirTreeSha = tree.sha;
  
          return gitDir.getBranchReference(targetBranch);
        })
        .then((BranchReference branchRef) {
  
          if(branchRef == null) {
            // branch does not exist. New branch!
            return _doCommit(ctx, 'created', sourceDirTreeSha, null, sourceBranch, sourceDir,
                targetBranch, gitDir);
          } else {
            // 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,
                sourceDirTreeSha, sourceBranch, targetBranch, gitDir);
          }
        });
  }
  
  Future<bool> _withExistingBranch(TaskContext ctx, BranchReference targetBranchRef, String dirSha,
      String sourceDir, String treeSha, 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 {
            return _doCommit(ctx, 'updated', treeSha, targetBranchRef.sha, sourceBranch,
                sourceDir, targetBranch, gitDir);
          }
        });
  }
  
  Future<bool> _doCommit(TaskContext ctx, String verb, String treeSha, String parentCommitSha,
      String sourceBranch, String sourceDir, String targetBranch, GitDir gitDir) {
  
    return gitDir.getBranchReference(sourceBranch)
        .then((BranchReference branchRef) {
  
          final masterCommit = branchRef.sha.substring(0, 8);
          final message = 'Contents of $sourceDir from commit $masterCommit';
  
          final parentCommitShas = [];
          if(parentCommitSha != null) {
            parentCommitShas.add(parentCommitSha);
          }
  
          return gitDir.commitTree(treeSha, message, parentCommitShas: parentCommitShas);
        })
        .then((String newCommitSha) {
          ctx.info('Create new commit: $newCommitSha');
  
          final branchNameRef = 'refs/heads/$targetBranch';
  
          return gitDir.runCommand(['update-ref', branchNameRef, newCommitSha]);
        })
        .then((ProcessResult pr) {
          assert(pr.exitCode == 0);
          ctx.info("Branch '$targetBranch' $verb");
          return true;
        });
  }
  
negative.code: part of hop_tasks;
  
  Task getBranchForDirTask(String sourceBranch, String sourceDir,
                           String targetBranch, {String workingDir}) {
    requireArgumentNotNullOrEmpty(sourceBranch, 'sourceBranch');
    requireArgumentNotNullOrEmpty(sourceDir, 'sourceDir');
    requireArgumentNotNullOrEmpty(targetBranch, 'targetBranch');
  
    final description = 'Commit the tree for dir "$sourceDir" in branch'
        ' "$sourceBranch" and create/update branch "$targetBranch" with the new commit';
  
    return new Task.async((ctx) =>
        branchForDir(ctx, sourceBranch, sourceDir, targetBranch, workingDir: workingDir),
        description: description);
  }
  
  Future<bool> branchForDir(TaskContext ctx, String sourceBranch, String sourceDir,
      String targetBranch, {String workingDir}) {
  