<commit_before>// git things

Template.commitPanel.helpers({
  committing: function() {
    return Session.get('committing');
  }
});

Template.commitPanel.events = {

  // rename the current file
  "submit .committer": function(e) {
    e.preventDefault();
    $(e.target).blur();
    var msg = $('#commitMsg')[0].value;
    if (msg == null || msg == '') return false;
    Session.set("committing", false);
    Meteor.call('makeCommit', msg);
  },

  "click .resetfiles": function(e) {
    Meteor.call('resetFiles');
  },

  "click .newcommit": function(e) {
    e.preventDefault();
    Session.set('committing', true);
    focusForm('#commitMsg');
  },

  "click .cancelCommit": function(e) {
    Session.set('committing', false);
  },

  "click .loadcommit": function(e) {
    Meteor.call('loadCommit');
  }

};

Template.history.helpers({
  commits: function() {
    return Commits.find({}, {sort: {"commit.committer.date": -1}} );
  }
});

Template.commit.helpers({
  current: function() {
    return Session.equals("commit", this._id);
  },
  mine: function() {
    return (Meteor.user().profile.login === this.author.login)
  }
});

Template.commit.events = {
  "click .commit": function(e) {
    Session.set("commit", this._id);
  }
};
<commit_msg>double click commit to deselect<commit_after>// git things

Template.commitPanel.helpers({
  committing: function() {
    return Session.get('committing');
  }
});

Template.commitPanel.events = {

  // rename the current file
  "submit .committer": function(e) {
    e.preventDefault();
    $(e.target).blur();
    var msg = $('#commitMsg')[0].value;
    if (msg == null || msg == '') return false;
    Session.set("committing", false);
    Meteor.call('makeCommit', msg);
  },

  "click .resetfiles": function(e) {
    Meteor.call('resetFiles');
  },

  "click .newcommit": function(e) {
    e.preventDefault();
    Session.set('committing', true);
    focusForm('#commitMsg');
  },

  "click .cancelCommit": function(e) {
    Session.set('committing', false);
  },

  "click .loadcommit": function(e) {
    Meteor.call('loadCommit');
  }

};

Template.history.helpers({
  commits: function() {
    return Commits.find({}, {sort: {"commit.committer.date": -1}} );
  }
});

Template.commit.helpers({
  current: function() {
    return Session.equals("commit", this._id);
  },
  mine: function() {
    return (Meteor.user().profile.login === this.author.login)
  }
});

Template.commit.events = {

  "click .commit": function(e) {
    if ( Session.equals("commit", this._id) ) {
      Session.set("commit", null);
    } else {
      Session.set("commit", this._id);
    }
  }

};

{'fraction_non_alphanumeric': 0.19650986342943855, 'fraction_numerical': 0.0015174506828528073, 'mean_word_length': 3.395, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3264728', 'n_tokens_mistral': 886, 'n_tokens_neox': 878, 'n_words': 162}