<commit_before>/******************************************************************************
 * This file is part of the libqgit2 library
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef LIBQGIT2_REBASE_H
#define LIBQGIT2_REBASE_H

#include "qgitsignature.h"

namespace LibQGit2
{

class OId;
class RebaseOptions;

/**
 * @brief Wrapper class for git_rebase.
 * Represents a Git rebase.
 *
 * @ingroup LibQGit2
 * @{
 */
class LIBQGIT2_EXPORT Rebase
{
public:
    /**
     * Create a wrapper for a libgit2 rebase object. Constructed object
     * takes ownership of \a rebase and frees it in the destructor.
     * @param rebase Raw pointer to the libgit2 rebase object
     * @param opts Specifies how the rebase is to be conducted
     */
    explicit Rebase(git_rebase *rebase, const RebaseOptions &opts);

    /**
     * Aborts a rebase that is currently in progress, resetting the repository
     * and working directory to their state before rebase began.
     *
     * @param signature The identity that is aborting the rebase
     * @throws LibQGit2::Exception
     */
    void abort(const Signature &signature);

    /**
     * Finishes a rebase that is currently in progress once all patches have
     * been applied.
     *
     * @param signature The identity that is finishing the rebase (optional)
     * @throws LibQGit2::Exception
     */
    void finish(const Signature &signature);

    /**
     * Performs the next rebase operation by applying the patch and updating the index
     * and working directory with the changes.  If there are conflicts, those will need<commit_msg>Provide default value to Rebase::finish() signature argument<commit_after>/******************************************************************************
 * This file is part of the libqgit2 library
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#ifndef LIBQGIT2_REBASE_H
#define LIBQGIT2_REBASE_H

#include "qgitsignature.h"

namespace LibQGit2
{

class OId;
class RebaseOptions;

/**
 * @brief Wrapper class for git_rebase.
 * Represents a Git rebase.
 *
 * @ingroup LibQGit2
 * @{
 */
class LIBQGIT2_EXPORT Rebase
{
public:
    /**
     * Create a wrapper for a libgit2 rebase object. Constructed object
     * takes ownership of \a rebase and frees it in the destructor.
     * @param rebase Raw pointer to the libgit2 rebase object
     * @param opts Specifies how the rebase is to be conducted
     */
    explicit Rebase(git_rebase *rebase, const RebaseOptions &opts);

    /**
     * Aborts a rebase that is currently in progress, resetting the repository
     * and working directory to their state before rebase began.
     *
     * @param signature The identity that is aborting the rebase
     * @throws LibQGit2::Exception
     */
    void abort(const Signature &signature);

    /**
     * Finishes a rebase that is currently in progress once all patches have
     * been applied.
     *
     * @param signature The identity that is finishing the rebase
     * @throws LibQGit2::Exception
     */
    void finish(const Signature &signature = Signature());

    /**
     * Performs the next rebase operation by applying the patch and updating the index
     * and working directory with the changes.  If there are conflicts, those will need
{'fraction_non_alphanumeric': 0.09334763948497854, 'fraction_numerical': 0.009871244635193134, 'mean_word_length': 3.439047619047619, 'pattern_counts': {'":': 0, '<': 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': '4113494', 'n_tokens_mistral': 1260, 'n_tokens_neox': 1210, 'n_words': 583}