<commit_before>var express = require('express')
var Git = require("nodegit")
var app = express()

/*Git.Clone("https://github.com/stevenharradine/git-express.git", "docroot").then(function(repository) {
  // Work with the repository object here.
});
*/

var getMostRecentCommit = function(repository) {
  return repository.getBranchCommit("master");
};

var getCommitMessage = function(commit) {
  return commit.message();
};

app.get('/', function (req, res) {
  

  Git.Repository.open("docroot")
    .then(getMostRecentCommit)
    .then(getCommitMessage)
    .then(function(message) {
      res.send(message)
    });
})

app.listen(3000)<commit_msg>reserves up readme from fixed point in time<commit_after>var express = require('express')
var clone = require("nodegit").Clone.clone;
var proxy = express()
var git_path = "https://github.com/stevenharradine/git-express.git"

var getMostRecentCommit = function(repository) {
  return repository.getBranchCommit(branch)
}

var getCommitMessage = function(commit) {
  return commit.message()
}

proxy.use (function (req, res) {
  var branch = req.originalUrl.substring (1)

// Clone a given repository into a specific folder.
  clone(git_path, "docroot", null)
    // Look up this known commit.
    .then(function(repo) {
      // Use a known commit sha from this repository.
      return repo.getCommit("e4ee311506fea83e02455f6cd14c931ade6f505e");
    })
    // Look up a specific file within that commit.
    .then(function(commit) {
      return commit.getEntry("README.md");
    })
    // Get the blob contents from the file.
    .then(function(entry) {
      // Patch the blob to contain a reference to the entry.
      return entry.getBlob().then(function(blob) {
        blob.entry = entry;
        return blob;
      });
    })
    // Display information about the blob.
    .then(function(blob) {
      res.send(String(blob));
    })
    .catch(function(err) { console.log(err); });
})

proxy.listen(3000)
{'fraction_non_alphanumeric': 0.13754457463066735, 'fraction_numerical': 0.016811003565970453, 'mean_word_length': 3.5568445475638053, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1146806', 'n_tokens_mistral': 632, 'n_tokens_neox': 619, 'n_words': 145}