<commit_before>//
//  GTRepository+Stashing.h
//  ObjectiveGitFramework
//
//  Created by <NAME> on 2013-09-27.
//  Copyright (c) 2013 GitHub, Inc. All rights reserved.
//

#import "GTRepository.h"

// Flags for -stashChangesWithMessage:flags:error:.
// Those can be ORed together. See git_stash_flags for additional information.
typedef enum {
	GTRepositoryStashFlagDefault = GIT_STASH_DEFAULT,
	GTRepositoryStashFlagKeepIndex = GIT_STASH_KEEP_INDEX,
	GTRepositoryStashFlagIncludeUntracked = GIT_STASH_INCLUDE_UNTRACKED,
	GTRepositoryStashFlagIncludeIgnored = GIT_STASH_INCLUDE_IGNORED
} GTRepositoryStashFlag;

@interface GTRepository (Stashing)

// Stash the repository's changes.
//
// message   - Message to be attributed to the item in the stash. This may be
//             nil.
// stashFlag - The flags of stash to be used.
// error     - If not NULL, set to any error that occurred.
//
// Returns a commit representing the stashed changes if successful, or nil
// otherwise.
- (GTCommit *)stashChangesWithMessage:(NSString *)message flags:(GTRepositoryStashFlag)flags error:(NSError **)error;

// Enumerate over all the stashes in the repository.
//
// block - A block to execute for each stash found, giving the stash's index and
//         message along with its OID. Setting `stop` to YES will cause enumeration
//         to stop after the block returns.
- (void)enumerateStashesUsingBlock:(void (^)(NSUInteger index, NSString *message, GTOID *oid, BOOL *stop))block;

// Drop a stash from the repository's list of stashes.
//
// index - The index of the stash to drop.
// error - If not NULL, set to any error that occurs.
//
// Returns YES if the stash was successfully dropped, NO otherwise
- (BOOL)dropStashAtIndex:(NSUInteger)index error:(NSError **)error;

@end<commit_msg>Document the ordering of stash indices<commit_after>//
//  GTRepository+Stashing.h
//  ObjectiveGitFramework
//
//  Created by <NAME> on 2013-09-27.
//  Copyright (c) 2013 GitHub, Inc. All rights reserved.
//

#import "GTRepository.h"

// Flags for -stashChangesWithMessage:flags:error:.
// Those can be ORed together. See git_stash_flags for additional information.
typedef enum {
	GTRepositoryStashFlagDefault = GIT_STASH_DEFAULT,
	GTRepositoryStashFlagKeepIndex = GIT_STASH_KEEP_INDEX,
	GTRepositoryStashFlagIncludeUntracked = GIT_STASH_INCLUDE_UNTRACKED,
	GTRepositoryStashFlagIncludeIgnored = GIT_STASH_INCLUDE_IGNORED
} GTRepositoryStashFlag;

@interface GTRepository (Stashing)

// Stash the repository's changes.
//
// message   - Message to be attributed to the item in the stash. This may be
//             nil.
// stashFlag - The flags of stash to be used.
// error     - If not NULL, set to any error that occurred.
//
// Returns a commit representing the stashed changes if successful, or nil
// otherwise.
- (GTCommit *)stashChangesWithMessage:(NSString *)message flags:(GTRepositoryStashFlag)flags error:(NSError **)error;

// Enumerate over all the stashes in the repository.
//
// block - A block to execute for each stash found. `index` will be the zero-based
//         stash index (where 0 is the most recent stash). Setting `stop` to YES
//         will cause enumeration to stop after the block returns.
- (void)enumerateStashesUsingBlock:(void (^)(NSUInteger index, NSString *message, GTOID *oid, BOOL *stop))block;

// Drop a stash from the repository's list of stashes.
//
// index - The index of the stash to drop, where 0 is the most recent stash.
// error - If not NULL, set to any error that occurs.
//
// Returns YES if the stash was successfully dropped, NO otherwise
- (BOOL)dropStashAtIndex:(NSUInteger)index error:(NSError **)error;

@end
{'fraction_non_alphanumeric': 0.09582309582309582, 'fraction_numerical': 0.007098007098007098, 'mean_word_length': 3.814717477003942, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '2111752', 'n_tokens_mistral': 1193, 'n_tokens_neox': 1121, 'n_words': 395}