anchor.diff:  
           return gitDir.isWorkingTreeClean();
         })
  -      .then((bool isClean) {
  +      .then((bool value) {
  +        isClean = value;
           if(!allowDirty && !isClean) {
             ctx.fail('Working tree is dirty. Cannot generate docs.');
           }
  
positive.code: 
    GitDir gitDir;
    List<String> libs;
  
    return GitDir.fromExisting(currentWorkingDir)
        .then((GitDir value) {
  
negative.code:   parser.addFlag(_allowDirtyArg, abbr: 'd', help: 'Allow a dirty tree to run', defaultsTo: false);
  }
  
  Future<String> _getCommitMessageFuture(GitDir gitDir, bool isClean) {
    return gitDir.getCurrentBranch()
      .then((BranchReference currentBranchRef) {
  
        final abbrevSha = currentBranchRef.sha.substring(0, 7);
  
        var msg = "Docs generated for ${currentBranchRef.branchName} at ${abbrevSha}";
  
        if(!isClean) {
          msg = msg.concat(' (dirty)');
        }
  
        return msg;
      });
  }
  
  