<commit_before>#ifndef INCLUDE_git_index_h__
#define INCLUDE_git_index_h__

#include <stdint.h>
#include "common.h"
#include "oid.h"

/**
 * @file git/index.h
 * @brief Git index parsing and manipulation routines
 * @defgroup git_index Git index parsing and manipulation routines
 * @ingroup Git
 * @{
 */
GIT_BEGIN_DECL

/** Memory representation of an index file. */
typedef struct git_index git_index;


/** Time used in a git index entry */
typedef struct {
	uint32_t seconds;
	uint32_t nanoseconds;
} git_index_time;

/** Memory representation of a file entry in the index. */
typedef struct git_index_entry {
	git_index_time ctime;
	git_index_time mtime;

	uint32_t dev;
	uint32_t ino;
	uint32_t mode;
	uint32_t uid;
	uint32_t gid;
	uint32_t file_size;

	git_oid oid;

	uint16_t flags;
	uint16_t flags_extended;

	char *path;
} git_index_entry;


/**
 * Create a new Git index object as a memory representation<commit_msg>Do not use STDINT types in public headers<commit_after>#ifndef INCLUDE_git_index_h__
#define INCLUDE_git_index_h__

#include "common.h"
#include "oid.h"

/**
 * @file git/index.h
 * @brief Git index parsing and manipulation routines
 * @defgroup git_index Git index parsing and manipulation routines
 * @ingroup Git
 * @{
 */
GIT_BEGIN_DECL

/** Memory representation of an index file. */
typedef struct git_index git_index;


/** Time used in a git index entry */
typedef struct {
	unsigned int seconds;
	unsigned int nanoseconds;
} git_index_time;

/** Memory representation of a file entry in the index. */
typedef struct git_index_entry {
	git_index_time ctime;
	git_index_time mtime;

	unsigned int dev;
	unsigned int ino;
	unsigned int mode;
	unsigned int uid;
	unsigned int gid;
	unsigned int file_size;

	git_oid oid;

	unsigned short flags;
	unsigned short flags_extended;

	char *path;
} git_index_entry;


/**
 * Create a new Git index object as a memory representation
{'fraction_non_alphanumeric': 0.07966457023060797, 'fraction_numerical': 0.010482180293501049, 'mean_word_length': 4.407932011331445, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '5955385', 'n_tokens_mistral': 685, 'n_tokens_neox': 628, 'n_words': 216}