<commit_before>using System;
using System.Diagnostics;

namespace Skarpdev.DotnetVersion.Vcs.Git
{
    public class GitVcs : IVcs
    {
        /// <summary>
        /// Creates a new commit with the given message
        /// </summary>
        /// <param name="csProjFilePath">Path to the cs project file that was version updated</param>
        /// <param name="message">The message to include in the commit</param>
        public void Commit(string csProjFilePath, string message)
        {
            if(!LaunchGitWithArgs($"git add {csProjFilePath}"))
            {
                throw new OperationCanceledException($"Unable to add cs proj file {csProjFilePath} to git index");
            }

            if(!LaunchGitWithArgs($"git commit -m {message}"))
            {
                throw new OperationCanceledException("Unable to commit");
            }
        }

        /// <summary>
        /// Determines whether the current repository is clean.
        /// </summary>
        /// <returns></returns>
        public bool IsRepositoryClean()
        {
            return LaunchGitWithArgs("diff-index --quiet HEAD --");
        }

        /// <summary>
        /// Determines whether git is present in PATH on the current computer
        /// </summary>
        /// <returns></returns>
        public bool IsVcsToolPresent()
        {
            // launching `git --help` returns exit code 0 where as `git` returns 1 as git wants a cmd line argument 
            return LaunchGitWithArgs("--help");
        }

        /// <summary>
        /// Creates a new tag
        /// </summary>
        /// <param name="tagName">Name of the tag</param><commit_msg>Fix git add and git commit commands<commit_after>using System;
using System.Diagnostics;

namespace Skarpdev.DotnetVersion.Vcs.Git
{
    public class GitVcs : IVcs
    {
        /// <summary>
        /// Creates a new commit with the given message
        /// </summary>
        /// <param name="csProjFilePath">Path to the cs project file that was version updated</param>
        /// <param name="message">The message to include in the commit</param>
        public void Commit(string csProjFilePath, string message)
        {
            if(!LaunchGitWithArgs($"add {csProjFilePath}"))
            {
                throw new OperationCanceledException($"Unable to add cs proj file {csProjFilePath} to git index");
            }

            if(!LaunchGitWithArgs($"commit -m {message}"))
            {
                throw new OperationCanceledException("Unable to commit");
            }
        }

        /// <summary>
        /// Determines whether the current repository is clean.
        /// </summary>
        /// <returns></returns>
        public bool IsRepositoryClean()
        {
            return LaunchGitWithArgs("diff-index --quiet HEAD --");
        }

        /// <summary>
        /// Determines whether git is present in PATH on the current computer
        /// </summary>
        /// <returns></returns>
        public bool IsVcsToolPresent()
        {
            // launching `git --help` returns exit code 0 where as `git` returns 1 as git wants a cmd line argument 
            return LaunchGitWithArgs("--help");
        }

        /// <summary>
        /// Creates a new tag
        /// </summary>
        /// <param name="tagName">Name of the tag</param>
{'fraction_non_alphanumeric': 0.11554496724240619, 'fraction_numerical': 0.0011911852293031567, 'mean_word_length': 1.7646090534979424, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, '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': '4904607', 'n_tokens_mistral': 870, 'n_tokens_neox': 831, 'n_words': 273}