/* gitg-stage.c generated by valac 0.27.1.26-9b1a5-dirty, the Vala compiler
 * generated from gitg-stage.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2013 - Jesse van den Kieboom
 *
 * gitg is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * gitg 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <libgit2-glib/ggit.h>
#include <gio/gio.h>
#include <gee.h>
#include <glib/gstdio.h>
#include <glib/gi18n-lib.h>
#include <gobject/gvaluecollector.h>


#define GITG_TYPE_STAGE_COMMIT_OPTIONS (gitg_stage_commit_options_get_type ())

#define GITG_TYPE_PATCH_SET (gitg_patch_set_get_type ())
#define GITG_PATCH_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PATCH_SET, GitgPatchSet))
#define GITG_PATCH_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PATCH_SET, GitgPatchSetClass))
#define GITG_IS_PATCH_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PATCH_SET))
#define GITG_IS_PATCH_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PATCH_SET))
#define GITG_PATCH_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PATCH_SET, GitgPatchSetClass))

typedef struct _GitgPatchSet GitgPatchSet;
typedef struct _GitgPatchSetClass GitgPatchSetClass;
typedef struct _GitgPatchSetPrivate GitgPatchSetPrivate;

#define GITG_PATCH_SET_TYPE_PATCH (gitg_patch_set_patch_get_type ())

#define GITG_PATCH_SET_TYPE_TYPE (gitg_patch_set_type_get_type ())
typedef struct _GitgPatchSetPatch GitgPatchSetPatch;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _gitg_patch_set_unref0(var) ((var == NULL) ? NULL : (var = (gitg_patch_set_unref (var), NULL)))
typedef struct _GitgParamSpecPatchSet GitgParamSpecPatchSet;

#define GITG_TYPE_STAGE (gitg_stage_get_type ())
#define GITG_STAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_STAGE, GitgStage))
#define GITG_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_STAGE, GitgStageClass))
#define GITG_IS_STAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_STAGE))
#define GITG_IS_STAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_STAGE))
#define GITG_STAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_STAGE, GitgStageClass))

typedef struct _GitgStage GitgStage;
typedef struct _GitgStageClass GitgStageClass;
typedef struct _GitgStagePrivate GitgStagePrivate;

#define GITG_TYPE_REPOSITORY (gitg_repository_get_type ())
#define GITG_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REPOSITORY, GitgRepository))
#define GITG_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_REPOSITORY, GitgRepositoryClass))
#define GITG_IS_REPOSITORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REPOSITORY))
#define GITG_IS_REPOSITORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_REPOSITORY))
#define GITG_REPOSITORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_REPOSITORY, GitgRepositoryClass))

typedef struct _GitgRepository GitgRepository;
typedef struct _GitgRepositoryClass GitgRepositoryClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _GitgStageRefreshData GitgStageRefreshData;
typedef struct _Block20Data Block20Data;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define GITG_TYPE_REF (gitg_ref_get_type ())
#define GITG_REF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_REF, GitgRef))
#define GITG_IS_REF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_REF))
#define GITG_REF_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_REF, GitgRefIface))

typedef struct _GitgRef GitgRef;
typedef struct _GitgRefIface GitgRefIface;

#define GITG_TYPE_PARSED_REF_NAME (gitg_parsed_ref_name_get_type ())
#define GITG_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefName))
#define GITG_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))
#define GITG_IS_PARSED_REF_NAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_PARSED_REF_NAME))
#define GITG_IS_PARSED_REF_NAME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_PARSED_REF_NAME))
#define GITG_PARSED_REF_NAME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_PARSED_REF_NAME, GitgParsedRefNameClass))

typedef struct _GitgParsedRefName GitgParsedRefName;
typedef struct _GitgParsedRefNameClass GitgParsedRefNameClass;

#define GITG_TYPE_REF_STATE (gitg_ref_state_get_type ())
typedef struct _GitgStageGetHeadTreeData GitgStageGetHeadTreeData;

#define GITG_TYPE_STAGE_STATUS_ENUMERATOR (gitg_stage_status_enumerator_get_type ())
#define GITG_STAGE_STATUS_ENUMERATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_STAGE_STATUS_ENUMERATOR, GitgStageStatusEnumerator))
#define GITG_STAGE_STATUS_ENUMERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_STAGE_STATUS_ENUMERATOR, GitgStageStatusEnumeratorClass))
#define GITG_IS_STAGE_STATUS_ENUMERATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_STAGE_STATUS_ENUMERATOR))
#define GITG_IS_STAGE_STATUS_ENUMERATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_STAGE_STATUS_ENUMERATOR))
#define GITG_STAGE_STATUS_ENUMERATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_STAGE_STATUS_ENUMERATOR, GitgStageStatusEnumeratorClass))

typedef struct _GitgStageStatusEnumerator GitgStageStatusEnumerator;
typedef struct _GitgStageStatusEnumeratorClass GitgStageStatusEnumeratorClass;
typedef struct _Block21Data Block21Data;
typedef struct _GitgStageThreadIndexData GitgStageThreadIndexData;

#define GITG_TYPE_HOOK (gitg_hook_get_type ())
#define GITG_HOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_HOOK, GitgHook))
#define GITG_HOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_HOOK, GitgHookClass))
#define GITG_IS_HOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_HOOK))
#define GITG_IS_HOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_HOOK))
#define GITG_HOOK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_HOOK, GitgHookClass))

typedef struct _GitgHook GitgHook;
typedef struct _GitgHookClass GitgHookClass;
#define _g_date_time_unref0(var) ((var == NULL) ? NULL : (var = (g_date_time_unref (var), NULL)))
#define _g_time_zone_unref0(var) ((var == NULL) ? NULL : (var = (g_time_zone_unref (var), NULL)))
typedef struct _Block22Data Block22Data;
typedef struct _GitgStagePreCommitHookData GitgStagePreCommitHookData;
typedef struct _Block23Data Block23Data;
#define __vala_GgitStatusOptions_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitStatusOptions_free (var), NULL)))
typedef struct _Block24Data Block24Data;
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))
typedef struct _Block25Data Block25Data;
#define _ggit_reflog_unref0(var) ((var == NULL) ? NULL : (var = (ggit_reflog_unref (var), NULL)))
typedef struct _GitgStageCommitData GitgStageCommitData;
typedef struct _Block26Data Block26Data;
#define _ggit_tree_entry_unref0(var) ((var == NULL) ? NULL : (var = (ggit_tree_entry_unref (var), NULL)))
typedef struct _GitgStageRevertData GitgStageRevertData;
typedef struct _GitgStageRevertPathData GitgStageRevertPathData;
typedef struct _Block27Data Block27Data;
#define _ggit_index_entry_unref0(var) ((var == NULL) ? NULL : (var = (ggit_index_entry_unref (var), NULL)))
#define _ggit_index_entries_unref0(var) ((var == NULL) ? NULL : (var = (ggit_index_entries_unref (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
typedef struct _GitgStageRevertPatchData GitgStageRevertPatchData;
typedef struct _Block28Data Block28Data;
typedef struct _GitgStageDeleteData GitgStageDeleteData;
typedef struct _GitgStageDeletePathData GitgStageDeletePathData;
typedef struct _Block29Data Block29Data;
typedef struct _GitgStageStageData GitgStageStageData;
typedef struct _GitgStageStagePathData GitgStageStagePathData;
typedef struct _Block30Data Block30Data;
typedef struct _GitgStageStageCommitData GitgStageStageCommitData;
typedef struct _Block31Data Block31Data;
typedef struct _GitgStageStagePatchData GitgStageStagePatchData;
typedef struct _Block32Data Block32Data;
typedef struct _GitgStageUnstageData GitgStageUnstageData;
typedef struct _GitgStageUnstagePathData GitgStageUnstagePathData;
typedef struct _Block33Data Block33Data;
typedef struct _GitgStageUnstagePatchData GitgStageUnstagePatchData;

#define GITG_TYPE_STAGE_STATUS_ITEM (gitg_stage_status_item_get_type ())
#define GITG_STAGE_STATUS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_STAGE_STATUS_ITEM, GitgStageStatusItem))
#define GITG_IS_STAGE_STATUS_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_STAGE_STATUS_ITEM))
#define GITG_STAGE_STATUS_ITEM_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_STAGE_STATUS_ITEM, GitgStageStatusItemIface))

typedef struct _GitgStageStatusItem GitgStageStatusItem;
typedef struct _GitgStageStatusItemIface GitgStageStatusItemIface;
typedef struct _GitgStageDiffIndexAllData GitgStageDiffIndexAllData;
typedef struct _GitgStageDiffIndexData GitgStageDiffIndexData;
typedef struct _GitgStageDiffWorkdirAllData GitgStageDiffWorkdirAllData;
typedef struct _GitgStageDiffWorkdirData GitgStageDiffWorkdirData;

typedef enum  {
	GITG_STAGE_COMMIT_OPTIONS_NONE = 0,
	GITG_STAGE_COMMIT_OPTIONS_SIGN_OFF = 1 << 0,
	GITG_STAGE_COMMIT_OPTIONS_AMEND = 1 << 1,
	GITG_STAGE_COMMIT_OPTIONS_SKIP_HOOKS = 1 << 2
} GitgStageCommitOptions;

typedef enum  {
	GITG_STAGE_ERROR_PRE_COMMIT_HOOK_FAILED,
	GITG_STAGE_ERROR_COMMIT_MSG_HOOK_FAILED,
	GITG_STAGE_ERROR_NOTHING_TO_COMMIT,
	GITG_STAGE_ERROR_INDEX_ENTRY_NOT_FOUND
} GitgStageError;
#define GITG_STAGE_ERROR gitg_stage_error_quark ()
typedef enum  {
	GITG_PATCH_SET_TYPE_ADD = 'a',
	GITG_PATCH_SET_TYPE_REMOVE = 'r'
} GitgPatchSetType;

struct _GitgPatchSetPatch {
	GitgPatchSetType type;
	gsize old_offset;
	gsize new_offset;
	gsize length;
};

struct _GitgPatchSet {
	GTypeInstance parent_instance;
	volatile int ref_count;
	GitgPatchSetPrivate * priv;
	gchar* filename;
	GitgPatchSetPatch* patches;
	gint patches_length1;
};

struct _GitgPatchSetClass {
	GTypeClass parent_class;
	void (*finalize) (GitgPatchSet *self);
};

struct _GitgParamSpecPatchSet {
	GParamSpec parent_instance;
};

struct _GitgStage {
	GObject parent_instance;
	GitgStagePrivate * priv;
};

struct _GitgStageClass {
	GObjectClass parent_class;
};

struct _GitgStagePrivate {
	GitgRepository* d_repository;
	GMutex d_index_mutex;
	GRecMutex __lock_d_index_mutex;
	GgitTree* d_head_tree;
};

typedef void (*GitgStageWithIndexFunc) (GgitIndex* index, void* user_data, GError** error);
struct _GitgStageRefreshData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GError * _inner_error_;
};

struct _Block20Data {
	int _ref_count_;
	GitgStage* self;
	GError* e;
	gpointer _async_data_;
};

typedef void (*GitgAsyncThreadFunc) (void* user_data, GError** error);
typedef enum  {
	GITG_REF_STATE_NONE,
	GITG_REF_STATE_SELECTED,
	GITG_REF_STATE_PRELIGHT
} GitgRefState;

struct _GitgRefIface {
	GTypeInterface parent_iface;
	GitgRepository* (*get_owner) (GitgRef* self);
	GitgParsedRefName* (*get_d_parsed_name) (GitgRef* self);
	void (*set_d_parsed_name) (GitgRef* self, GitgParsedRefName* value);
	GList* (*get_d_pushes) (GitgRef* self);
	void (*set_d_pushes) (GitgRef* self, GList* value);
	GitgRefState (*get_state) (GitgRef* self);
	void (*set_state) (GitgRef* self, GitgRefState value);
	gboolean (*get_working) (GitgRef* self);
	void (*set_working) (GitgRef* self, gboolean value);
};

struct _GitgStageGetHeadTreeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GgitTree* result;
	Block20Data* _data20_;
	GgitTree* _tmp0_;
	GgitTree* _tmp1_;
	GgitTree* _tmp2_;
	GError* _tmp3_;
	GError* _tmp4_;
	GError* _tmp5_;
	GgitTree* _tmp6_;
	GgitTree* _tmp7_;
	GError * _inner_error_;
};

struct _Block21Data {
	int _ref_count_;
	GitgStage* self;
	GitgStageWithIndexFunc func;
	gpointer func_target;
	gpointer _async_data_;
};

struct _GitgStageThreadIndexData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgStageWithIndexFunc func;
	gpointer func_target;
	Block21Data* _data21_;
	GitgStageWithIndexFunc _tmp0_;
	void* _tmp0__target;
	GError * _inner_error_;
};

struct _Block22Data {
	int _ref_count_;
	GitgStage* self;
	gchar* errormsg;
	GgitSignature* author;
	gpointer _async_data_;
};

struct _GitgStagePreCommitHookData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GgitSignature* author;
	Block22Data* _data22_;
	GgitSignature* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	GError* _tmp3_;
	GError * _inner_error_;
};

struct _Block23Data {
	int _ref_count_;
	GitgStage* self;
	gboolean has_changes;
};

struct _Block24Data {
	int _ref_count_;
	GitgStage* self;
	GitgHook* hook;
};

struct _Block25Data {
	int _ref_count_;
	GitgStage* self;
	GgitOId* ret;
	gboolean skip_hooks;
	gboolean amend;
	gchar* message;
	GgitSignature* author;
	GgitSignature* committer;
	GitgStageCommitOptions options;
	gpointer _async_data_;
};

struct _GitgStageCommitData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* message;
	GgitSignature* author;
	GgitSignature* committer;
	GitgStageCommitOptions options;
	GgitOId* result;
	Block25Data* _data25_;
	const gchar* _tmp0_;
	GgitSignature* _tmp1_;
	GgitSignature* _tmp2_;
	GitgStageCommitOptions _tmp3_;
	GitgStageCommitOptions _tmp4_;
	GitgStageCommitOptions _tmp5_;
	GgitOId* _tmp6_;
	GError * _inner_error_;
};

struct _Block26Data {
	int _ref_count_;
	GitgStage* self;
	GgitTree* tree;
	GFile* file;
	gpointer _async_data_;
};

struct _GitgStageRevertData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GFile* file;
	Block26Data* _data26_;
	GFile* _tmp0_;
	GgitTree* _tmp1_;
	GError * _inner_error_;
};

struct _GitgStageRevertPathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* path;
	GitgRepository* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError * _inner_error_;
};

struct _Block27Data {
	int _ref_count_;
	GitgStage* self;
	GFile* workdirf;
	GFileInputStream* workdirf_stream;
	GitgPatchSet* patch;
	gpointer _async_data_;
};

struct _GitgStageRevertPatchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgPatchSet* patch;
	Block27Data* _data27_;
	GitgPatchSet* _tmp0_;
	GitgRepository* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GitgPatchSet* _tmp4_;
	const gchar* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GFile* _tmp8_;
	GFileInputStream* _tmp9_;
	GError * _inner_error_;
};

struct _Block28Data {
	int _ref_count_;
	GitgStage* self;
	GFile* file;
	gpointer _async_data_;
};

struct _GitgStageDeleteData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GFile* file;
	Block28Data* _data28_;
	GFile* _tmp0_;
	GError * _inner_error_;
};

struct _GitgStageDeletePathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* path;
	GitgRepository* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError * _inner_error_;
};

struct _Block29Data {
	int _ref_count_;
	GitgStage* self;
	GFile* file;
	gpointer _async_data_;
};

struct _GitgStageStageData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GFile* file;
	Block29Data* _data29_;
	GFile* _tmp0_;
	GError * _inner_error_;
};

struct _GitgStageStagePathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* path;
	GitgRepository* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError * _inner_error_;
};

struct _Block30Data {
	int _ref_count_;
	GitgStage* self;
	gchar* path;
	GgitCommit* commit;
	gpointer _async_data_;
};

struct _GitgStageStageCommitData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* path;
	GgitCommit* commit;
	Block30Data* _data30_;
	const gchar* _tmp0_;
	GgitCommit* _tmp1_;
	GError * _inner_error_;
};

struct _Block31Data {
	int _ref_count_;
	GitgStage* self;
	GFile* newf;
	GFileInputStream* new_stream;
	GitgPatchSet* patch;
	gpointer _async_data_;
};

struct _GitgStageStagePatchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgPatchSet* patch;
	Block31Data* _data31_;
	GitgPatchSet* _tmp0_;
	GitgRepository* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GitgPatchSet* _tmp4_;
	const gchar* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GFile* _tmp8_;
	GFileInputStream* _tmp9_;
	GError * _inner_error_;
};

struct _Block32Data {
	int _ref_count_;
	GitgStage* self;
	GgitTree* tree;
	GFile* file;
	gpointer _async_data_;
};

struct _GitgStageUnstageData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GFile* file;
	Block32Data* _data32_;
	GFile* _tmp0_;
	GgitTree* _tmp1_;
	GError * _inner_error_;
};

struct _GitgStageUnstagePathData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	gchar* path;
	GitgRepository* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	const gchar* _tmp3_;
	GFile* _tmp4_;
	GFile* _tmp5_;
	GError * _inner_error_;
};

struct _Block33Data {
	int _ref_count_;
	GitgStage* self;
	GFile* file;
	GgitTree* tree;
	GitgPatchSet* patch;
	gpointer _async_data_;
};

struct _GitgStageUnstagePatchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgPatchSet* patch;
	Block33Data* _data33_;
	GitgPatchSet* _tmp0_;
	GitgRepository* _tmp1_;
	GFile* _tmp2_;
	GFile* _tmp3_;
	GitgPatchSet* _tmp4_;
	const gchar* _tmp5_;
	GFile* _tmp6_;
	GFile* _tmp7_;
	GgitTree* _tmp8_;
	GError * _inner_error_;
};

struct _GitgStageStatusItemIface {
	GTypeInterface parent_iface;
	gchar* (*get_path) (GitgStageStatusItem* self);
	gboolean (*get_is_staged) (GitgStageStatusItem* self);
	gboolean (*get_is_unstaged) (GitgStageStatusItem* self);
	gboolean (*get_is_untracked) (GitgStageStatusItem* self);
	gchar* (*get_icon_name) (GitgStageStatusItem* self);
};

struct _GitgStageDiffIndexAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgStageStatusItem** files;
	gint files_length1;
	GgitDiffOptions* defopts;
	GgitDiff* result;
	GgitDiffOptions* opts;
	GgitDiffOptions* _tmp0_;
	GgitDiffOptions* _tmp1_;
	GitgStageStatusItem** _tmp2_;
	gint _tmp2__length1;
	gchar** pspec;
	GitgStageStatusItem** _tmp3_;
	gint _tmp3__length1;
	gchar** _tmp4_;
	gint pspec_length1;
	gint _pspec_size_;
	gint i;
	gboolean _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	GitgStageStatusItem** _tmp8_;
	gint _tmp8__length1;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gint _tmp10_;
	GitgStageStatusItem** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	GitgStageStatusItem* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GgitDiffOptions* _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	GgitDiffOptions* _tmp19_;
	GgitDiffOptions* _tmp20_;
	GgitDiffOptions* _tmp21_;
	GgitDiffOption _tmp22_;
	GgitDiffOption _tmp23_;
	GgitDiffOptions* _tmp24_;
	GgitDiffOption _tmp25_;
	GgitDiffOption _tmp26_;
	GgitDiffOptions* _tmp27_;
	GgitDiffOptions* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	GgitDiffOptions* _tmp31_;
	GgitDiffOptions* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	GgitDiffOptions* _tmp35_;
	GgitDiffOptions* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	GgitDiffOptions* _tmp39_;
	GgitDiffOptions* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	GgitTree* tree;
	GgitTree* _tmp43_;
	GgitIndex* _tmp44_;
	GitgRepository* _tmp45_;
	GgitIndex* _tmp46_;
	GgitDiff* _tmp47_;
	GitgRepository* _tmp48_;
	GgitTree* _tmp49_;
	GgitDiffOptions* _tmp50_;
	GgitDiff* _tmp51_;
	GgitDiff* _tmp52_;
	GError * _inner_error_;
};

struct _GitgStageDiffIndexData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgStageStatusItem* f;
	GgitDiffOptions* defopts;
	GgitDiff* result;
	GgitDiff* _tmp0_;
	GitgStageStatusItem* _tmp1_;
	GitgStageStatusItem* _tmp2_;
	GitgStageStatusItem** _tmp3_;
	GitgStageStatusItem** _tmp4_;
	gint _tmp4__length1;
	GgitDiffOptions* _tmp5_;
	GgitDiff* _tmp6_;
	GgitDiff* _tmp7_;
	GgitDiff* _tmp8_;
	GError * _inner_error_;
};

struct _GitgStageDiffWorkdirAllData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgStageStatusItem** files;
	gint files_length1;
	GgitDiffOptions* defopts;
	GgitDiff* result;
	GgitDiffOptions* opts;
	GgitDiffOptions* _tmp0_;
	GgitDiffOptions* _tmp1_;
	GitgStageStatusItem** _tmp2_;
	gint _tmp2__length1;
	gchar** pspec;
	GitgStageStatusItem** _tmp3_;
	gint _tmp3__length1;
	gchar** _tmp4_;
	gint pspec_length1;
	gint _pspec_size_;
	gint i;
	gboolean _tmp5_;
	gint _tmp6_;
	gint _tmp7_;
	GitgStageStatusItem** _tmp8_;
	gint _tmp8__length1;
	gchar** _tmp9_;
	gint _tmp9__length1;
	gint _tmp10_;
	GitgStageStatusItem** _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
	GitgStageStatusItem* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GgitDiffOptions* _tmp17_;
	gchar** _tmp18_;
	gint _tmp18__length1;
	GgitDiffOptions* _tmp19_;
	GgitDiffOptions* _tmp20_;
	GgitDiffOptions* _tmp21_;
	GgitDiffOption _tmp22_;
	GgitDiffOption _tmp23_;
	GgitDiffOptions* _tmp24_;
	GgitDiffOption _tmp25_;
	GgitDiffOption _tmp26_;
	GgitDiffOptions* _tmp27_;
	GgitDiffOptions* _tmp28_;
	gint _tmp29_;
	gint _tmp30_;
	GgitDiffOptions* _tmp31_;
	GgitDiffOptions* _tmp32_;
	gint _tmp33_;
	gint _tmp34_;
	GgitDiffOptions* _tmp35_;
	GgitDiffOptions* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	GgitDiffOptions* _tmp39_;
	GgitDiffOptions* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	GgitIndex* _tmp43_;
	GitgRepository* _tmp44_;
	GgitIndex* _tmp45_;
	GgitDiff* _tmp46_;
	GitgRepository* _tmp47_;
	GgitDiffOptions* _tmp48_;
	GgitDiff* _tmp49_;
	GgitDiff* _tmp50_;
	GError * _inner_error_;
};

struct _GitgStageDiffWorkdirData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	GitgStage* self;
	GitgStageStatusItem* f;
	GgitDiffOptions* defopts;
	GgitDiff* result;
	GgitDiff* _tmp0_;
	GitgStageStatusItem* _tmp1_;
	GitgStageStatusItem* _tmp2_;
	GitgStageStatusItem** _tmp3_;
	GitgStageStatusItem** _tmp4_;
	gint _tmp4__length1;
	GgitDiffOptions* _tmp5_;
	GgitDiff* _tmp6_;
	GgitDiff* _tmp7_;
	GgitDiff* _tmp8_;
	GError * _inner_error_;
};


static gpointer gitg_patch_set_parent_class = NULL;
static gpointer gitg_stage_parent_class = NULL;

GType gitg_stage_commit_options_get_type (void) G_GNUC_CONST;
GQuark gitg_stage_error_quark (void);
gpointer gitg_patch_set_ref (gpointer instance);
void gitg_patch_set_unref (gpointer instance);
GParamSpec* gitg_param_spec_patch_set (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void gitg_value_set_patch_set (GValue* value, gpointer v_object);
void gitg_value_take_patch_set (GValue* value, gpointer v_object);
gpointer gitg_value_get_patch_set (const GValue* value);
GType gitg_patch_set_get_type (void) G_GNUC_CONST;
GType gitg_patch_set_patch_get_type (void) G_GNUC_CONST;
GType gitg_patch_set_type_get_type (void) G_GNUC_CONST;
GitgPatchSetPatch* gitg_patch_set_patch_dup (const GitgPatchSetPatch* self);
void gitg_patch_set_patch_free (GitgPatchSetPatch* self);
enum  {
	GITG_PATCH_SET_DUMMY_PROPERTY
};
GitgPatchSet* gitg_patch_set_reversed (GitgPatchSet* self);
GitgPatchSet* gitg_patch_set_new (void);
GitgPatchSet* gitg_patch_set_construct (GType object_type);
static void gitg_patch_set_finalize (GitgPatchSet* obj);
GType gitg_stage_get_type (void) G_GNUC_CONST;
GType gitg_repository_get_type (void) G_GNUC_CONST;
#define GITG_STAGE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GITG_TYPE_STAGE, GitgStagePrivate))
enum  {
	GITG_STAGE_DUMMY_PROPERTY
};
GitgStage* gitg_stage_new (GitgRepository* repository);
GitgStage* gitg_stage_construct (GType object_type, GitgRepository* repository);
static void gitg_stage_refresh_data_free (gpointer _data);
void gitg_stage_refresh (GitgStage* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_refresh_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_refresh_co (GitgStageRefreshData* _data_);
static void gitg_stage_thread_index (GitgStage* self, GitgStageWithIndexFunc func, void* func_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void gitg_stage_thread_index_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static void __lambda6_ (GitgStage* self, GgitIndex* index, GError** error);
static void ___lambda6__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_refresh_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_get_head_tree_data_free (gpointer _data);
void gitg_stage_get_head_tree (GitgStage* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitTree* gitg_stage_get_head_tree_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_get_head_tree_co (GitgStageGetHeadTreeData* _data_);
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
void gitg_async_thread (GitgAsyncThreadFunc func, void* func_target, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_async_thread_finish (GAsyncResult* _res_, GError** error);
static void __lambda7_ (Block20Data* _data20_, GError** error);
GType gitg_parsed_ref_name_get_type (void) G_GNUC_CONST;
GType gitg_ref_state_get_type (void) G_GNUC_CONST;
GType gitg_ref_get_type (void) G_GNUC_CONST;
GitgRef* gitg_repository_get_head (GitgRepository* self, GError** error);
static void ___lambda7__gitg_async_thread_func (gpointer self, GError** error);
static void gitg_stage_get_head_tree_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
GType gitg_stage_status_enumerator_get_type (void) G_GNUC_CONST;
GitgStageStatusEnumerator* gitg_stage_file_status (GitgStage* self, GgitStatusOptions* options);
GitgStageStatusEnumerator* gitg_stage_status_enumerator_new (GitgRepository* repository, GgitStatusOptions* options);
GitgStageStatusEnumerator* gitg_stage_status_enumerator_construct (GType object_type, GitgRepository* repository, GgitStatusOptions* options);
static void gitg_stage_with_index (GitgStage* self, GitgStageWithIndexFunc func, void* func_target, GError** error);
static void gitg_stage_thread_index_data_free (gpointer _data);
static gboolean gitg_stage_thread_index_co (GitgStageThreadIndexData* _data_);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void __lambda5_ (Block21Data* _data21_, GError** error);
static void ___lambda5__gitg_async_thread_func (gpointer self, GError** error);
static void gitg_stage_thread_index_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gchar* gitg_stage_message_with_sign_off (GitgStage* self, const gchar* message, GgitSignature* committer);
static gchar* gitg_stage_convert_message_to_encoding (GitgStage* self, GgitConfig* conf, const gchar* message, gchar** encoding);
GType gitg_hook_get_type (void) G_GNUC_CONST;
static void gitg_stage_setup_commit_hook_environment (GitgStage* self, GitgHook* hook, GgitSignature* author);
void gitg_hook_set_working_directory (GitgHook* self, GFile* value);
GeeHashMap* gitg_hook_get_environment (GitgHook* self);
static void gitg_stage_pre_commit_hook_data_free (gpointer _data);
void gitg_stage_pre_commit_hook (GitgStage* self, GgitSignature* author, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_pre_commit_hook_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_pre_commit_hook_co (GitgStagePreCommitHookData* _data_);
static Block22Data* block22_data_ref (Block22Data* _data22_);
static void block22_data_unref (void * _userdata_);
static void ___lambda15_ (Block22Data* _data22_, GError** error);
GitgHook* gitg_hook_new (const gchar* name);
GitgHook* gitg_hook_construct (GType object_type, const gchar* name);
gint gitg_hook_run_sync (GitgHook* self, GgitRepository* repository, GError** error);
gchar** gitg_hook_get_output (GitgHook* self, int* result_length1);
static void ____lambda15__gitg_async_thread_func (gpointer self, GError** error);
static void gitg_stage_pre_commit_hook_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gboolean gitg_stage_has_index_changes (GitgStage* self);
static Block23Data* block23_data_ref (Block23Data* _data23_);
static void block23_data_unref (void * _userdata_);
static gint ___lambda16_ (Block23Data* _data23_, const gchar* path, GgitStatusFlags flags);
static gint ____lambda16__ggit_status_callback (const gchar* path, GgitStatusFlags status_flags, gpointer self);
static void _vala_GgitStatusOptions_free (GgitStatusOptions* self);
static gchar* gitg_stage_commit_msg_hook (GitgStage* self, const gchar* message, GgitSignature* author, GgitSignature* committer, GError** error);
gboolean gitg_hook_exists_in (GitgHook* self, GgitRepository* repository);
void gitg_hook_add_argument (GitgHook* self, const gchar* arg);
static void gitg_stage_post_commit_hook (GitgStage* self, GgitSignature* author);
static Block24Data* block24_data_ref (Block24Data* _data24_);
static void block24_data_unref (void * _userdata_);
void gitg_hook_run (GitgHook* self, GgitRepository* repository, GAsyncReadyCallback _callback_, gpointer _user_data_);
gint gitg_hook_run_finish (GitgHook* self, GAsyncResult* _res_, GError** error);
static void __lambda17_ (Block24Data* _data24_, GObject* obj, GAsyncResult* res);
static void ___lambda17__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
static gchar* gitg_stage_get_subject (GitgStage* self, const gchar* message);
static void _vala_GgitOId_free (GgitOId* self);
static void gitg_stage_commit_data_free (gpointer _data);
void gitg_stage_commit (GitgStage* self, const gchar* message, GgitSignature* author, GgitSignature* committer, GitgStageCommitOptions options, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitOId* gitg_stage_commit_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_commit_co (GitgStageCommitData* _data_);
static Block25Data* block25_data_ref (Block25Data* _data25_);
static void block25_data_unref (void * _userdata_);
static void __lambda18_ (Block25Data* _data25_, GgitIndex* index, GError** error);
GitgRef* gitg_repository_lookup_reference (GitgRepository* self, const gchar* name, GError** error);
static GgitOId* _vala_GgitOId_copy (GgitOId* self);
gpointer gitg_repository_lookup (GitgRepository* self, GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GgitOId* id, GError** error);
static void ___lambda18__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_commit_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_revert_data_free (gpointer _data);
void gitg_stage_revert (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_revert_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_revert_co (GitgStageRevertData* _data_);
static Block26Data* block26_data_ref (Block26Data* _data26_);
static void block26_data_unref (void * _userdata_);
static void gitg_stage_revert_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda19_ (Block26Data* _data26_, GgitIndex* index, GError** error);
static void ___lambda19__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_revert_path_data_free (gpointer _data);
void gitg_stage_revert_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_revert_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_revert_path_co (GitgStageRevertPathData* _data_);
static void gitg_stage_revert_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_revert_patch_data_free (gpointer _data);
void gitg_stage_revert_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_revert_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_revert_patch_co (GitgStageRevertPatchData* _data_);
static Block27Data* block27_data_ref (Block27Data* _data27_);
static void block27_data_unref (void * _userdata_);
static void gitg_stage_revert_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda20_ (Block27Data* _data27_, GgitIndex* index, GError** error);
static void gitg_stage_apply_patch_stream (GitgStage* self, GInputStream* old_stream, GInputStream* new_stream, GOutputStream* patched_stream, GitgPatchSet* patch, GError** error);
static void ___lambda20__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_delete_data_free (gpointer _data);
void gitg_stage_delete (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_delete_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_delete_co (GitgStageDeleteData* _data_);
static Block28Data* block28_data_ref (Block28Data* _data28_);
static void block28_data_unref (void * _userdata_);
static void __lambda21_ (Block28Data* _data28_, GgitIndex* index, GError** error);
static void ___lambda21__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_delete_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_delete_path_data_free (gpointer _data);
void gitg_stage_delete_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_delete_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_delete_path_co (GitgStageDeletePathData* _data_);
static void gitg_stage_delete_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_stage_data_free (gpointer _data);
void gitg_stage_stage (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_stage_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_stage_co (GitgStageStageData* _data_);
static Block29Data* block29_data_ref (Block29Data* _data29_);
static void block29_data_unref (void * _userdata_);
static void __lambda22_ (Block29Data* _data29_, GgitIndex* index, GError** error);
static void ___lambda22__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_stage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_stage_path_data_free (gpointer _data);
void gitg_stage_stage_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_stage_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_stage_path_co (GitgStageStagePathData* _data_);
static void gitg_stage_stage_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_stage_commit_data_free (gpointer _data);
void gitg_stage_stage_commit (GitgStage* self, const gchar* path, GgitCommit* commit, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_stage_commit_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_stage_commit_co (GitgStageStageCommitData* _data_);
static Block30Data* block30_data_ref (Block30Data* _data30_);
static void block30_data_unref (void * _userdata_);
static void __lambda23_ (Block30Data* _data30_, GgitIndex* index, GError** error);
static void ___lambda23__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_stage_commit_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_copy_stream (GitgStage* self, GOutputStream* dest, GInputStream* src, gsize* pos, gsize index, gsize length, GError** error);
static void gitg_stage_apply_patch (GitgStage* self, GgitIndex* index, GInputStream* old_stream, GInputStream* new_stream, GitgPatchSet* patch, GError** error);
static void gitg_stage_stage_patch_data_free (gpointer _data);
void gitg_stage_stage_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_stage_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_stage_patch_co (GitgStageStagePatchData* _data_);
static Block31Data* block31_data_ref (Block31Data* _data31_);
static void block31_data_unref (void * _userdata_);
static void gitg_stage_stage_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda24_ (Block31Data* _data31_, GgitIndex* index, GError** error);
static void ___lambda24__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_unstage_data_free (gpointer _data);
void gitg_stage_unstage (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_unstage_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_unstage_co (GitgStageUnstageData* _data_);
static Block32Data* block32_data_ref (Block32Data* _data32_);
static void block32_data_unref (void * _userdata_);
static void gitg_stage_unstage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda25_ (Block32Data* _data32_, GgitIndex* index, GError** error);
static void ___lambda25__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_unstage_path_data_free (gpointer _data);
void gitg_stage_unstage_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_unstage_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_unstage_path_co (GitgStageUnstagePathData* _data_);
static void gitg_stage_unstage_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_unstage_patch_data_free (gpointer _data);
void gitg_stage_unstage_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_);
void gitg_stage_unstage_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_unstage_patch_co (GitgStageUnstagePatchData* _data_);
static Block33Data* block33_data_ref (Block33Data* _data33_);
static void block33_data_unref (void * _userdata_);
static void gitg_stage_unstage_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void __lambda26_ (Block33Data* _data33_, GgitIndex* index, GError** error);
static void ___lambda26__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error);
static void gitg_stage_diff_index_all_data_free (gpointer _data);
GType gitg_stage_status_item_get_type (void) G_GNUC_CONST;
void gitg_stage_diff_index_all (GitgStage* self, GitgStageStatusItem** files, int files_length1, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitDiff* gitg_stage_diff_index_all_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_diff_index_all_co (GitgStageDiffIndexAllData* _data_);
gchar* gitg_stage_status_item_get_path (GitgStageStatusItem* self);
static void gitg_stage_diff_index_all_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_diff_index_data_free (gpointer _data);
void gitg_stage_diff_index (GitgStage* self, GitgStageStatusItem* f, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitDiff* gitg_stage_diff_index_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_diff_index_co (GitgStageDiffIndexData* _data_);
static void gitg_stage_diff_index_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_diff_workdir_all_data_free (gpointer _data);
void gitg_stage_diff_workdir_all (GitgStage* self, GitgStageStatusItem** files, int files_length1, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitDiff* gitg_stage_diff_workdir_all_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_diff_workdir_all_co (GitgStageDiffWorkdirAllData* _data_);
static void gitg_stage_diff_workdir_data_free (gpointer _data);
void gitg_stage_diff_workdir (GitgStage* self, GitgStageStatusItem* f, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_);
GgitDiff* gitg_stage_diff_workdir_finish (GitgStage* self, GAsyncResult* _res_, GError** error);
static gboolean gitg_stage_diff_workdir_co (GitgStageDiffWorkdirData* _data_);
static void gitg_stage_diff_workdir_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void gitg_stage_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_clear_GMutex (GMutex * mutex);
static void _vala_clear_GRecMutex (GRecMutex * mutex);
static void _vala_clear_GRWLock (GRWLock * mutex);
static void _vala_clear_GCond (GCond * mutex);


GType gitg_stage_commit_options_get_type (void) {
	static volatile gsize gitg_stage_commit_options_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_stage_commit_options_type_id__volatile)) {
		static const GFlagsValue values[] = {{GITG_STAGE_COMMIT_OPTIONS_NONE, "GITG_STAGE_COMMIT_OPTIONS_NONE", "none"}, {GITG_STAGE_COMMIT_OPTIONS_SIGN_OFF, "GITG_STAGE_COMMIT_OPTIONS_SIGN_OFF", "sign-off"}, {GITG_STAGE_COMMIT_OPTIONS_AMEND, "GITG_STAGE_COMMIT_OPTIONS_AMEND", "amend"}, {GITG_STAGE_COMMIT_OPTIONS_SKIP_HOOKS, "GITG_STAGE_COMMIT_OPTIONS_SKIP_HOOKS", "skip-hooks"}, {0, NULL, NULL}};
		GType gitg_stage_commit_options_type_id;
		gitg_stage_commit_options_type_id = g_flags_register_static ("GitgStageCommitOptions", values);
		g_once_init_leave (&gitg_stage_commit_options_type_id__volatile, gitg_stage_commit_options_type_id);
	}
	return gitg_stage_commit_options_type_id__volatile;
}


GQuark gitg_stage_error_quark (void) {
	return g_quark_from_static_string ("gitg_stage_error-quark");
}


GType gitg_patch_set_type_get_type (void) {
	static volatile gsize gitg_patch_set_type_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_patch_set_type_type_id__volatile)) {
		static const GEnumValue values[] = {{GITG_PATCH_SET_TYPE_ADD, "GITG_PATCH_SET_TYPE_ADD", "add"}, {GITG_PATCH_SET_TYPE_REMOVE, "GITG_PATCH_SET_TYPE_REMOVE", "remove"}, {0, NULL, NULL}};
		GType gitg_patch_set_type_type_id;
		gitg_patch_set_type_type_id = g_enum_register_static ("GitgPatchSetType", values);
		g_once_init_leave (&gitg_patch_set_type_type_id__volatile, gitg_patch_set_type_type_id);
	}
	return gitg_patch_set_type_type_id__volatile;
}


GitgPatchSet* gitg_patch_set_reversed (GitgPatchSet* self) {
	GitgPatchSet* result = NULL;
	GitgPatchSet* ret = NULL;
	GitgPatchSet* _tmp0_ = NULL;
	GitgPatchSet* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	GitgPatchSet* _tmp4_ = NULL;
	GitgPatchSetPatch* _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	GitgPatchSetPatch* _tmp6_ = NULL;
#line 59 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 61 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = gitg_patch_set_new ();
#line 61 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ret = _tmp0_;
#line 63 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ret;
#line 63 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = self->filename;
#line 63 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = g_strdup (_tmp2_);
#line 63 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_tmp1_->filename);
#line 63 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_->filename = _tmp3_;
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ret;
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = self->patches;
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5__length1 = self->patches_length1;
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = g_new0 (GitgPatchSetPatch, _tmp5__length1);
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_->patches = (g_free (_tmp4_->patches), NULL);
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_->patches = _tmp6_;
#line 64 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_->patches_length1 = _tmp5__length1;
#line 1153 "gitg-stage.c"
	{
		gint i = 0;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		i = 0;
#line 1158 "gitg-stage.c"
		{
			gboolean _tmp7_ = FALSE;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp7_ = TRUE;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			while (TRUE) {
#line 1165 "gitg-stage.c"
				gint _tmp9_ = 0;
				GitgPatchSetPatch* _tmp10_ = NULL;
				gint _tmp10__length1 = 0;
				GitgPatchSetPatch orig = {0};
				GitgPatchSetPatch* _tmp11_ = NULL;
				gint _tmp11__length1 = 0;
				gint _tmp12_ = 0;
				GitgPatchSetPatch _tmp13_ = {0};
				GitgPatchSetPatch p = {0};
				GitgPatchSetPatch _tmp14_ = {0};
				gsize _tmp15_ = 0UL;
				GitgPatchSetPatch _tmp16_ = {0};
				gsize _tmp17_ = 0UL;
				GitgPatchSetPatch _tmp18_ = {0};
				gsize _tmp19_ = 0UL;
				GitgPatchSetPatch _tmp20_ = {0};
				GitgPatchSetPatch* _tmp21_ = NULL;
				gint _tmp21__length1 = 0;
				gint _tmp22_ = 0;
				GitgPatchSetPatch _tmp23_ = {0};
				GitgPatchSetType _tmp24_ = 0;
				GitgPatchSet* _tmp25_ = NULL;
				GitgPatchSetPatch* _tmp26_ = NULL;
				gint _tmp26__length1 = 0;
				gint _tmp27_ = 0;
				GitgPatchSetPatch _tmp28_ = {0};
				GitgPatchSetPatch _tmp29_ = {0};
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (!_tmp7_) {
#line 1195 "gitg-stage.c"
					gint _tmp8_ = 0;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp8_ = i;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					i = _tmp8_ + 1;
#line 1201 "gitg-stage.c"
				}
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp7_ = FALSE;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp9_ = i;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp10_ = self->patches;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp10__length1 = self->patches_length1;
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (!(_tmp9_ < _tmp10__length1)) {
#line 66 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					break;
#line 1215 "gitg-stage.c"
				}
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp11_ = self->patches;
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp11__length1 = self->patches_length1;
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp12_ = i;
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp13_ = _tmp11_[_tmp12_];
#line 68 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				orig = _tmp13_;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp14_ = orig;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp15_ = _tmp14_.new_offset;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp16_ = orig;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp17_ = _tmp16_.old_offset;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp18_ = orig;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp19_ = _tmp18_.length;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				memset (&_tmp20_, 0, sizeof (GitgPatchSetPatch));
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp20_.old_offset = _tmp15_;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp20_.new_offset = _tmp17_;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp20_.length = _tmp19_;
#line 70 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				p = _tmp20_;
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp21_ = self->patches;
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp21__length1 = self->patches_length1;
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp22_ = i;
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp23_ = _tmp21_[_tmp22_];
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp24_ = _tmp23_.type;
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				switch (_tmp24_) {
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					case GITG_PATCH_SET_TYPE_ADD:
#line 1263 "gitg-stage.c"
					{
#line 79 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						p.type = GITG_PATCH_SET_TYPE_REMOVE;
#line 80 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						break;
#line 1269 "gitg-stage.c"
					}
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					case GITG_PATCH_SET_TYPE_REMOVE:
#line 1273 "gitg-stage.c"
					{
#line 82 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						p.type = GITG_PATCH_SET_TYPE_ADD;
#line 83 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						break;
#line 1279 "gitg-stage.c"
					}
					default:
#line 76 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					break;
#line 1284 "gitg-stage.c"
				}
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp25_ = ret;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp26_ = _tmp25_->patches;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp26__length1 = _tmp25_->patches_length1;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp27_ = i;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp28_ = p;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp26_[_tmp27_] = _tmp28_;
#line 86 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp29_ = _tmp26_[_tmp27_];
#line 1300 "gitg-stage.c"
			}
		}
	}
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = ret;
#line 89 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 1308 "gitg-stage.c"
}


GitgPatchSet* gitg_patch_set_construct (GType object_type) {
	GitgPatchSet* self = NULL;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = (GitgPatchSet*) g_type_create_instance (object_type);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self;
#line 1318 "gitg-stage.c"
}


GitgPatchSet* gitg_patch_set_new (void) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return gitg_patch_set_construct (GITG_TYPE_PATCH_SET);
#line 1325 "gitg-stage.c"
}


GitgPatchSetPatch* gitg_patch_set_patch_dup (const GitgPatchSetPatch* self) {
	GitgPatchSetPatch* dup;
#line 48 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	dup = g_new0 (GitgPatchSetPatch, 1);
#line 48 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	memcpy (dup, self, sizeof (GitgPatchSetPatch));
#line 48 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return dup;
#line 1337 "gitg-stage.c"
}


void gitg_patch_set_patch_free (GitgPatchSetPatch* self) {
#line 48 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_free (self);
#line 1344 "gitg-stage.c"
}


GType gitg_patch_set_patch_get_type (void) {
	static volatile gsize gitg_patch_set_patch_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_patch_set_patch_type_id__volatile)) {
		GType gitg_patch_set_patch_type_id;
		gitg_patch_set_patch_type_id = g_boxed_type_register_static ("GitgPatchSetPatch", (GBoxedCopyFunc) gitg_patch_set_patch_dup, (GBoxedFreeFunc) gitg_patch_set_patch_free);
		g_once_init_leave (&gitg_patch_set_patch_type_id__volatile, gitg_patch_set_patch_type_id);
	}
	return gitg_patch_set_patch_type_id__volatile;
}


static void gitg_value_patch_set_init (GValue* value) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	value->data[0].v_pointer = NULL;
#line 1362 "gitg-stage.c"
}


static void gitg_value_patch_set_free_value (GValue* value) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (value->data[0].v_pointer) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_patch_set_unref (value->data[0].v_pointer);
#line 1371 "gitg-stage.c"
	}
}


static void gitg_value_patch_set_copy_value (const GValue* src_value, GValue* dest_value) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (src_value->data[0].v_pointer) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		dest_value->data[0].v_pointer = gitg_patch_set_ref (src_value->data[0].v_pointer);
#line 1381 "gitg-stage.c"
	} else {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1385 "gitg-stage.c"
	}
}


static gpointer gitg_value_patch_set_peek_pointer (const GValue* value) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return value->data[0].v_pointer;
#line 1393 "gitg-stage.c"
}


static gchar* gitg_value_patch_set_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (collect_values[0].v_pointer) {
#line 1400 "gitg-stage.c"
		GitgPatchSet* object;
		object = collect_values[0].v_pointer;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (object->parent_instance.g_class == NULL) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1407 "gitg-stage.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1411 "gitg-stage.c"
		}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = gitg_patch_set_ref (object);
#line 1415 "gitg-stage.c"
	} else {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = NULL;
#line 1419 "gitg-stage.c"
	}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return NULL;
#line 1423 "gitg-stage.c"
}


static gchar* gitg_value_patch_set_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	GitgPatchSet** object_p;
	object_p = collect_values[0].v_pointer;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!object_p) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1434 "gitg-stage.c"
	}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!value->data[0].v_pointer) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		*object_p = NULL;
#line 1440 "gitg-stage.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		*object_p = value->data[0].v_pointer;
#line 1444 "gitg-stage.c"
	} else {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		*object_p = gitg_patch_set_ref (value->data[0].v_pointer);
#line 1448 "gitg-stage.c"
	}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return NULL;
#line 1452 "gitg-stage.c"
}


GParamSpec* gitg_param_spec_patch_set (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	GitgParamSpecPatchSet* spec;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (g_type_is_a (object_type, GITG_TYPE_PATCH_SET), NULL);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return G_PARAM_SPEC (spec);
#line 1466 "gitg-stage.c"
}


gpointer gitg_value_get_patch_set (const GValue* value) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_PATCH_SET), NULL);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return value->data[0].v_pointer;
#line 1475 "gitg-stage.c"
}


void gitg_value_set_patch_set (GValue* value, gpointer v_object) {
	GitgPatchSet* old;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_PATCH_SET));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old = value->data[0].v_pointer;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (v_object) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_PATCH_SET));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = v_object;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_patch_set_ref (value->data[0].v_pointer);
#line 1495 "gitg-stage.c"
	} else {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = NULL;
#line 1499 "gitg-stage.c"
	}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (old) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_patch_set_unref (old);
#line 1505 "gitg-stage.c"
	}
}


void gitg_value_take_patch_set (GValue* value, gpointer v_object) {
	GitgPatchSet* old;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, GITG_TYPE_PATCH_SET));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old = value->data[0].v_pointer;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (v_object) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, GITG_TYPE_PATCH_SET));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = v_object;
#line 1524 "gitg-stage.c"
	} else {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		value->data[0].v_pointer = NULL;
#line 1528 "gitg-stage.c"
	}
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (old) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_patch_set_unref (old);
#line 1534 "gitg-stage.c"
	}
}


static void gitg_patch_set_class_init (GitgPatchSetClass * klass) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_patch_set_parent_class = g_type_class_peek_parent (klass);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	((GitgPatchSetClass *) klass)->finalize = gitg_patch_set_finalize;
#line 1544 "gitg-stage.c"
}


static void gitg_patch_set_instance_init (GitgPatchSet * self) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self->ref_count = 1;
#line 1551 "gitg-stage.c"
}


static void gitg_patch_set_finalize (GitgPatchSet* obj) {
	GitgPatchSet * self;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_PATCH_SET, GitgPatchSet);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_signal_handlers_destroy (self);
#line 56 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (self->filename);
#line 57 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self->patches = (g_free (self->patches), NULL);
#line 1565 "gitg-stage.c"
}


GType gitg_patch_set_get_type (void) {
	static volatile gsize gitg_patch_set_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_patch_set_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { gitg_value_patch_set_init, gitg_value_patch_set_free_value, gitg_value_patch_set_copy_value, gitg_value_patch_set_peek_pointer, "p", gitg_value_patch_set_collect_value, "p", gitg_value_patch_set_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (GitgPatchSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_patch_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgPatchSet), 0, (GInstanceInitFunc) gitg_patch_set_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType gitg_patch_set_type_id;
		gitg_patch_set_type_id = g_type_register_fundamental (g_type_fundamental_next (), "GitgPatchSet", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&gitg_patch_set_type_id__volatile, gitg_patch_set_type_id);
	}
	return gitg_patch_set_type_id__volatile;
}


gpointer gitg_patch_set_ref (gpointer instance) {
	GitgPatchSet* self;
	self = instance;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&self->ref_count);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return instance;
#line 1590 "gitg-stage.c"
}


void gitg_patch_set_unref (gpointer instance) {
	GitgPatchSet* self;
	self = instance;
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		GITG_PATCH_SET_GET_CLASS (self)->finalize (self);
#line 40 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1603 "gitg-stage.c"
	}
}


GitgStage* gitg_stage_construct (GType object_type, GitgRepository* repository) {
	GitgStage * self = NULL;
	GitgRepository* _tmp0_ = NULL;
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (repository != NULL, NULL);
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = (GitgStage*) g_object_new (object_type, NULL);
#line 101 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = repository;
#line 101 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self->priv->d_repository = _tmp0_;
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self;
#line 1621 "gitg-stage.c"
}


GitgStage* gitg_stage_new (GitgRepository* repository) {
#line 99 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return gitg_stage_construct (GITG_TYPE_STAGE, repository);
#line 1628 "gitg-stage.c"
}


static void gitg_stage_refresh_data_free (gpointer _data) {
	GitgStageRefreshData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageRefreshData, _data_);
#line 1639 "gitg-stage.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self ? g_object_ref (self) : NULL;
#line 1646 "gitg-stage.c"
}


void gitg_stage_refresh (GitgStage* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageRefreshData* _data_;
	GitgStage* _tmp0_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageRefreshData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_refresh);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_refresh_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_refresh_co (_data_);
#line 1665 "gitg-stage.c"
}


void gitg_stage_refresh_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageRefreshData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 1675 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1679 "gitg-stage.c"
}


static void __lambda6_ (GitgStage* self, GgitIndex* index, GError** error) {
	GgitIndex* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 109 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 109 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_read (_tmp0_, FALSE, &_inner_error_);
#line 109 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 109 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 109 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 1698 "gitg-stage.c"
	}
}


static void ___lambda6__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda6_ ((GitgStage*) self, index, error);
#line 1706 "gitg-stage.c"
}


static void gitg_stage_refresh_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageRefreshData* _data_;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_refresh_co (_data_);
#line 1720 "gitg-stage.c"
}


static gboolean gitg_stage_refresh_co (GitgStageRefreshData* _data_) {
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 1729 "gitg-stage.c"
		goto _state_0;
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 1733 "gitg-stage.c"
		goto _state_1;
		default:
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 1738 "gitg-stage.c"
	}
	_state_0:
#line 106 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self->priv->d_head_tree);
#line 106 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self->priv->d_head_tree = NULL;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda6__gitg_stage_with_index_func, _data_->self, gitg_stage_refresh_ready, _data_);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 1751 "gitg-stage.c"
	_state_1:
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1765 "gitg-stage.c"
		} else {
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 1769 "gitg-stage.c"
		}
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 108 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 1775 "gitg-stage.c"
	}
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1781 "gitg-stage.c"
	} else {
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1785 "gitg-stage.c"
	}
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 104 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 1791 "gitg-stage.c"
}


static void gitg_stage_get_head_tree_data_free (gpointer _data) {
	GitgStageGetHeadTreeData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageGetHeadTreeData, _data_);
#line 1804 "gitg-stage.c"
}


void gitg_stage_get_head_tree (GitgStage* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageGetHeadTreeData* _data_;
	GitgStage* _tmp0_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageGetHeadTreeData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_get_head_tree);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_get_head_tree_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree_co (_data_);
#line 1823 "gitg-stage.c"
}


GgitTree* gitg_stage_get_head_tree_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitTree* result;
	GitgStageGetHeadTreeData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 1834 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 1844 "gitg-stage.c"
}


static Block20Data* block20_data_ref (Block20Data* _data20_) {
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data20_->_ref_count_);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data20_;
#line 1853 "gitg-stage.c"
}


static void block20_data_unref (void * _userdata_) {
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
#line 1862 "gitg-stage.c"
		GitgStage* self;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data20_->self;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (_data20_->e);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block20Data, _data20_);
#line 1872 "gitg-stage.c"
	}
}


static gpointer _g_error_copy0 (gpointer self) {
#line 132 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self ? g_error_copy (self) : NULL;
#line 1880 "gitg-stage.c"
}


static void __lambda7_ (Block20Data* _data20_, GError** error) {
	GitgStage* self;
	GError * _inner_error_ = NULL;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data20_->self;
#line 1889 "gitg-stage.c"
	{
		GitgRef* head = NULL;
		GitgRepository* _tmp0_ = NULL;
		GitgRef* _tmp1_ = NULL;
		GgitObject* _tmp2_ = NULL;
		GitgRef* _tmp3_ = NULL;
		GgitObject* _tmp4_ = NULL;
		GgitCommit* commit = NULL;
		GgitObject* _tmp5_ = NULL;
		GgitCommit* _tmp6_ = NULL;
		GgitTree* _tmp7_ = NULL;
#line 125 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp0_ = self->priv->d_repository;
#line 125 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp1_ = gitg_repository_get_head (_tmp0_, &_inner_error_);
#line 125 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		head = _tmp1_;
#line 125 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 1909 "gitg-stage.c"
			goto __catch85_g_error;
		}
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp3_ = head;
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp4_ = ggit_ref_lookup ((GgitRef*) _tmp3_, &_inner_error_);
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp2_ = _tmp4_;
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 1922 "gitg-stage.c"
			goto __catch85_g_error;
		}
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp5_ = _tmp2_;
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp2_ = NULL;
#line 126 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		commit = G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, ggit_commit_get_type (), GgitCommit);
#line 128 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = commit;
#line 128 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = ggit_commit_get_tree (_tmp6_);
#line 128 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self->priv->d_head_tree);
#line 128 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self->priv->d_head_tree = _tmp7_;
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (commit);
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_tmp2_);
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head);
#line 1945 "gitg-stage.c"
	}
	goto __finally85;
	__catch85_g_error:
	{
		GError* err = NULL;
		GError* _tmp8_ = NULL;
		GError* _tmp9_ = NULL;
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		err = _inner_error_;
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 132 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp8_ = err;
#line 132 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp9_ = _g_error_copy0 (_tmp8_);
#line 132 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (_data20_->e);
#line 132 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data20_->e = _tmp9_;
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (err);
#line 1967 "gitg-stage.c"
	}
	__finally85:
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 123 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 1976 "gitg-stage.c"
	}
}


static void ___lambda7__gitg_async_thread_func (gpointer self, GError** error) {
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda7_ (self, error);
#line 1984 "gitg-stage.c"
}


static void gitg_stage_get_head_tree_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageGetHeadTreeData* _data_;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree_co (_data_);
#line 1998 "gitg-stage.c"
}


static gboolean gitg_stage_get_head_tree_co (GitgStageGetHeadTreeData* _data_) {
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 2007 "gitg-stage.c"
		goto _state_0;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 2011 "gitg-stage.c"
		goto _state_1;
		default:
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 2016 "gitg-stage.c"
	}
	_state_0:
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_ = g_slice_new0 (Block20Data);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_->_ref_count_ = 1;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_->self = g_object_ref (_data_->self);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_->_async_data_ = _data_;
#line 115 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 115 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->self->priv->d_head_tree;
#line 115 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp0_ != NULL) {
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp1_ = NULL;
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp1_ = _data_->self->priv->d_head_tree;
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp2_ = NULL;
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->result = _data_->_tmp2_;
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block20_data_unref (_data_->_data20_);
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data20_ = NULL;
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2051 "gitg-stage.c"
		} else {
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2055 "gitg-stage.c"
		}
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 117 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 2061 "gitg-stage.c"
	}
#line 120 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_->e = NULL;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_async_thread (___lambda7__gitg_async_thread_func, _data_->_data20_, gitg_stage_get_head_tree_ready, _data_);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 2071 "gitg-stage.c"
	_state_1:
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_async_thread_finish (_data_->_res_, &_data_->_inner_error_);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block20_data_unref (_data_->_data20_);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data20_ = NULL;
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2089 "gitg-stage.c"
		} else {
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2093 "gitg-stage.c"
		}
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 122 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 2099 "gitg-stage.c"
	}
#line 136 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 136 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->_data20_->e;
#line 136 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp3_ != NULL) {
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = NULL;
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = _data_->_data20_->e;
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp5_ = NULL;
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp5_ = _g_error_copy0 (_data_->_tmp4_);
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_inner_error_ = _data_->_tmp5_;
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block20_data_unref (_data_->_data20_);
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data20_ = NULL;
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2129 "gitg-stage.c"
		} else {
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2133 "gitg-stage.c"
		}
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 138 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 2139 "gitg-stage.c"
	}
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = _data_->self->priv->d_head_tree;
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _g_object_ref0 (_data_->_tmp6_);
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp7_;
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block20_data_unref (_data_->_data20_);
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_ = NULL;
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2159 "gitg-stage.c"
	} else {
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2163 "gitg-stage.c"
	}
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 141 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block20_data_unref (_data_->_data20_);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data20_ = NULL;
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2177 "gitg-stage.c"
	} else {
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2181 "gitg-stage.c"
	}
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 113 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 2187 "gitg-stage.c"
}


GitgStageStatusEnumerator* gitg_stage_file_status (GitgStage* self, GgitStatusOptions* options) {
	GitgStageStatusEnumerator* result = NULL;
	GitgRepository* _tmp0_ = NULL;
	GgitStatusOptions* _tmp1_ = NULL;
	GitgStageStatusEnumerator* _tmp2_ = NULL;
#line 144 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 146 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 146 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = options;
#line 146 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = gitg_stage_status_enumerator_new (_tmp0_, _tmp1_);
#line 146 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _tmp2_;
#line 146 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 2208 "gitg-stage.c"
}


static void gitg_stage_with_index (GitgStage* self, GitgStageWithIndexFunc func, void* func_target, GError** error) {
	GError * _inner_error_ = NULL;
#line 151 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 2216 "gitg-stage.c"
	{
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_rec_mutex_lock (&self->priv->__lock_d_index_mutex);
#line 2220 "gitg-stage.c"
		{
			GgitIndex* _tmp0_ = NULL;
			GitgRepository* _tmp1_ = NULL;
			GgitIndex* _tmp2_ = NULL;
			GitgStageWithIndexFunc _tmp3_ = NULL;
			void* _tmp3__target = NULL;
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp1_ = self->priv->d_repository;
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp2_ = ggit_repository_get_index ((GgitRepository*) _tmp1_, &_inner_error_);
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp0_ = _tmp2_;
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2235 "gitg-stage.c"
				goto __finally86;
			}
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp3_ = func;
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp3__target = func_target;
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp3_ (_tmp0_, _tmp3__target, &_inner_error_);
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 155 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_object_unref0 (_tmp0_);
#line 2248 "gitg-stage.c"
				goto __finally86;
			}
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (_tmp0_);
#line 2253 "gitg-stage.c"
		}
		__finally86:
		{
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_rec_mutex_unlock (&self->priv->__lock_d_index_mutex);
#line 2259 "gitg-stage.c"
		}
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 153 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 2267 "gitg-stage.c"
		}
	}
}


static void gitg_stage_thread_index_data_free (gpointer _data) {
	GitgStageThreadIndexData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageThreadIndexData, _data_);
#line 2280 "gitg-stage.c"
}


static void gitg_stage_thread_index (GitgStage* self, GitgStageWithIndexFunc func, void* func_target, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageThreadIndexData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgStageWithIndexFunc _tmp1_ = NULL;
	void* _tmp1__target = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageThreadIndexData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_thread_index);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_thread_index_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = func;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1__target = func_target;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->func = _tmp1_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->func_target = _tmp1__target;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_co (_data_);
#line 2309 "gitg-stage.c"
}


static void gitg_stage_thread_index_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageThreadIndexData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 2319 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 2323 "gitg-stage.c"
}


static Block21Data* block21_data_ref (Block21Data* _data21_) {
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data21_->_ref_count_);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data21_;
#line 2332 "gitg-stage.c"
}


static void block21_data_unref (void * _userdata_) {
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
#line 2341 "gitg-stage.c"
		GitgStage* self;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data21_->self;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block21Data, _data21_);
#line 2349 "gitg-stage.c"
	}
}


static void __lambda5_ (Block21Data* _data21_, GError** error) {
	GitgStage* self;
	GitgStageWithIndexFunc _tmp0_ = NULL;
	void* _tmp0__target = NULL;
	GError * _inner_error_ = NULL;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data21_->self;
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _data21_->func;
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0__target = _data21_->func_target;
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_with_index (self, _tmp0_, _tmp0__target, &_inner_error_);
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 162 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 2373 "gitg-stage.c"
	}
}


static void ___lambda5__gitg_async_thread_func (gpointer self, GError** error) {
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda5_ (self, error);
#line 2381 "gitg-stage.c"
}


static void gitg_stage_thread_index_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageThreadIndexData* _data_;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_co (_data_);
#line 2395 "gitg-stage.c"
}


static gboolean gitg_stage_thread_index_co (GitgStageThreadIndexData* _data_) {
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 2404 "gitg-stage.c"
		goto _state_0;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 2408 "gitg-stage.c"
		goto _state_1;
		default:
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 2413 "gitg-stage.c"
	}
	_state_0:
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_ = g_slice_new0 (Block21Data);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_->_ref_count_ = 1;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_->self = g_object_ref (_data_->self);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0__target = NULL;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->func;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0__target = _data_->func_target;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_->func = _data_->_tmp0_;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_->func_target = _data_->_tmp0__target;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_->_async_data_ = _data_;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_async_thread (___lambda5__gitg_async_thread_func, _data_->_data21_, gitg_stage_thread_index_ready, _data_);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 2442 "gitg-stage.c"
	_state_1:
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_async_thread_finish (_data_->_res_, &_data_->_inner_error_);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block21_data_unref (_data_->_data21_);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data21_ = NULL;
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2460 "gitg-stage.c"
		} else {
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 2464 "gitg-stage.c"
		}
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 161 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 2470 "gitg-stage.c"
	}
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block21_data_unref (_data_->_data21_);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data21_ = NULL;
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 2480 "gitg-stage.c"
	} else {
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 2484 "gitg-stage.c"
	}
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 159 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 2490 "gitg-stage.c"
}


static gchar* gitg_stage_message_with_sign_off (GitgStage* self, const gchar* message, GgitSignature* committer) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	GgitSignature* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GgitSignature* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
#line 166 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 166 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 166 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (committer != NULL, NULL);
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = message;
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = committer;
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = ggit_signature_get_name (_tmp1_);
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = committer;
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ggit_signature_get_email (_tmp3_);
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = g_strdup_printf ("%s\nSigned-off-by: %s <%s>\n", _tmp0_, _tmp2_, _tmp4_);
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _tmp5_;
#line 169 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 2524 "gitg-stage.c"
}


static gchar* gitg_stage_convert_message_to_encoding (GitgStage* self, GgitConfig* conf, const gchar* message, gchar** encoding) {
	gchar* _vala_encoding = NULL;
	gchar* result = NULL;
	gboolean _tmp6_ = FALSE;
	gboolean _tmp7_ = FALSE;
	const gchar* _tmp8_ = NULL;
	const gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	GError * _inner_error_ = NULL;
#line 174 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 174 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (conf != NULL, NULL);
#line 174 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 178 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_vala_encoding);
#line 178 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_vala_encoding = NULL;
#line 2547 "gitg-stage.c"
	{
		const gchar* _tmp0_ = NULL;
		GgitConfig* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp1_ = conf;
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp2_ = ggit_config_get_string (_tmp1_, "i18n.commitencoding", &_inner_error_);
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp0_ = _tmp2_;
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2561 "gitg-stage.c"
			goto __catch87_g_error;
		}
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp3_ = g_strdup (_tmp0_);
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_vala_encoding);
#line 182 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_vala_encoding = _tmp3_;
#line 2570 "gitg-stage.c"
	}
	goto __finally87;
	__catch87_g_error:
	{
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 186 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_vala_encoding);
#line 186 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_vala_encoding = NULL;
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp4_ = message;
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp5_ = g_strdup (_tmp4_);
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp5_;
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (encoding) {
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			*encoding = _vala_encoding;
#line 2595 "gitg-stage.c"
		} else {
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (_vala_encoding);
#line 2599 "gitg-stage.c"
		}
#line 187 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 2603 "gitg-stage.c"
	}
	__finally87:
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 180 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 2614 "gitg-stage.c"
	}
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = _vala_encoding;
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp8_ != NULL) {
#line 2620 "gitg-stage.c"
		const gchar* _tmp9_ = NULL;
#line 191 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp9_ = _vala_encoding;
#line 191 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = g_strcmp0 (_tmp9_, "") != 0;
#line 2626 "gitg-stage.c"
	} else {
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = FALSE;
#line 2630 "gitg-stage.c"
	}
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp7_) {
#line 2634 "gitg-stage.c"
		const gchar* _tmp10_ = NULL;
		gint _tmp11_ = 0;
#line 192 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp10_ = _vala_encoding;
#line 192 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp11_ = g_ascii_strcasecmp (_tmp10_, "UTF-8");
#line 192 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = _tmp11_ != 0;
#line 2643 "gitg-stage.c"
	} else {
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = FALSE;
#line 2647 "gitg-stage.c"
	}
#line 190 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp6_) {
#line 2651 "gitg-stage.c"
		{
			gchar* _tmp12_ = NULL;
			const gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			gchar* _tmp16_ = NULL;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp13_ = message;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp14_ = _vala_encoding;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp15_ = g_convert (_tmp13_, (gssize) (-1), _tmp14_, "UTF-8", NULL, NULL, &_inner_error_);
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp12_ = _tmp15_;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2668 "gitg-stage.c"
				goto __catch88_g_error;
			}
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp16_ = _tmp12_;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp12_ = NULL;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			result = _tmp16_;
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (_tmp12_);
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (encoding) {
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				*encoding = _vala_encoding;
#line 2683 "gitg-stage.c"
			} else {
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_free0 (_vala_encoding);
#line 2687 "gitg-stage.c"
			}
#line 196 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return result;
#line 2691 "gitg-stage.c"
		}
		goto __finally88;
		__catch88_g_error:
		{
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_inner_error_ = NULL;
#line 200 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (_vala_encoding);
#line 200 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_vala_encoding = NULL;
#line 2704 "gitg-stage.c"
		}
		__finally88:
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 194 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return NULL;
#line 2715 "gitg-stage.c"
		}
	} else {
#line 205 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_vala_encoding);
#line 205 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_vala_encoding = NULL;
#line 2722 "gitg-stage.c"
	}
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = message;
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = g_strdup (_tmp17_);
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _tmp18_;
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (encoding) {
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		*encoding = _vala_encoding;
#line 2734 "gitg-stage.c"
	} else {
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_vala_encoding);
#line 2738 "gitg-stage.c"
	}
#line 208 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 2742 "gitg-stage.c"
}


static const gchar* string_to_string (const gchar* self) {
	const gchar* result = NULL;
#line 1314 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1315 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	result = self;
#line 1315 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	return result;
#line 2754 "gitg-stage.c"
}


static void gitg_stage_setup_commit_hook_environment (GitgStage* self, GitgHook* hook, GgitSignature* author) {
	GFile* wd = NULL;
	GitgRepository* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* gd = NULL;
	GitgRepository* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GitgHook* _tmp4_ = NULL;
	GFile* _tmp5_ = NULL;
	gchar* gitdir = NULL;
	GFile* _tmp6_ = NULL;
	GFile* _tmp7_ = NULL;
	gchar* _tmp8_ = NULL;
	GitgHook* _tmp9_ = NULL;
	GeeHashMap* _tmp10_ = NULL;
	GeeHashMap* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	GitgHook* _tmp13_ = NULL;
	GeeHashMap* _tmp14_ = NULL;
	GeeHashMap* _tmp15_ = NULL;
	const gchar* _tmp16_ = NULL;
	gchar* _tmp17_ = NULL;
	gchar* _tmp18_ = NULL;
	GitgHook* _tmp19_ = NULL;
	GeeHashMap* _tmp20_ = NULL;
	GeeHashMap* _tmp21_ = NULL;
	GgitSignature* _tmp22_ = NULL;
#line 211 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 211 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (hook != NULL);
#line 214 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 214 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _tmp0_);
#line 214 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	wd = _tmp1_;
#line 215 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = self->priv->d_repository;
#line 215 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = ggit_repository_get_location ((GgitRepository*) _tmp2_);
#line 215 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gd = _tmp3_;
#line 217 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = hook;
#line 217 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = wd;
#line 217 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_hook_set_working_directory (_tmp4_, _tmp5_);
#line 219 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = wd;
#line 219 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = gd;
#line 219 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = g_file_get_relative_path (_tmp6_, _tmp7_);
#line 219 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitdir = _tmp8_;
#line 221 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = hook;
#line 221 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = gitg_hook_get_environment (_tmp9_);
#line 221 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = _tmp10_;
#line 221 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = gitdir;
#line 221 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp11_, "GIT_DIR", _tmp12_);
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = hook;
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = gitg_hook_get_environment (_tmp13_);
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = _tmp14_;
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp16_ = gitdir;
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = g_build_filename (_tmp16_, "index", NULL);
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = _tmp17_;
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp15_, "GIT_INDEX_FILE", _tmp18_);
#line 222 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_tmp18_);
#line 223 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = hook;
#line 223 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp20_ = gitg_hook_get_environment (_tmp19_);
#line 223 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = _tmp20_;
#line 223 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp21_, "GIT_PREFIX", ".");
#line 225 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = author;
#line 225 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp22_ != NULL) {
#line 2853 "gitg-stage.c"
		GitgHook* _tmp23_ = NULL;
		GeeHashMap* _tmp24_ = NULL;
		GeeHashMap* _tmp25_ = NULL;
		GgitSignature* _tmp26_ = NULL;
		const gchar* _tmp27_ = NULL;
		GitgHook* _tmp28_ = NULL;
		GeeHashMap* _tmp29_ = NULL;
		GeeHashMap* _tmp30_ = NULL;
		GgitSignature* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		GDateTime* date = NULL;
		GgitSignature* _tmp33_ = NULL;
		GDateTime* _tmp34_ = NULL;
		gint64 un = 0LL;
		GDateTime* _tmp35_ = NULL;
		gint64 _tmp36_ = 0LL;
		gchar* tz = NULL;
		GDateTime* _tmp37_ = NULL;
		GgitSignature* _tmp38_ = NULL;
		GTimeZone* _tmp39_ = NULL;
		GTimeZone* _tmp40_ = NULL;
		GDateTime* _tmp41_ = NULL;
		GDateTime* _tmp42_ = NULL;
		gchar* _tmp43_ = NULL;
		gchar* _tmp44_ = NULL;
		GitgHook* _tmp45_ = NULL;
		GeeHashMap* _tmp46_ = NULL;
		GeeHashMap* _tmp47_ = NULL;
		gint64 _tmp48_ = 0LL;
		gchar* _tmp49_ = NULL;
		gchar* _tmp50_ = NULL;
		const gchar* _tmp51_ = NULL;
		const gchar* _tmp52_ = NULL;
		gchar* _tmp53_ = NULL;
		gchar* _tmp54_ = NULL;
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp23_ = hook;
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp24_ = gitg_hook_get_environment (_tmp23_);
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = _tmp24_;
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp26_ = author;
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp27_ = ggit_signature_get_name (_tmp26_);
#line 227 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gee_abstract_map_set ((GeeAbstractMap*) _tmp25_, "GIT_AUTHOR_NAME", _tmp27_);
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp28_ = hook;
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp29_ = gitg_hook_get_environment (_tmp28_);
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp30_ = _tmp29_;
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp31_ = author;
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp32_ = ggit_signature_get_email (_tmp31_);
#line 228 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gee_abstract_map_set ((GeeAbstractMap*) _tmp30_, "GIT_AUTHOR_EMAIL", _tmp32_);
#line 230 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp33_ = author;
#line 230 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp34_ = ggit_signature_get_time (_tmp33_);
#line 230 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		date = _tmp34_;
#line 232 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp35_ = date;
#line 232 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp36_ = g_date_time_to_unix (_tmp35_);
#line 232 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		un = _tmp36_;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp37_ = date;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp38_ = author;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp39_ = ggit_signature_get_time_zone (_tmp38_);
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp40_ = _tmp39_;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp41_ = g_date_time_to_timezone (_tmp37_, _tmp40_);
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp42_ = _tmp41_;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp43_ = g_date_time_format (_tmp42_, "%z");
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp44_ = _tmp43_;
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_date_time_unref0 (_tmp42_);
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_time_zone_unref0 (_tmp40_);
#line 233 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		tz = _tmp44_;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp45_ = hook;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp46_ = gitg_hook_get_environment (_tmp45_);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp47_ = _tmp46_;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp48_ = un;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp49_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp48_);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp50_ = _tmp49_;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp51_ = tz;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp52_ = string_to_string (_tmp51_);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp53_ = g_strconcat ("@", _tmp50_, " ", _tmp52_, NULL);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp54_ = _tmp53_;
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gee_abstract_map_set ((GeeAbstractMap*) _tmp47_, "GIT_AUTHOR_DATE", _tmp54_);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp54_);
#line 235 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp50_);
#line 225 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (tz);
#line 225 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_date_time_unref0 (date);
#line 2977 "gitg-stage.c"
	}
#line 211 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (gitdir);
#line 211 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (gd);
#line 211 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (wd);
#line 2985 "gitg-stage.c"
}


static void gitg_stage_pre_commit_hook_data_free (gpointer _data) {
	GitgStagePreCommitHookData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStagePreCommitHookData, _data_);
#line 2996 "gitg-stage.c"
}


void gitg_stage_pre_commit_hook (GitgStage* self, GgitSignature* author, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStagePreCommitHookData* _data_;
	GitgStage* _tmp0_ = NULL;
	GgitSignature* _tmp1_ = NULL;
	GgitSignature* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStagePreCommitHookData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_pre_commit_hook);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_pre_commit_hook_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = author;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->author);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->author = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_pre_commit_hook_co (_data_);
#line 3025 "gitg-stage.c"
}


void gitg_stage_pre_commit_hook_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStagePreCommitHookData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 3035 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 3039 "gitg-stage.c"
}


static Block22Data* block22_data_ref (Block22Data* _data22_) {
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data22_->_ref_count_);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data22_;
#line 3048 "gitg-stage.c"
}


static void block22_data_unref (void * _userdata_) {
	Block22Data* _data22_;
	_data22_ = (Block22Data*) _userdata_;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data22_->_ref_count_)) {
#line 3057 "gitg-stage.c"
		GitgStage* self;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data22_->self;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_data22_->errormsg);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data22_->author);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block22Data, _data22_);
#line 3069 "gitg-stage.c"
	}
}


static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gchar** _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
#line 964 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp0_ = separator;
#line 964 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp0_ == NULL) {
#line 965 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		separator = "";
#line 3087 "gitg-stage.c"
	}
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp3_ = str_array;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp3__length1 = str_array_length1;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp2_ = TRUE;
#line 3097 "gitg-stage.c"
	} else {
		gchar** _tmp4_ = NULL;
		gint _tmp4__length1 = 0;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4_ = str_array;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4__length1 = str_array_length1;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp4__length1 > 0;
#line 3107 "gitg-stage.c"
	}
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp2_) {
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp1_ = TRUE;
#line 3113 "gitg-stage.c"
	} else {
		gboolean _tmp5_ = FALSE;
		gchar** _tmp6_ = NULL;
		gint _tmp6__length1 = 0;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp6_ = str_array;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp6__length1 = str_array_length1;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		if (_tmp6__length1 == (-1)) {
#line 3124 "gitg-stage.c"
			gchar** _tmp7_ = NULL;
			gint _tmp7__length1 = 0;
			const gchar* _tmp8_ = NULL;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp7_ = str_array;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp7__length1 = str_array_length1;
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp8_ = _tmp7_[0];
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp5_ = _tmp8_ != NULL;
#line 3136 "gitg-stage.c"
		} else {
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp5_ = FALSE;
#line 3140 "gitg-stage.c"
		}
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp1_ = _tmp5_;
#line 3144 "gitg-stage.c"
	}
#line 967 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp1_) {
#line 3148 "gitg-stage.c"
		gint i = 0;
		gsize len = 0UL;
		gint _tmp31_ = 0;
		gint _tmp33_ = 0;
		gint _tmp34_ = 0;
		gsize _tmp35_ = 0UL;
		const gchar* _tmp36_ = NULL;
		gint _tmp37_ = 0;
		gint _tmp38_ = 0;
		gint _tmp39_ = 0;
		const gchar* res = NULL;
		gsize _tmp40_ = 0UL;
		void* _tmp41_ = NULL;
		void* ptr = NULL;
		const gchar* _tmp42_ = NULL;
		gchar** _tmp43_ = NULL;
		gint _tmp43__length1 = 0;
		const gchar* _tmp44_ = NULL;
		void* _tmp45_ = NULL;
		const gchar* _tmp62_ = NULL;
#line 969 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		len = (gsize) 1;
#line 3171 "gitg-stage.c"
		{
			gboolean _tmp9_ = FALSE;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			i = 0;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp9_ = TRUE;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			while (TRUE) {
#line 3180 "gitg-stage.c"
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar** _tmp13_ = NULL;
				gint _tmp13__length1 = 0;
				gint _tmp21_ = 0;
				gchar** _tmp22_ = NULL;
				gint _tmp22__length1 = 0;
				gint _tmp23_ = 0;
				const gchar* _tmp24_ = NULL;
				gsize _tmp30_ = 0UL;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (!_tmp9_) {
#line 3193 "gitg-stage.c"
					gint _tmp10_ = 0;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp10_ = i;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					i = _tmp10_ + 1;
#line 3199 "gitg-stage.c"
				}
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp9_ = FALSE;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp13_ = str_array;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp13__length1 = str_array_length1;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (_tmp13__length1 != (-1)) {
#line 3209 "gitg-stage.c"
					gint _tmp14_ = 0;
					gchar** _tmp15_ = NULL;
					gint _tmp15__length1 = 0;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp14_ = i;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp15_ = str_array;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp15__length1 = str_array_length1;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp12_ = _tmp14_ < _tmp15__length1;
#line 3221 "gitg-stage.c"
				} else {
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp12_ = FALSE;
#line 3225 "gitg-stage.c"
				}
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (_tmp12_) {
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp11_ = TRUE;
#line 3231 "gitg-stage.c"
				} else {
					gboolean _tmp16_ = FALSE;
					gchar** _tmp17_ = NULL;
					gint _tmp17__length1 = 0;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp17_ = str_array;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp17__length1 = str_array_length1;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					if (_tmp17__length1 == (-1)) {
#line 3242 "gitg-stage.c"
						gchar** _tmp18_ = NULL;
						gint _tmp18__length1 = 0;
						gint _tmp19_ = 0;
						const gchar* _tmp20_ = NULL;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp18_ = str_array;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp18__length1 = str_array_length1;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp19_ = i;
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp20_ = _tmp18_[_tmp19_];
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp16_ = _tmp20_ != NULL;
#line 3257 "gitg-stage.c"
					} else {
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
						_tmp16_ = FALSE;
#line 3261 "gitg-stage.c"
					}
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp11_ = _tmp16_;
#line 3265 "gitg-stage.c"
				}
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (!_tmp11_) {
#line 970 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					break;
#line 3271 "gitg-stage.c"
				}
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp22_ = str_array;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp22__length1 = str_array_length1;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp23_ = i;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp24_ = _tmp22_[_tmp23_];
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (_tmp24_ != NULL) {
#line 3283 "gitg-stage.c"
					gchar** _tmp25_ = NULL;
					gint _tmp25__length1 = 0;
					gint _tmp26_ = 0;
					const gchar* _tmp27_ = NULL;
					gint _tmp28_ = 0;
					gint _tmp29_ = 0;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp25_ = str_array;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp25__length1 = str_array_length1;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp26_ = i;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp27_ = _tmp25_[_tmp26_];
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp28_ = strlen ((const gchar*) _tmp27_);
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp29_ = _tmp28_;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp21_ = _tmp29_;
#line 3304 "gitg-stage.c"
				} else {
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp21_ = 0;
#line 3308 "gitg-stage.c"
				}
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp30_ = len;
#line 971 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				len = _tmp30_ + _tmp21_;
#line 3314 "gitg-stage.c"
			}
		}
#line 973 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp31_ = i;
#line 973 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		if (_tmp31_ == 0) {
#line 3321 "gitg-stage.c"
			gchar* _tmp32_ = NULL;
#line 974 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp32_ = g_strdup ("");
#line 974 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			result = _tmp32_;
#line 974 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			return result;
#line 3329 "gitg-stage.c"
		}
#line 976 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp33_ = i;
#line 976 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		str_array_length1 = _tmp33_;
#line 976 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp34_ = str_array_length1;
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp35_ = len;
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp36_ = separator;
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp37_ = strlen ((const gchar*) _tmp36_);
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp38_ = _tmp37_;
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp39_ = i;
#line 977 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1));
#line 979 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp40_ = len;
#line 979 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp41_ = g_malloc (_tmp40_);
#line 979 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		res = _tmp41_;
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp42_ = res;
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp43_ = str_array;
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp43__length1 = str_array_length1;
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp44_ = _tmp43_[0];
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_);
#line 980 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		ptr = _tmp45_;
#line 3367 "gitg-stage.c"
		{
			gboolean _tmp46_ = FALSE;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			i = 1;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			_tmp46_ = TRUE;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
			while (TRUE) {
#line 3376 "gitg-stage.c"
				gint _tmp48_ = 0;
				gchar** _tmp49_ = NULL;
				gint _tmp49__length1 = 0;
				void* _tmp50_ = NULL;
				const gchar* _tmp51_ = NULL;
				void* _tmp52_ = NULL;
				const gchar* _tmp53_ = NULL;
				gchar** _tmp54_ = NULL;
				gint _tmp54__length1 = 0;
				gint _tmp55_ = 0;
				const gchar* _tmp56_ = NULL;
				void* _tmp60_ = NULL;
				void* _tmp61_ = NULL;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (!_tmp46_) {
#line 3392 "gitg-stage.c"
					gint _tmp47_ = 0;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp47_ = i;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					i = _tmp47_ + 1;
#line 3398 "gitg-stage.c"
				}
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp46_ = FALSE;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp48_ = i;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp49_ = str_array;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp49__length1 = str_array_length1;
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (!(_tmp48_ < _tmp49__length1)) {
#line 981 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					break;
#line 3412 "gitg-stage.c"
				}
#line 982 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp50_ = ptr;
#line 982 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp51_ = separator;
#line 982 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_);
#line 982 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				ptr = _tmp52_;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp54_ = str_array;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp54__length1 = str_array_length1;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp55_ = i;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp56_ = _tmp54_[_tmp55_];
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				if (_tmp56_ != NULL) {
#line 3432 "gitg-stage.c"
					gchar** _tmp57_ = NULL;
					gint _tmp57__length1 = 0;
					gint _tmp58_ = 0;
					const gchar* _tmp59_ = NULL;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp57_ = str_array;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp57__length1 = str_array_length1;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp58_ = i;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp59_ = _tmp57_[_tmp58_];
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp53_ = (const gchar*) _tmp59_;
#line 3447 "gitg-stage.c"
				} else {
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
					_tmp53_ = "";
#line 3451 "gitg-stage.c"
				}
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp60_ = ptr;
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				_tmp61_ = g_stpcpy (_tmp60_, _tmp53_);
#line 983 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
				ptr = _tmp61_;
#line 3459 "gitg-stage.c"
			}
		}
#line 986 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp62_ = res;
#line 986 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		res = NULL;
#line 986 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = (gchar*) _tmp62_;
#line 986 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 3470 "gitg-stage.c"
	} else {
		gchar* _tmp63_ = NULL;
#line 988 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp63_ = g_strdup ("");
#line 988 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = _tmp63_;
#line 988 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 3479 "gitg-stage.c"
	}
}


static void ___lambda15_ (Block22Data* _data22_, GError** error) {
	GitgStage* self;
	GitgHook* hook = NULL;
	GitgHook* _tmp0_ = NULL;
	GgitSignature* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data22_->self;
#line 247 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = gitg_hook_new ("pre-commit");
#line 247 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	hook = _tmp0_;
#line 249 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = _data22_->author;
#line 249 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_setup_commit_hook_environment (self, hook, _tmp1_);
#line 3500 "gitg-stage.c"
	{
		gint status = 0;
		GitgRepository* _tmp2_ = NULL;
		gint _tmp3_ = 0;
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp2_ = self->priv->d_repository;
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp3_ = gitg_hook_run_sync (hook, (GgitRepository*) _tmp2_, &_inner_error_);
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		status = _tmp3_;
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (_inner_error_->domain == G_SPAWN_ERROR) {
#line 3515 "gitg-stage.c"
				goto __catch90_g_spawn_error;
			}
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (hook);
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 253 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 3526 "gitg-stage.c"
		}
#line 255 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (status != 0) {
#line 3530 "gitg-stage.c"
			gchar** _tmp4_ = NULL;
			gint _tmp4__length1 = 0;
			gchar** _tmp5_ = NULL;
			gint _tmp5__length1 = 0;
			gchar** _tmp6_ = NULL;
			gint _tmp6__length1 = 0;
			gchar* _tmp7_ = NULL;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp4_ = gitg_hook_get_output (hook, &_tmp4__length1);
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp5_ = _tmp4_;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp5__length1 = _tmp4__length1;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp6_ = _tmp5_;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp6__length1 = _tmp5__length1;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp7_ = _vala_g_strjoinv ("\n", _tmp6_, _tmp5__length1);
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (_data22_->errormsg);
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data22_->errormsg = _tmp7_;
#line 257 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
#line 3556 "gitg-stage.c"
		}
	}
	goto __finally90;
	__catch90_g_spawn_error:
	{
		GError* e = NULL;
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		e = _inner_error_;
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (e);
#line 3569 "gitg-stage.c"
	}
	__finally90:
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 251 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 3580 "gitg-stage.c"
	}
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (hook);
#line 3584 "gitg-stage.c"
}


static void ____lambda15__gitg_async_thread_func (gpointer self, GError** error) {
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	___lambda15_ (self, error);
#line 3591 "gitg-stage.c"
}


static void gitg_stage_pre_commit_hook_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStagePreCommitHookData* _data_;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_pre_commit_hook_co (_data_);
#line 3605 "gitg-stage.c"
}


static gboolean gitg_stage_pre_commit_hook_co (GitgStagePreCommitHookData* _data_) {
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 3614 "gitg-stage.c"
		goto _state_0;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 3618 "gitg-stage.c"
		goto _state_1;
		default:
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 3623 "gitg-stage.c"
	}
	_state_0:
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_ = g_slice_new0 (Block22Data);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_->_ref_count_ = 1;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_->self = g_object_ref (_data_->self);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->author;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data22_->author);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_->author = _data_->_tmp0_;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_->_async_data_ = _data_;
#line 241 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_->errormsg = NULL;
#line 3644 "gitg-stage.c"
	{
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_state_ = 1;
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_async_thread (____lambda15__gitg_async_thread_func, _data_->_data22_, gitg_stage_pre_commit_hook_ready, _data_);
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 3652 "gitg-stage.c"
		_state_1:
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_async_thread_finish (_data_->_res_, &_data_->_inner_error_);
#line 245 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 3658 "gitg-stage.c"
			goto __catch89_g_error;
		}
	}
	goto __finally89;
	__catch89_g_error:
	{
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_data_->_inner_error_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_inner_error_ = NULL;
#line 3669 "gitg-stage.c"
	}
	__finally89:
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_inner_error_->domain == GITG_STAGE_ERROR) {
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_error_free (_data_->_inner_error_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			block22_data_unref (_data_->_data22_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->_data22_ = NULL;
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (_data_->_state_ == 0) {
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3688 "gitg-stage.c"
			} else {
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 3692 "gitg-stage.c"
			}
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_object_unref (_data_->_async_result);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return FALSE;
#line 3698 "gitg-stage.c"
		} else {
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			block22_data_unref (_data_->_data22_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->_data22_ = NULL;
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_data_->_inner_error_);
#line 243 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return FALSE;
#line 3710 "gitg-stage.c"
		}
	}
#line 264 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 264 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->_data22_->errormsg;
#line 264 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp1_ != NULL) {
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp2_ = NULL;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp2_ = _data_->_data22_->errormsg;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = NULL;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_PRE_COMMIT_HOOK_FAILED, _data_->_tmp2_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_inner_error_ = _data_->_tmp3_;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_inner_error_->domain == GITG_STAGE_ERROR) {
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_error_free (_data_->_inner_error_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			block22_data_unref (_data_->_data22_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->_data22_ = NULL;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (_data_->_state_ == 0) {
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3743 "gitg-stage.c"
			} else {
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 3747 "gitg-stage.c"
			}
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_object_unref (_data_->_async_result);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return FALSE;
#line 3753 "gitg-stage.c"
		} else {
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			block22_data_unref (_data_->_data22_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->_data22_ = NULL;
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_data_->_inner_error_);
#line 266 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return FALSE;
#line 3765 "gitg-stage.c"
		}
	}
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block22_data_unref (_data_->_data22_);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data22_ = NULL;
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 3776 "gitg-stage.c"
	} else {
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 3780 "gitg-stage.c"
	}
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 239 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 3786 "gitg-stage.c"
}


static Block23Data* block23_data_ref (Block23Data* _data23_) {
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data23_->_ref_count_);
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data23_;
#line 3795 "gitg-stage.c"
}


static void block23_data_unref (void * _userdata_) {
	Block23Data* _data23_;
	_data23_ = (Block23Data*) _userdata_;
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data23_->_ref_count_)) {
#line 3804 "gitg-stage.c"
		GitgStage* self;
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data23_->self;
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block23Data, _data23_);
#line 3812 "gitg-stage.c"
	}
}


static gint ___lambda16_ (Block23Data* _data23_, const gchar* path, GgitStatusFlags flags) {
	GitgStage* self;
	gint result = 0;
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data23_->self;
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (path != NULL, 0);
#line 280 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_->has_changes = TRUE;
#line 281 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = -1;
#line 281 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 3830 "gitg-stage.c"
}


static gint ____lambda16__ggit_status_callback (const gchar* path, GgitStatusFlags status_flags, gpointer self) {
	gint result;
	result = ___lambda16_ (self, path, status_flags);
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 3839 "gitg-stage.c"
}


static void _vala_GgitStatusOptions_free (GgitStatusOptions* self) {
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_boxed_free (ggit_status_options_get_type (), self);
#line 3846 "gitg-stage.c"
}


static gboolean gitg_stage_has_index_changes (GitgStage* self) {
	gboolean result = FALSE;
	Block23Data* _data23_;
	GgitStatusShow show = 0;
	GgitStatusOptions* options = NULL;
	GgitStatusOptions* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_ = g_slice_new0 (Block23Data);
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_->_ref_count_ = 1;
#line 270 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_->self = g_object_ref (self);
#line 272 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	show = GGIT_STATUS_SHOW_INDEX_ONLY;
#line 274 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = ggit_status_options_new (0, show, NULL);
#line 274 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	options = _tmp0_;
#line 275 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_->has_changes = FALSE;
#line 3873 "gitg-stage.c"
	{
		GitgRepository* _tmp1_ = NULL;
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp1_ = self->priv->d_repository;
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_repository_file_status_foreach ((GgitRepository*) _tmp1_, options, ____lambda16__ggit_status_callback, _data23_, &_inner_error_);
#line 279 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 3882 "gitg-stage.c"
			goto __catch91_g_error;
		}
	}
	goto __finally91;
	__catch91_g_error:
	{
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 3893 "gitg-stage.c"
	}
	__finally91:
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitStatusOptions_free0 (options);
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block23_data_unref (_data23_);
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data23_ = NULL;
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 277 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 3910 "gitg-stage.c"
	}
#line 285 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data23_->has_changes;
#line 285 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitStatusOptions_free0 (options);
#line 285 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block23_data_unref (_data23_);
#line 285 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data23_ = NULL;
#line 285 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 3922 "gitg-stage.c"
}


static gchar* gitg_stage_commit_msg_hook (GitgStage* self, const gchar* message, GgitSignature* author, GgitSignature* committer, GError** error) {
	gchar* result = NULL;
	GitgHook* hook = NULL;
	GitgHook* _tmp0_ = NULL;
	GitgHook* _tmp1_ = NULL;
	GitgRepository* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	GitgHook* _tmp6_ = NULL;
	GgitSignature* _tmp7_ = NULL;
	GFile* msgfile = NULL;
	GitgRepository* _tmp8_ = NULL;
	GFile* _tmp9_ = NULL;
	GFile* _tmp10_ = NULL;
	GFile* _tmp11_ = NULL;
	GFile* _tmp12_ = NULL;
	GitgHook* _tmp19_ = NULL;
	GFile* _tmp20_ = NULL;
	gchar* _tmp21_ = NULL;
	gchar* _tmp22_ = NULL;
	gint status = 0;
	gint _tmp29_ = 0;
	GError * _inner_error_ = NULL;
#line 288 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 288 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 288 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (author != NULL, NULL);
#line 288 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (committer != NULL, NULL);
#line 292 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = gitg_hook_new ("commit-msg");
#line 292 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	hook = _tmp0_;
#line 294 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = hook;
#line 294 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = self->priv->d_repository;
#line 294 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = gitg_hook_exists_in (_tmp1_, (GgitRepository*) _tmp2_);
#line 294 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!_tmp3_) {
#line 3968 "gitg-stage.c"
		const gchar* _tmp4_ = NULL;
		gchar* _tmp5_ = NULL;
#line 296 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp4_ = message;
#line 296 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp5_ = g_strdup (_tmp4_);
#line 296 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp5_;
#line 296 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 296 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 3981 "gitg-stage.c"
	}
#line 299 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = hook;
#line 299 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = author;
#line 299 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_setup_commit_hook_environment (self, _tmp6_, _tmp7_);
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = self->priv->d_repository;
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = ggit_repository_get_location ((GgitRepository*) _tmp8_);
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = _tmp9_;
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = g_file_get_child (_tmp10_, "COMMIT_EDITMSG");
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = _tmp11_;
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_tmp10_);
#line 301 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	msgfile = _tmp12_;
#line 4003 "gitg-stage.c"
	{
		GFile* _tmp13_ = NULL;
		gchar* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp13_ = msgfile;
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp14_ = g_file_get_path (_tmp13_);
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp15_ = _tmp14_;
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp16_ = message;
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_file_set_contents (_tmp15_, _tmp16_, (gssize) (-1), &_inner_error_);
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp15_);
#line 305 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4023 "gitg-stage.c"
			goto __catch92_g_error;
		}
	}
	goto __finally92;
	__catch92_g_error:
	{
		const gchar* _tmp17_ = NULL;
		gchar* _tmp18_ = NULL;
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp17_ = message;
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp18_ = g_strdup (_tmp17_);
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp18_;
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 307 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 4048 "gitg-stage.c"
	}
	__finally92:
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 303 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 4061 "gitg-stage.c"
	}
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = hook;
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp20_ = msgfile;
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = g_file_get_path (_tmp20_);
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = _tmp21_;
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_hook_add_argument (_tmp19_, _tmp22_);
#line 309 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_tmp22_);
#line 4075 "gitg-stage.c"
	{
		gint _tmp23_ = 0;
		GitgHook* _tmp24_ = NULL;
		GitgRepository* _tmp25_ = NULL;
		gint _tmp26_ = 0;
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp24_ = hook;
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = self->priv->d_repository;
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp26_ = gitg_hook_run_sync (_tmp24_, (GgitRepository*) _tmp25_, &_inner_error_);
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp23_ = _tmp26_;
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4091 "gitg-stage.c"
			goto __catch93_g_error;
		}
#line 315 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		status = _tmp23_;
#line 4096 "gitg-stage.c"
	}
	goto __finally93;
	__catch93_g_error:
	{
		const gchar* _tmp27_ = NULL;
		gchar* _tmp28_ = NULL;
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp27_ = message;
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp28_ = g_strdup (_tmp27_);
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp28_;
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 317 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 4119 "gitg-stage.c"
	}
	__finally93:
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 313 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 4132 "gitg-stage.c"
	}
#line 319 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp29_ = status;
#line 319 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp29_ != 0) {
#line 4138 "gitg-stage.c"
		GitgHook* _tmp30_ = NULL;
		gchar** _tmp31_ = NULL;
		gint _tmp31__length1 = 0;
		gchar** _tmp32_ = NULL;
		gint _tmp32__length1 = 0;
		gchar** _tmp33_ = NULL;
		gint _tmp33__length1 = 0;
		gchar* _tmp34_ = NULL;
		gchar* _tmp35_ = NULL;
		GError* _tmp36_ = NULL;
		GError* _tmp37_ = NULL;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp30_ = hook;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp31_ = gitg_hook_get_output (_tmp30_, &_tmp31__length1);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp32_ = _tmp31_;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp32__length1 = _tmp31__length1;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp33_ = _tmp32_;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp33__length1 = _tmp32__length1;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp34_ = _vala_g_strjoinv ("\n", _tmp33_, _tmp32__length1);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp35_ = _tmp34_;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp36_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_COMMIT_MSG_HOOK_FAILED, _tmp35_);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp37_ = _tmp36_;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp35_);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp33_ = (_vala_array_free (_tmp33_, _tmp33__length1, (GDestroyNotify) g_free), NULL);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp37_;
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 321 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 4184 "gitg-stage.c"
	}
	{
		gchar* newmessage = NULL;
		GFile* _tmp38_ = NULL;
		gchar* _tmp39_ = NULL;
		gchar* _tmp40_ = NULL;
		gchar* _tmp41_ = NULL;
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp38_ = msgfile;
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp39_ = g_file_get_path (_tmp38_);
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp40_ = _tmp39_;
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_file_get_contents (_tmp40_, &_tmp41_, NULL, &_inner_error_);
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (newmessage);
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		newmessage = _tmp41_;
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp40_);
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 329 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (newmessage);
#line 4210 "gitg-stage.c"
			goto __catch94_g_error;
		}
#line 330 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = newmessage;
#line 4215 "gitg-stage.c"
		{
			GFile* _tmp42_ = NULL;
			gchar* _tmp43_ = NULL;
			gchar* _tmp44_ = NULL;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp42_ = msgfile;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp43_ = g_file_get_path (_tmp42_);
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp44_ = _tmp43_;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_remove (_tmp44_);
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (_tmp44_);
#line 4230 "gitg-stage.c"
		}
#line 330 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (msgfile);
#line 330 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (hook);
#line 330 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 4238 "gitg-stage.c"
	}
	goto __finally94;
	__catch94_g_error:
	{
		GError* e = NULL;
		const gchar* _tmp45_ = NULL;
		GError* _tmp46_ = NULL;
		const gchar* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
		gchar* _tmp49_ = NULL;
		GError* _tmp50_ = NULL;
		GError* _tmp51_ = NULL;
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		e = _inner_error_;
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp45_ = _ ("Could not read commit message after running commit-msg hook: %s");
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp46_ = e;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp47_ = _tmp46_->message;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp48_ = g_strdup_printf (_tmp45_, _tmp47_);
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp49_ = _tmp48_;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp50_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_COMMIT_MSG_HOOK_FAILED, _tmp49_);
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp51_ = _tmp50_;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp49_);
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp51_;
#line 334 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (e);
#line 4275 "gitg-stage.c"
		goto __finally94;
	}
	__finally94:
	{
		GFile* _tmp52_ = NULL;
		gchar* _tmp53_ = NULL;
		gchar* _tmp54_ = NULL;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp52_ = msgfile;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp53_ = g_file_get_path (_tmp52_);
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp54_ = _tmp53_;
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_remove (_tmp54_);
#line 338 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp54_);
#line 4293 "gitg-stage.c"
	}
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_propagate_error (error, _inner_error_);
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (msgfile);
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (hook);
#line 325 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return NULL;
#line 4303 "gitg-stage.c"
}


static Block24Data* block24_data_ref (Block24Data* _data24_) {
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data24_->_ref_count_);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data24_;
#line 4312 "gitg-stage.c"
}


static void block24_data_unref (void * _userdata_) {
	Block24Data* _data24_;
	_data24_ = (Block24Data*) _userdata_;
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data24_->_ref_count_)) {
#line 4321 "gitg-stage.c"
		GitgStage* self;
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data24_->self;
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data24_->hook);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block24Data, _data24_);
#line 4331 "gitg-stage.c"
	}
}


static void __lambda17_ (Block24Data* _data24_, GObject* obj, GAsyncResult* res) {
	GitgStage* self;
	GError * _inner_error_ = NULL;
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data24_->self;
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (res != NULL);
#line 4343 "gitg-stage.c"
	{
		GAsyncResult* _tmp0_ = NULL;
#line 351 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp0_ = res;
#line 351 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_hook_run_finish (_data24_->hook, _tmp0_, &_inner_error_);
#line 351 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 4352 "gitg-stage.c"
			goto __catch95_g_error;
		}
	}
	goto __finally95;
	__catch95_g_error:
	{
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 4363 "gitg-stage.c"
	}
	__finally95:
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 349 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 4374 "gitg-stage.c"
	}
}


static void ___lambda17__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) {
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda17_ (self, source_object, res);
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block24_data_unref (self);
#line 4384 "gitg-stage.c"
}


static void gitg_stage_post_commit_hook (GitgStage* self, GgitSignature* author) {
	Block24Data* _data24_;
	GitgHook* _tmp0_ = NULL;
	GgitSignature* _tmp1_ = NULL;
	GitgRepository* _tmp2_ = NULL;
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (author != NULL);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data24_ = g_slice_new0 (Block24Data);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data24_->_ref_count_ = 1;
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data24_->self = g_object_ref (self);
#line 344 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = gitg_hook_new ("post-commit");
#line 344 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data24_->hook = _tmp0_;
#line 346 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = author;
#line 346 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_setup_commit_hook_environment (self, _data24_->hook, _tmp1_);
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = self->priv->d_repository;
#line 348 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_hook_run (_data24_->hook, (GgitRepository*) _tmp2_, ___lambda17__gasync_ready_callback, block24_data_ref (_data24_));
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block24_data_unref (_data24_);
#line 342 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data24_ = NULL;
#line 4419 "gitg-stage.c"
}


static gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gchar* _result_ = NULL;
	gint _tmp0_ = 0;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
#line 900 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 900 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 901 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 901 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 901 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 901 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 903 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 903 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 4446 "gitg-stage.c"
		gchar* _tmp4_ = NULL;
#line 904 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 904 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 904 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 4454 "gitg-stage.c"
	} else {
#line 906 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		result = -1;
#line 906 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		return result;
#line 4460 "gitg-stage.c"
	}
}


static gchar* string_slice (const gchar* self, glong start, glong end) {
	gchar* result = NULL;
	glong string_length = 0L;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	glong _tmp2_ = 0L;
	glong _tmp5_ = 0L;
	gboolean _tmp8_ = FALSE;
	glong _tmp9_ = 0L;
	gboolean _tmp12_ = FALSE;
	glong _tmp13_ = 0L;
	glong _tmp16_ = 0L;
	glong _tmp17_ = 0L;
	glong _tmp18_ = 0L;
	glong _tmp19_ = 0L;
	glong _tmp20_ = 0L;
	gchar* _tmp21_ = NULL;
#line 1230 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1231 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp0_ = strlen (self);
#line 1231 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 1231 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	string_length = (glong) _tmp1_;
#line 1232 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp2_ = start;
#line 1232 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp2_ < ((glong) 0)) {
#line 4494 "gitg-stage.c"
		glong _tmp3_ = 0L;
		glong _tmp4_ = 0L;
#line 1233 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp3_ = string_length;
#line 1233 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp4_ = start;
#line 1233 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		start = _tmp3_ + _tmp4_;
#line 4503 "gitg-stage.c"
	}
#line 1235 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp5_ = end;
#line 1235 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp5_ < ((glong) 0)) {
#line 4509 "gitg-stage.c"
		glong _tmp6_ = 0L;
		glong _tmp7_ = 0L;
#line 1236 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp6_ = string_length;
#line 1236 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp7_ = end;
#line 1236 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		end = _tmp6_ + _tmp7_;
#line 4518 "gitg-stage.c"
	}
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp9_ = start;
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp9_ >= ((glong) 0)) {
#line 4524 "gitg-stage.c"
		glong _tmp10_ = 0L;
		glong _tmp11_ = 0L;
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp10_ = start;
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp11_ = string_length;
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp10_ <= _tmp11_;
#line 4533 "gitg-stage.c"
	} else {
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp8_ = FALSE;
#line 4537 "gitg-stage.c"
	}
#line 1238 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp8_, NULL);
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp13_ = end;
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	if (_tmp13_ >= ((glong) 0)) {
#line 4545 "gitg-stage.c"
		glong _tmp14_ = 0L;
		glong _tmp15_ = 0L;
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp14_ = end;
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp15_ = string_length;
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp12_ = _tmp14_ <= _tmp15_;
#line 4554 "gitg-stage.c"
	} else {
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
		_tmp12_ = FALSE;
#line 4558 "gitg-stage.c"
	}
#line 1239 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp12_, NULL);
#line 1240 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp16_ = start;
#line 1240 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp17_ = end;
#line 1240 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	g_return_val_if_fail (_tmp16_ <= _tmp17_, NULL);
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp18_ = start;
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp19_ = end;
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp20_ = start;
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	_tmp21_ = g_strndup (((gchar*) self) + _tmp18_, (gsize) (_tmp19_ - _tmp20_));
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	result = _tmp21_;
#line 1241 "/opt/gnome/share/vala-0.28/vapi/glib-2.0.vapi"
	return result;
#line 4580 "gitg-stage.c"
}


static gchar* gitg_stage_get_subject (GitgStage* self, const gchar* message) {
	gchar* result = NULL;
	gint nlpos = 0;
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
#line 356 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 356 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_val_if_fail (message != NULL, NULL);
#line 358 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = message;
#line 358 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = string_index_of (_tmp0_, "\n", 0);
#line 358 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	nlpos = _tmp1_;
#line 360 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = nlpos;
#line 360 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp2_ == (-1)) {
#line 4604 "gitg-stage.c"
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 362 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp3_ = message;
#line 362 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp4_ = g_strdup (_tmp3_);
#line 362 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp4_;
#line 362 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 4615 "gitg-stage.c"
	} else {
		const gchar* _tmp5_ = NULL;
		gint _tmp6_ = 0;
		gchar* _tmp7_ = NULL;
#line 366 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp5_ = message;
#line 366 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = nlpos;
#line 366 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = string_slice (_tmp5_, (glong) 0, (glong) _tmp6_);
#line 366 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		result = _tmp7_;
#line 366 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return result;
#line 4630 "gitg-stage.c"
	}
}


static void _vala_GgitOId_free (GgitOId* self) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_boxed_free (ggit_oid_get_type (), self);
#line 4638 "gitg-stage.c"
}


static void gitg_stage_commit_data_free (gpointer _data) {
	GitgStageCommitData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageCommitData, _data_);
#line 4651 "gitg-stage.c"
}


void gitg_stage_commit (GitgStage* self, const gchar* message, GgitSignature* author, GgitSignature* committer, GitgStageCommitOptions options, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageCommitData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GgitSignature* _tmp3_ = NULL;
	GgitSignature* _tmp4_ = NULL;
	GgitSignature* _tmp5_ = NULL;
	GgitSignature* _tmp6_ = NULL;
	GitgStageCommitOptions _tmp7_ = 0;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageCommitData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_commit);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_commit_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = message;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->message);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->message = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = author;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->author);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->author = _tmp4_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = committer;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = _g_object_ref0 (_tmp5_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->committer);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->committer = _tmp6_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = options;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->options = _tmp7_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_commit_co (_data_);
#line 4705 "gitg-stage.c"
}


GgitOId* gitg_stage_commit_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitOId* result;
	GitgStageCommitData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 4716 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 4726 "gitg-stage.c"
}


static Block25Data* block25_data_ref (Block25Data* _data25_) {
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data25_->_ref_count_);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data25_;
#line 4735 "gitg-stage.c"
}


static void block25_data_unref (void * _userdata_) {
	Block25Data* _data25_;
	_data25_ = (Block25Data*) _userdata_;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data25_->_ref_count_)) {
#line 4744 "gitg-stage.c"
		GitgStage* self;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data25_->self;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (_data25_->ret);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_data25_->message);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data25_->author);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data25_->committer);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block25Data, _data25_);
#line 4760 "gitg-stage.c"
	}
}


static GgitOId* _vala_GgitOId_copy (GgitOId* self) {
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return g_boxed_copy (ggit_oid_get_type (), self);
#line 4768 "gitg-stage.c"
}


static gpointer __vala_GgitOId_copy0 (gpointer self) {
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self ? _vala_GgitOId_copy (self) : NULL;
#line 4775 "gitg-stage.c"
}


static void __lambda18_ (Block25Data* _data25_, GgitIndex* index, GError** error) {
	GitgStage* self;
	gboolean _tmp0_ = FALSE;
	GgitConfig* conf = NULL;
	GitgRepository* _tmp3_ = NULL;
	GgitConfig* _tmp4_ = NULL;
	gchar* emsg = NULL;
	const gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	GitgStageCommitOptions _tmp7_ = 0;
	gchar* encoding = NULL;
	GgitConfig* _tmp11_ = NULL;
	const gchar* _tmp12_ = NULL;
	gchar* _tmp13_ = NULL;
	gchar* _tmp14_ = NULL;
	GgitOId* treeoid = NULL;
	GgitIndex* _tmp21_ = NULL;
	GgitOId* _tmp22_ = NULL;
	GitgRef* head = NULL;
	GitgRepository* _tmp23_ = NULL;
	GitgRef* _tmp24_ = NULL;
	GgitOId* headoid = NULL;
	gboolean always_update = FALSE;
	gchar* reflogmsg = NULL;
	gchar* _tmp64_ = NULL;
	const gchar* _tmp67_ = NULL;
	const gchar* _tmp68_ = NULL;
	gchar* _tmp69_ = NULL;
	gchar* _tmp70_ = NULL;
	gchar* _tmp71_ = NULL;
	gchar* _tmp72_ = NULL;
	gchar* _tmp73_ = NULL;
	GitgRef* _tmp84_ = NULL;
	GgitRefType _tmp85_ = 0;
	GgitSignature* _tmp98_ = NULL;
	GError * _inner_error_ = NULL;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data25_->self;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 381 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!_data25_->amend) {
#line 4821 "gitg-stage.c"
		gboolean _tmp1_ = FALSE;
#line 381 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp1_ = gitg_stage_has_index_changes (self);
#line 381 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp0_ = !_tmp1_;
#line 4827 "gitg-stage.c"
	} else {
#line 381 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp0_ = FALSE;
#line 4831 "gitg-stage.c"
	}
#line 381 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp0_) {
#line 4835 "gitg-stage.c"
		GError* _tmp2_ = NULL;
#line 383 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp2_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_NOTHING_TO_COMMIT, "Nothing to commit");
#line 383 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp2_;
#line 383 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 383 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 4845 "gitg-stage.c"
	}
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = self->priv->d_repository;
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ggit_repository_get_config ((GgitRepository*) _tmp3_, &_inner_error_);
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	conf = _tmp4_;
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 387 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 4859 "gitg-stage.c"
	}
#line 389 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = _data25_->message;
#line 389 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 389 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	emsg = _tmp6_;
#line 391 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = _data25_->options;
#line 391 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if ((_tmp7_ & GITG_STAGE_COMMIT_OPTIONS_SIGN_OFF) != 0) {
#line 4871 "gitg-stage.c"
		const gchar* _tmp8_ = NULL;
		GgitSignature* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
#line 393 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp8_ = emsg;
#line 393 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp9_ = _data25_->committer;
#line 393 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp10_ = gitg_stage_message_with_sign_off (self, _tmp8_, _tmp9_);
#line 393 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 393 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		emsg = _tmp10_;
#line 4885 "gitg-stage.c"
	}
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = conf;
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = emsg;
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = gitg_stage_convert_message_to_encoding (self, _tmp11_, _tmp12_, &_tmp13_);
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (encoding);
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	encoding = _tmp13_;
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (emsg);
#line 398 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	emsg = _tmp14_;
#line 400 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!_data25_->skip_hooks) {
#line 4903 "gitg-stage.c"
		gchar* _tmp15_ = NULL;
		const gchar* _tmp16_ = NULL;
		GgitSignature* _tmp17_ = NULL;
		GgitSignature* _tmp18_ = NULL;
		gchar* _tmp19_ = NULL;
		gchar* _tmp20_ = NULL;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp16_ = emsg;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp17_ = _data25_->author;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp18_ = _data25_->committer;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp19_ = gitg_stage_commit_msg_hook (self, _tmp16_, _tmp17_, _tmp18_, &_inner_error_);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp15_ = _tmp19_;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 4932 "gitg-stage.c"
		}
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp20_ = _tmp15_;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp15_ = NULL;
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 402 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		emsg = _tmp20_;
#line 400 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_tmp15_);
#line 4944 "gitg-stage.c"
	}
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = index;
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = ggit_index_write_tree (_tmp21_, &_inner_error_);
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	treeoid = _tmp22_;
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (encoding);
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (conf);
#line 405 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 4964 "gitg-stage.c"
	}
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp23_ = self->priv->d_repository;
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp24_ = gitg_repository_lookup_reference (_tmp23_, "HEAD", &_inner_error_);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head = _tmp24_;
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (treeoid);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (encoding);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (conf);
#line 408 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 4986 "gitg-stage.c"
	}
#line 410 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	headoid = NULL;
#line 4990 "gitg-stage.c"
	{
		GgitRef* _tmp25_ = NULL;
		GitgRef* _tmp26_ = NULL;
		GgitRef* _tmp27_ = NULL;
		GgitRef* _tmp28_ = NULL;
		GgitRef* _tmp29_ = NULL;
		GgitOId* _tmp30_ = NULL;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp26_ = head;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp27_ = ggit_ref_resolve ((GgitRef*) _tmp26_, &_inner_error_);
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = _tmp27_;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5006 "gitg-stage.c"
			goto __catch96_g_error;
		}
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp28_ = _tmp25_;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = NULL;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp29_ = _tmp28_;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp30_ = ggit_ref_get_target (_tmp29_);
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (headoid);
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		headoid = _tmp30_;
#line 415 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_tmp29_);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_tmp25_);
#line 5025 "gitg-stage.c"
	}
	goto __finally96;
	__catch96_g_error:
	{
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 5034 "gitg-stage.c"
	}
	__finally96:
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (headoid);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (treeoid);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (encoding);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (conf);
#line 412 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 5055 "gitg-stage.c"
	}
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (!_data25_->amend) {
#line 5059 "gitg-stage.c"
		GgitOId** parents = NULL;
		gint parents_length1 = 0;
		gint _parents_size_ = 0;
		GgitOId* _tmp31_ = NULL;
		GgitOId* _tmp36_ = NULL;
		GitgRepository* _tmp37_ = NULL;
		GgitSignature* _tmp38_ = NULL;
		GgitSignature* _tmp39_ = NULL;
		const gchar* _tmp40_ = NULL;
		const gchar* _tmp41_ = NULL;
		GgitOId* _tmp42_ = NULL;
		GgitOId** _tmp43_ = NULL;
		gint _tmp43__length1 = 0;
		GgitOId* _tmp44_ = NULL;
		GgitOId* _tmp45_ = NULL;
#line 422 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp31_ = headoid;
#line 422 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_tmp31_ == NULL) {
#line 5079 "gitg-stage.c"
			GgitOId** _tmp32_ = NULL;
#line 424 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp32_ = g_new0 (GgitOId*, 0 + 1);
#line 424 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents = (_vala_array_free (parents, parents_length1, (GDestroyNotify) _vala_GgitOId_free), NULL);
#line 424 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents = _tmp32_;
#line 424 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents_length1 = 0;
#line 424 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_parents_size_ = parents_length1;
#line 5091 "gitg-stage.c"
		} else {
			GgitOId* _tmp33_ = NULL;
			GgitOId* _tmp34_ = NULL;
			GgitOId** _tmp35_ = NULL;
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp33_ = headoid;
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp34_ = __vala_GgitOId_copy0 (_tmp33_);
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp35_ = g_new0 (GgitOId*, 1 + 1);
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp35_[0] = _tmp34_;
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents = (_vala_array_free (parents, parents_length1, (GDestroyNotify) _vala_GgitOId_free), NULL);
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents = _tmp35_;
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents_length1 = 1;
#line 428 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_parents_size_ = parents_length1;
#line 5112 "gitg-stage.c"
		}
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp37_ = self->priv->d_repository;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp38_ = _data25_->author;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp39_ = _data25_->committer;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp40_ = encoding;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp41_ = emsg;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp42_ = treeoid;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp43_ = parents;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp43__length1 = parents_length1;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp44_ = ggit_repository_create_commit_from_ids ((GgitRepository*) _tmp37_, "HEAD", _tmp38_, _tmp39_, _tmp40_, _tmp41_, _tmp42_, _tmp43_, _tmp43__length1, &_inner_error_);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp36_ = _tmp44_;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			parents = (_vala_array_free (parents, parents_length1, (GDestroyNotify) _vala_GgitOId_free), NULL);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (headoid);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (treeoid);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 5154 "gitg-stage.c"
		}
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp45_ = _tmp36_;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp36_ = NULL;
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (_data25_->ret);
#line 431 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data25_->ret = _tmp45_;
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (_tmp36_);
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		parents = (_vala_array_free (parents, parents_length1, (GDestroyNotify) _vala_GgitOId_free), NULL);
#line 5168 "gitg-stage.c"
	} else {
		GgitCommit* headcommit = NULL;
		GitgRepository* _tmp46_ = NULL;
		GgitOId* _tmp47_ = NULL;
		gpointer _tmp48_ = NULL;
		GgitTree* tree = NULL;
		GitgRepository* _tmp49_ = NULL;
		GgitOId* _tmp50_ = NULL;
		gpointer _tmp51_ = NULL;
		GgitOId* _tmp52_ = NULL;
		GgitCommit* _tmp53_ = NULL;
		GgitSignature* _tmp54_ = NULL;
		GgitSignature* _tmp55_ = NULL;
		const gchar* _tmp56_ = NULL;
		const gchar* _tmp57_ = NULL;
		GgitTree* _tmp58_ = NULL;
		GgitOId* _tmp59_ = NULL;
		GgitOId* _tmp60_ = NULL;
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp46_ = self->priv->d_repository;
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp47_ = headoid;
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp48_ = gitg_repository_lookup (_tmp46_, ggit_commit_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp47_, &_inner_error_);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		headcommit = (GgitCommit*) _tmp48_;
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (headoid);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (treeoid);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 441 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 5213 "gitg-stage.c"
		}
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp49_ = self->priv->d_repository;
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp50_ = treeoid;
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp51_ = gitg_repository_lookup (_tmp49_, ggit_tree_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp50_, &_inner_error_);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		tree = (GgitTree*) _tmp51_;
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (headcommit);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (headoid);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (treeoid);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 442 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 5243 "gitg-stage.c"
		}
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp53_ = headcommit;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp54_ = _data25_->author;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp55_ = _data25_->committer;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp56_ = encoding;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp57_ = emsg;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp58_ = tree;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp59_ = ggit_commit_amend (_tmp53_, "HEAD", _tmp54_, _tmp55_, _tmp56_, _tmp57_, _tmp58_, &_inner_error_);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp52_ = _tmp59_;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (tree);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (headcommit);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (headoid);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (treeoid);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 5283 "gitg-stage.c"
		}
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp60_ = _tmp52_;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp52_ = NULL;
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (_data25_->ret);
#line 444 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data25_->ret = _tmp60_;
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (_tmp52_);
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (tree);
#line 418 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (headcommit);
#line 5299 "gitg-stage.c"
	}
#line 452 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	always_update = FALSE;
#line 5303 "gitg-stage.c"
	{
		gboolean _tmp61_ = FALSE;
		GgitConfig* _tmp62_ = NULL;
		gboolean _tmp63_ = FALSE;
#line 456 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp62_ = conf;
#line 456 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp63_ = ggit_config_get_bool (_tmp62_, "core.logAllRefUpdates", &_inner_error_);
#line 456 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp61_ = _tmp63_;
#line 456 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5316 "gitg-stage.c"
			goto __catch97_g_error;
		}
#line 456 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		always_update = _tmp61_;
#line 5321 "gitg-stage.c"
	}
	goto __finally97;
	__catch97_g_error:
	{
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 5330 "gitg-stage.c"
	}
	__finally97:
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (headoid);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (treeoid);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (encoding);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (conf);
#line 454 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 5351 "gitg-stage.c"
	}
#line 459 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp64_ = g_strdup ("commit");
#line 459 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	reflogmsg = _tmp64_;
#line 461 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data25_->amend) {
#line 5359 "gitg-stage.c"
		const gchar* _tmp65_ = NULL;
		gchar* _tmp66_ = NULL;
#line 463 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp65_ = reflogmsg;
#line 463 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp66_ = g_strconcat (_tmp65_, " (amend)", NULL);
#line 463 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (reflogmsg);
#line 463 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		reflogmsg = _tmp66_;
#line 5370 "gitg-stage.c"
	}
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp67_ = reflogmsg;
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp68_ = _data25_->message;
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp69_ = gitg_stage_get_subject (self, _tmp68_);
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp70_ = _tmp69_;
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp71_ = g_strconcat (": ", _tmp70_, NULL);
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp72_ = _tmp71_;
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp73_ = g_strconcat (_tmp67_, _tmp72_, NULL);
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (reflogmsg);
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	reflogmsg = _tmp73_;
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_tmp72_);
#line 466 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_tmp70_);
#line 5394 "gitg-stage.c"
	{
		gboolean _tmp74_ = FALSE;
		gboolean _tmp75_ = FALSE;
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp75_ = always_update;
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_tmp75_) {
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp74_ = TRUE;
#line 5404 "gitg-stage.c"
		} else {
			GitgRef* _tmp76_ = NULL;
			gboolean _tmp77_ = FALSE;
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp76_ = head;
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp77_ = ggit_ref_has_log ((GgitRef*) _tmp76_);
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp74_ = _tmp77_;
#line 5414 "gitg-stage.c"
		}
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_tmp74_) {
#line 5418 "gitg-stage.c"
			GgitReflog* reflog = NULL;
			GitgRef* _tmp78_ = NULL;
			GgitReflog* _tmp79_ = NULL;
			GgitReflog* _tmp80_ = NULL;
			GgitSignature* _tmp81_ = NULL;
			const gchar* _tmp82_ = NULL;
			GgitReflog* _tmp83_ = NULL;
#line 473 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp78_ = head;
#line 473 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp79_ = ggit_ref_get_log ((GgitRef*) _tmp78_, &_inner_error_);
#line 473 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			reflog = _tmp79_;
#line 473 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5434 "gitg-stage.c"
				goto __catch98_g_error;
			}
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp80_ = reflog;
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp81_ = _data25_->committer;
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp82_ = reflogmsg;
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			ggit_reflog_append (_tmp80_, _data25_->ret, _tmp81_, _tmp82_, &_inner_error_);
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 474 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_ggit_reflog_unref0 (reflog);
#line 5449 "gitg-stage.c"
				goto __catch98_g_error;
			}
#line 475 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp83_ = reflog;
#line 475 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			ggit_reflog_write (_tmp83_, &_inner_error_);
#line 475 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 475 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_ggit_reflog_unref0 (reflog);
#line 5460 "gitg-stage.c"
				goto __catch98_g_error;
			}
#line 471 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_ggit_reflog_unref0 (reflog);
#line 5465 "gitg-stage.c"
		}
	}
	goto __finally98;
	__catch98_g_error:
	{
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 5475 "gitg-stage.c"
	}
	__finally98:
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (reflogmsg);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (headoid);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (treeoid);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (encoding);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (emsg);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (conf);
#line 469 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 5498 "gitg-stage.c"
	}
#line 479 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp84_ = head;
#line 479 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp85_ = ggit_ref_get_reference_type ((GgitRef*) _tmp84_);
#line 479 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp85_ == GGIT_REF_SYMBOLIC) {
#line 5506 "gitg-stage.c"
		{
			GgitRef* resolved = NULL;
			GitgRef* _tmp86_ = NULL;
			GgitRef* _tmp87_ = NULL;
			gboolean _tmp88_ = FALSE;
			gboolean _tmp89_ = FALSE;
#line 484 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp86_ = head;
#line 484 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp87_ = ggit_ref_resolve ((GgitRef*) _tmp86_, &_inner_error_);
#line 484 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			resolved = _tmp87_;
#line 484 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 5521 "gitg-stage.c"
				goto __catch99_g_error;
			}
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp89_ = always_update;
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (_tmp89_) {
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp88_ = TRUE;
#line 5530 "gitg-stage.c"
			} else {
				GgitRef* _tmp90_ = NULL;
				gboolean _tmp91_ = FALSE;
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp90_ = resolved;
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp91_ = ggit_ref_has_log (_tmp90_);
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp88_ = _tmp91_;
#line 5540 "gitg-stage.c"
			}
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (_tmp88_) {
#line 5544 "gitg-stage.c"
				GgitReflog* reflog = NULL;
				GgitRef* _tmp92_ = NULL;
				GgitReflog* _tmp93_ = NULL;
				GgitReflog* _tmp94_ = NULL;
				GgitSignature* _tmp95_ = NULL;
				const gchar* _tmp96_ = NULL;
				GgitReflog* _tmp97_ = NULL;
#line 488 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp92_ = resolved;
#line 488 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp93_ = ggit_ref_get_log (_tmp92_, &_inner_error_);
#line 488 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				reflog = _tmp93_;
#line 488 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 488 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_g_object_unref0 (resolved);
#line 5562 "gitg-stage.c"
					goto __catch99_g_error;
				}
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp94_ = reflog;
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp95_ = _data25_->committer;
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp96_ = reflogmsg;
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				ggit_reflog_append (_tmp94_, _data25_->ret, _tmp95_, _tmp96_, &_inner_error_);
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_ggit_reflog_unref0 (reflog);
#line 490 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_g_object_unref0 (resolved);
#line 5579 "gitg-stage.c"
					goto __catch99_g_error;
				}
#line 491 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp97_ = reflog;
#line 491 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				ggit_reflog_write (_tmp97_, &_inner_error_);
#line 491 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 491 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_ggit_reflog_unref0 (reflog);
#line 491 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_g_object_unref0 (resolved);
#line 5592 "gitg-stage.c"
					goto __catch99_g_error;
				}
#line 486 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_ggit_reflog_unref0 (reflog);
#line 5597 "gitg-stage.c"
			}
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (resolved);
#line 5601 "gitg-stage.c"
		}
		goto __finally99;
		__catch99_g_error:
		{
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_inner_error_ = NULL;
#line 5610 "gitg-stage.c"
		}
		__finally99:
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (reflogmsg);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (headoid);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (head);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			__vala_GgitOId_free0 (treeoid);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (encoding);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_free0 (emsg);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (conf);
#line 482 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 5633 "gitg-stage.c"
		}
	}
#line 496 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (self->priv->d_head_tree);
#line 496 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self->priv->d_head_tree = NULL;
#line 499 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp98_ = _data25_->author;
#line 499 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_post_commit_hook (self, _tmp98_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (reflogmsg);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (headoid);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (head);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (treeoid);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (encoding);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (emsg);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (conf);
#line 5658 "gitg-stage.c"
}


static void ___lambda18__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda18_ (self, index, error);
#line 5665 "gitg-stage.c"
}


static void gitg_stage_commit_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageCommitData* _data_;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_commit_co (_data_);
#line 5679 "gitg-stage.c"
}


static gboolean gitg_stage_commit_co (GitgStageCommitData* _data_) {
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 5688 "gitg-stage.c"
		goto _state_0;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 5692 "gitg-stage.c"
		goto _state_1;
		default:
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 5697 "gitg-stage.c"
	}
	_state_0:
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_ = g_slice_new0 (Block25Data);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->_ref_count_ = 1;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->self = g_object_ref (_data_->self);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->message;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->_data25_->message);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->message = _data_->_tmp0_;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->author;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data25_->author);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->author = _data_->_tmp1_;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->committer;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data25_->committer);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->committer = _data_->_tmp2_;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = 0;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->options;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->options = _data_->_tmp3_;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->_async_data_ = _data_;
#line 375 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->ret = NULL;
#line 377 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = 0;
#line 377 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_data25_->options;
#line 377 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->skip_hooks = (_data_->_tmp4_ & GITG_STAGE_COMMIT_OPTIONS_SKIP_HOOKS) != 0;
#line 378 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = 0;
#line 378 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_data25_->options;
#line 378 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_->amend = (_data_->_tmp5_ & GITG_STAGE_COMMIT_OPTIONS_AMEND) != 0;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda18__gitg_stage_with_index_func, _data_->_data25_, gitg_stage_commit_ready, _data_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 5758 "gitg-stage.c"
	_state_1:
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block25_data_unref (_data_->_data25_);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data25_ = NULL;
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 5776 "gitg-stage.c"
		} else {
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 5780 "gitg-stage.c"
		}
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 380 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 5786 "gitg-stage.c"
	}
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = __vala_GgitOId_copy0 (_data_->_data25_->ret);
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp6_;
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block25_data_unref (_data_->_data25_);
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_ = NULL;
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 5802 "gitg-stage.c"
	} else {
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 5806 "gitg-stage.c"
	}
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 502 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block25_data_unref (_data_->_data25_);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data25_ = NULL;
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 5820 "gitg-stage.c"
	} else {
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 5824 "gitg-stage.c"
	}
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 370 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 5830 "gitg-stage.c"
}


static void gitg_stage_revert_data_free (gpointer _data) {
	GitgStageRevertData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageRevertData, _data_);
#line 5841 "gitg-stage.c"
}


void gitg_stage_revert (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageRevertData* _data_;
	GitgStage* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageRevertData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_revert);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_revert_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = file;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->file);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->file = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_co (_data_);
#line 5870 "gitg-stage.c"
}


void gitg_stage_revert_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageRevertData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 5880 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 5884 "gitg-stage.c"
}


/**
 * Revert working directory changes.
 *
 * @param file the file to revert.
 *
 * Revert a file to the version currently recorded in HEAD. This will delete
 * any modifications done in the current working directory to this file,
 * so use with care! Note that this only affects the working directory,
 * not the index.
 */
static Block26Data* block26_data_ref (Block26Data* _data26_) {
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data26_->_ref_count_);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data26_;
#line 5903 "gitg-stage.c"
}


static void block26_data_unref (void * _userdata_) {
	Block26Data* _data26_;
	_data26_ = (Block26Data*) _userdata_;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data26_->_ref_count_)) {
#line 5912 "gitg-stage.c"
		GitgStage* self;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data26_->self;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data26_->tree);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data26_->file);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block26Data, _data26_);
#line 5924 "gitg-stage.c"
	}
}


static void gitg_stage_revert_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageRevertData* _data_;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_co (_data_);
#line 5939 "gitg-stage.c"
}


static void __lambda19_ (Block26Data* _data26_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GFile* wd = NULL;
	GitgRepository* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gchar* path = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GgitTreeEntry* entry = NULL;
	GgitTree* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GgitTreeEntry* _tmp7_ = NULL;
	GgitOId* id = NULL;
	GgitTreeEntry* _tmp8_ = NULL;
	GgitOId* _tmp9_ = NULL;
	GgitBlob* blob = NULL;
	GitgRepository* _tmp10_ = NULL;
	GgitOId* _tmp11_ = NULL;
	gpointer _tmp12_ = NULL;
	GFileOutputStream* stream = NULL;
	GFile* _tmp13_ = NULL;
	GFileOutputStream* _tmp14_ = NULL;
	GFileOutputStream* _tmp15_ = NULL;
	GgitBlob* _tmp16_ = NULL;
	gsize _tmp17_;
	guint8* _tmp18_ = NULL;
	GFileOutputStream* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data26_->self;
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 521 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 521 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _tmp0_);
#line 521 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	wd = _tmp1_;
#line 522 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = wd;
#line 522 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _data26_->file;
#line 522 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = g_file_get_relative_path (_tmp2_, _tmp3_);
#line 522 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	path = _tmp4_;
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = _data26_->tree;
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = path;
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = ggit_tree_get_by_path (_tmp5_, _tmp6_, &_inner_error_);
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp7_;
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 525 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6008 "gitg-stage.c"
	}
#line 526 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = entry;
#line 526 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = ggit_tree_entry_get_id (_tmp8_);
#line 526 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	id = _tmp9_;
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = self->priv->d_repository;
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = id;
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = gitg_repository_lookup (_tmp10_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp11_, &_inner_error_);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	blob = (GgitBlob*) _tmp12_;
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 529 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6038 "gitg-stage.c"
	}
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = _data26_->file;
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = g_file_replace (_tmp13_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	stream = _tmp14_;
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (blob);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 531 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6062 "gitg-stage.c"
	}
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = stream;
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp16_ = blob;
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = ggit_blob_get_raw_content (_tmp16_, &_tmp17_);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_output_stream_write_all ((GOutputStream*) _tmp15_, _tmp18_, (gsize) _tmp17_, NULL, NULL, &_inner_error_);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (stream);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (blob);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 533 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6090 "gitg-stage.c"
	}
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = stream;
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_output_stream_close ((GOutputStream*) _tmp19_, NULL, &_inner_error_);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (stream);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (blob);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 534 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6114 "gitg-stage.c"
	}
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (stream);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (blob);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (id);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_tree_entry_unref0 (entry);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (path);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (wd);
#line 6128 "gitg-stage.c"
}


static void ___lambda19__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda19_ (self, index, error);
#line 6135 "gitg-stage.c"
}


static gboolean gitg_stage_revert_co (GitgStageRevertData* _data_) {
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 6144 "gitg-stage.c"
		goto _state_0;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 6148 "gitg-stage.c"
		goto _state_1;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 2:
#line 6152 "gitg-stage.c"
		goto _state_2;
		default:
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 6157 "gitg-stage.c"
	}
	_state_0:
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_ = g_slice_new0 (Block26Data);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_->_ref_count_ = 1;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_->self = g_object_ref (_data_->self);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->file;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data26_->file);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_->file = _data_->_tmp0_;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_->_async_data_ = _data_;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree (_data_->self, gitg_stage_revert_ready, _data_);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 6182 "gitg-stage.c"
	_state_1:
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = gitg_stage_get_head_tree_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_->tree = _data_->_tmp1_;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block26_data_unref (_data_->_data26_);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data26_ = NULL;
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 6204 "gitg-stage.c"
		} else {
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 6208 "gitg-stage.c"
		}
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 517 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 6214 "gitg-stage.c"
	}
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 2;
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda19__gitg_stage_with_index_func, _data_->_data26_, gitg_stage_revert_ready, _data_);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 6222 "gitg-stage.c"
	_state_2:
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block26_data_unref (_data_->_data26_);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data26_ = NULL;
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 6240 "gitg-stage.c"
		} else {
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 6244 "gitg-stage.c"
		}
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 519 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 6250 "gitg-stage.c"
	}
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block26_data_unref (_data_->_data26_);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data26_ = NULL;
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 6260 "gitg-stage.c"
	} else {
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 6264 "gitg-stage.c"
	}
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 515 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 6270 "gitg-stage.c"
}


static void gitg_stage_revert_path_data_free (gpointer _data) {
	GitgStageRevertPathData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageRevertPathData, _data_);
#line 6283 "gitg-stage.c"
}


void gitg_stage_revert_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageRevertPathData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageRevertPathData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_revert_path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_revert_path_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = path;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->path = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_path_co (_data_);
#line 6312 "gitg-stage.c"
}


void gitg_stage_revert_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageRevertPathData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6322 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 6326 "gitg-stage.c"
}


/**
 * Revert working directory changes.
 *
 * @param path path relative to the working directory.
 *
 * Revert a path to the version currently recorded in HEAD. This will delete
 * any modifications done in the current working directory to this file,
 * so use with care! Note that this only affects the working directory,
 * not the index.
 */
static void gitg_stage_revert_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageRevertPathData* _data_;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_path_co (_data_);
#line 6350 "gitg-stage.c"
}


static gboolean gitg_stage_revert_path_co (GitgStageRevertPathData* _data_) {
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 6359 "gitg-stage.c"
		goto _state_0;
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 6363 "gitg-stage.c"
		goto _state_1;
		default:
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 6368 "gitg-stage.c"
	}
	_state_0:
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->self->priv->d_repository;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp0_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->path;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = g_file_resolve_relative_path (_data_->_tmp2_, _data_->_tmp3_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert (_data_->self, _data_->_tmp5_, gitg_stage_revert_path_ready, _data_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 6401 "gitg-stage.c"
	_state_1:
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp5_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp2_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 6419 "gitg-stage.c"
		} else {
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 6423 "gitg-stage.c"
		}
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 550 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 6429 "gitg-stage.c"
	}
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 6435 "gitg-stage.c"
	} else {
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 6439 "gitg-stage.c"
	}
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 548 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 6445 "gitg-stage.c"
}


static void gitg_stage_revert_patch_data_free (gpointer _data) {
	GitgStageRevertPatchData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageRevertPatchData, _data_);
#line 6456 "gitg-stage.c"
}


static gpointer _gitg_patch_set_ref0 (gpointer self) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return self ? gitg_patch_set_ref (self) : NULL;
#line 6463 "gitg-stage.c"
}


void gitg_stage_revert_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageRevertPatchData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgPatchSet* _tmp1_ = NULL;
	GitgPatchSet* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageRevertPatchData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_revert_patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_revert_patch_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = patch;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _gitg_patch_set_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->patch = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_patch_co (_data_);
#line 6492 "gitg-stage.c"
}


void gitg_stage_revert_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageRevertPatchData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6502 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 6506 "gitg-stage.c"
}


/**
 * Revert a patch in the working directory.
 *
 * @param patch the patch to revert.
 *
 * Revert a provided patch from the working directory. The patch should
 * contain changes of the file in the current working directory to the contents
 * of the index (i.e. as obtained from diff_workdir)
 */
static Block27Data* block27_data_ref (Block27Data* _data27_) {
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data27_->_ref_count_);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data27_;
#line 6524 "gitg-stage.c"
}


static void block27_data_unref (void * _userdata_) {
	Block27Data* _data27_;
	_data27_ = (Block27Data*) _userdata_;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data27_->_ref_count_)) {
#line 6533 "gitg-stage.c"
		GitgStage* self;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data27_->self;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data27_->workdirf_stream);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data27_->workdirf);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (_data27_->patch);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block27Data, _data27_);
#line 6547 "gitg-stage.c"
	}
}


static void gitg_stage_revert_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageRevertPatchData* _data_;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_revert_patch_co (_data_);
#line 6562 "gitg-stage.c"
}


static void __lambda20_ (Block27Data* _data27_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndexEntries* entries = NULL;
	GgitIndex* _tmp0_ = NULL;
	GgitIndexEntries* _tmp1_ = NULL;
	GgitIndexEntry* entry = NULL;
	GgitIndexEntries* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GgitIndexEntry* _tmp4_ = NULL;
	GgitIndexEntry* _tmp5_ = NULL;
	GgitBlob* index_blob = NULL;
	GitgRepository* _tmp9_ = NULL;
	GgitIndexEntry* _tmp10_ = NULL;
	GgitOId* _tmp11_ = NULL;
	GgitOId* _tmp12_ = NULL;
	gpointer _tmp13_ = NULL;
	GgitBlob* _tmp14_ = NULL;
	guchar* index_content = NULL;
	GgitBlob* _tmp15_ = NULL;
	gsize _tmp16_;
	guint8* _tmp17_ = NULL;
	gint index_content_length1 = 0;
	gint _index_content_size_ = 0;
	GMemoryInputStream* index_stream = NULL;
	guchar* _tmp18_ = NULL;
	gint _tmp18__length1 = 0;
	GBytes* _tmp19_ = NULL;
	GBytes* _tmp20_ = NULL;
	GMemoryInputStream* _tmp21_ = NULL;
	GMemoryInputStream* _tmp22_ = NULL;
	GitgPatchSet* reversed = NULL;
	GitgPatchSet* _tmp23_ = NULL;
	GitgPatchSet* _tmp24_ = NULL;
	GFileIOStream* out_stream = NULL;
	GFile* outf = NULL;
	GFileInputStream* _tmp41_ = NULL;
	GMemoryInputStream* _tmp42_ = NULL;
	GFileIOStream* _tmp43_ = NULL;
	GError * _inner_error_ = NULL;
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data27_->self;
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 569 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 569 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_index_get_entries (_tmp0_);
#line 569 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entries = _tmp1_;
#line 570 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = entries;
#line 570 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _data27_->workdirf;
#line 570 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ggit_index_entries_get_by_path (_tmp2_, _tmp3_, 0);
#line 570 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp4_;
#line 572 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = entry;
#line 572 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp5_ == NULL) {
#line 6627 "gitg-stage.c"
		GitgPatchSet* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = _data27_->patch;
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = _tmp6_->filename;
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp8_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_INDEX_ENTRY_NOT_FOUND, _tmp7_);
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp8_;
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 574 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6647 "gitg-stage.c"
	}
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = self->priv->d_repository;
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = entry;
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = ggit_index_entry_get_id (_tmp10_);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = _tmp11_;
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = gitg_repository_lookup (_tmp9_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp12_, &_inner_error_);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = (GgitBlob*) _tmp13_;
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_tmp12_);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_blob = _tmp14_;
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 577 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6675 "gitg-stage.c"
	}
#line 578 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = index_blob;
#line 578 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = ggit_blob_get_raw_content (_tmp15_, &_tmp16_);
#line 578 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_content = _tmp17_;
#line 578 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_content_length1 = _tmp16_;
#line 578 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_index_content_size_ = index_content_length1;
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = index_content;
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18__length1 = index_content_length1;
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = g_bytes_new (_tmp18_, _tmp18__length1);
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp20_ = _tmp19_;
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_tmp20_);
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = _tmp21_;
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_bytes_unref0 (_tmp20_);
#line 580 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_stream = _tmp22_;
#line 581 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp23_ = _data27_->patch;
#line 581 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp24_ = gitg_patch_set_reversed (_tmp23_);
#line 581 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	reversed = _tmp24_;
#line 583 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	out_stream = NULL;
#line 584 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	outf = NULL;
#line 6713 "gitg-stage.c"
	{
		GFile* _tmp25_ = NULL;
		GFileIOStream* _tmp26_ = NULL;
		GFile* _tmp27_ = NULL;
		GFile* _tmp28_ = NULL;
		GFileInputStream* _tmp29_ = NULL;
		GMemoryInputStream* _tmp30_ = NULL;
		GFileIOStream* _tmp31_ = NULL;
		GOutputStream* _tmp32_ = NULL;
		GOutputStream* _tmp33_ = NULL;
		GitgPatchSet* _tmp34_ = NULL;
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp27_ = g_file_new_tmp (NULL, &_tmp26_, &_inner_error_);
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		out_stream = _tmp26_;
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = _tmp27_;
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 6735 "gitg-stage.c"
			goto __catch100_g_error;
		}
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp28_ = _tmp25_;
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp25_ = NULL;
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 588 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		outf = _tmp28_;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp29_ = _data27_->workdirf_stream;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp30_ = index_stream;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp31_ = out_stream;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp32_ = g_io_stream_get_output_stream ((GIOStream*) _tmp31_);
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp33_ = _tmp32_;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp34_ = reversed;
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		gitg_stage_apply_patch_stream (self, (GInputStream*) _tmp29_, (GInputStream*) _tmp30_, _tmp33_, _tmp34_, &_inner_error_);
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 590 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (_tmp25_);
#line 6764 "gitg-stage.c"
			goto __catch100_g_error;
		}
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_tmp25_);
#line 6769 "gitg-stage.c"
	}
	goto __finally100;
	__catch100_g_error:
	{
		GError* e = NULL;
		GFileInputStream* _tmp35_ = NULL;
		GMemoryInputStream* _tmp36_ = NULL;
		GFile* _tmp37_ = NULL;
		GError* _tmp39_ = NULL;
		GError* _tmp40_ = NULL;
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		e = _inner_error_;
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 597 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp35_ = _data27_->workdirf_stream;
#line 597 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_input_stream_close ((GInputStream*) _tmp35_, NULL, &_inner_error_);
#line 597 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 597 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_error_free0 (e);
#line 6792 "gitg-stage.c"
			goto __finally100;
		}
#line 598 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp36_ = index_stream;
#line 598 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_input_stream_close ((GInputStream*) _tmp36_, NULL, &_inner_error_);
#line 598 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 598 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_error_free0 (e);
#line 6803 "gitg-stage.c"
			goto __finally100;
		}
#line 600 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp37_ = outf;
#line 600 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_tmp37_ != NULL) {
#line 6810 "gitg-stage.c"
			{
				GFile* _tmp38_ = NULL;
#line 604 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp38_ = outf;
#line 604 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_file_delete (_tmp38_, NULL, &_inner_error_);
#line 604 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 6819 "gitg-stage.c"
					goto __catch101_g_error;
				}
			}
			goto __finally101;
			__catch101_g_error:
			{
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_clear_error (&_inner_error_);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_inner_error_ = NULL;
#line 6830 "gitg-stage.c"
			}
			__finally101:
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_error_free0 (e);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_error_free0 (e);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_object_unref0 (outf);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_object_unref0 (out_stream);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_gitg_patch_set_unref0 (reversed);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_object_unref0 (index_stream);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_g_object_unref0 (index_blob);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_ggit_index_entry_unref0 (entry);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_ggit_index_entries_unref0 (entries);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				g_clear_error (&_inner_error_);
#line 602 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				return;
#line 6859 "gitg-stage.c"
			}
		}
#line 608 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp39_ = e;
#line 608 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp40_ = _g_error_copy0 (_tmp39_);
#line 608 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp40_;
#line 608 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (e);
#line 6870 "gitg-stage.c"
		goto __finally100;
	}
	__finally100:
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 586 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6894 "gitg-stage.c"
	}
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp41_ = _data27_->workdirf_stream;
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp41_, NULL, &_inner_error_);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 611 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6920 "gitg-stage.c"
	}
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp42_ = index_stream;
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp42_, NULL, &_inner_error_);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 612 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 6946 "gitg-stage.c"
	}
#line 614 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp43_ = out_stream;
#line 614 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp43_ != NULL) {
#line 6952 "gitg-stage.c"
		GFileIOStream* _tmp44_ = NULL;
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp44_ = out_stream;
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_io_stream_close ((GIOStream*) _tmp44_, NULL, &_inner_error_);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (outf);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (out_stream);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_gitg_patch_set_unref0 (reversed);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (index_stream);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (index_blob);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_ggit_index_entry_unref0 (entry);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_ggit_index_entries_unref0 (entries);
#line 616 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 6978 "gitg-stage.c"
		}
	}
	{
		GFileOutputStream* repl = NULL;
		GFile* _tmp45_ = NULL;
		GFileOutputStream* _tmp46_ = NULL;
		GFileInputStream* _tmp47_ = NULL;
		GFile* _tmp48_ = NULL;
		GFileInputStream* _tmp49_ = NULL;
		GFileOutputStream* _tmp50_ = NULL;
#line 622 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp45_ = _data27_->workdirf;
#line 622 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp46_ = g_file_replace (_tmp45_, NULL, FALSE, G_FILE_CREATE_NONE, NULL, &_inner_error_);
#line 622 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		repl = _tmp46_;
#line 622 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 6997 "gitg-stage.c"
			goto __catch102_g_error;
		}
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp48_ = outf;
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp49_ = g_file_read (_tmp48_, NULL, &_inner_error_);
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp47_ = _tmp49_;
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (repl);
#line 7010 "gitg-stage.c"
			goto __catch102_g_error;
		}
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp50_ = repl;
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_output_stream_splice ((GOutputStream*) _tmp50_, (GInputStream*) _tmp47_, G_OUTPUT_STREAM_SPLICE_CLOSE_SOURCE | G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, NULL, &_inner_error_);
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (_tmp47_);
#line 626 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (repl);
#line 7023 "gitg-stage.c"
			goto __catch102_g_error;
		}
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_tmp47_);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (repl);
#line 7030 "gitg-stage.c"
	}
	goto __finally102;
	__catch102_g_error:
	{
		GError* e = NULL;
		GError* _tmp52_ = NULL;
		GError* _tmp53_ = NULL;
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		e = _inner_error_;
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 7042 "gitg-stage.c"
		{
			GFile* _tmp51_ = NULL;
#line 634 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_tmp51_ = outf;
#line 634 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_file_delete (_tmp51_, NULL, &_inner_error_);
#line 634 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7051 "gitg-stage.c"
				goto __catch103_g_error;
			}
		}
		goto __finally103;
		__catch103_g_error:
		{
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_inner_error_ = NULL;
#line 7062 "gitg-stage.c"
		}
		__finally103:
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_error_free0 (e);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_error_free0 (e);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (outf);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (out_stream);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_gitg_patch_set_unref0 (reversed);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (index_stream);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_g_object_unref0 (index_blob);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_ggit_index_entry_unref0 (entry);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_ggit_index_entries_unref0 (entries);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_clear_error (&_inner_error_);
#line 632 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 7091 "gitg-stage.c"
		}
#line 637 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp52_ = e;
#line 637 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp53_ = _g_error_copy0 (_tmp52_);
#line 637 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp53_;
#line 637 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_error_free0 (e);
#line 7101 "gitg-stage.c"
		goto __finally102;
	}
	__finally102:
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 620 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7125 "gitg-stage.c"
	}
	{
		GFile* _tmp54_ = NULL;
#line 642 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp54_ = outf;
#line 642 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_file_delete (_tmp54_, NULL, &_inner_error_);
#line 642 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 7135 "gitg-stage.c"
			goto __catch104_g_error;
		}
	}
	goto __finally104;
	__catch104_g_error:
	{
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_clear_error (&_inner_error_);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = NULL;
#line 7146 "gitg-stage.c"
	}
	__finally104:
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (outf);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (out_stream);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 640 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7169 "gitg-stage.c"
	}
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (outf);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (out_stream);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (reversed);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (index_stream);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (index_blob);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (entry);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entries_unref0 (entries);
#line 7185 "gitg-stage.c"
}


static void ___lambda20__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda20_ (self, index, error);
#line 7192 "gitg-stage.c"
}


static gboolean gitg_stage_revert_patch_co (GitgStageRevertPatchData* _data_) {
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 7201 "gitg-stage.c"
		goto _state_0;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 7205 "gitg-stage.c"
		goto _state_1;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 2:
#line 7209 "gitg-stage.c"
		goto _state_2;
		default:
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 7214 "gitg-stage.c"
	}
	_state_0:
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_ = g_slice_new0 (Block27Data);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->_ref_count_ = 1;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->self = g_object_ref (_data_->self);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->patch;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->_data27_->patch);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->patch = _data_->_tmp0_;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->_async_data_ = _data_;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->self->priv->d_repository;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp1_);
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_data27_->patch;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_->filename;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = g_file_resolve_relative_path (_data_->_tmp3_, _data_->_tmp5_);
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp3_);
#line 565 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->workdirf = _data_->_tmp7_;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = NULL;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = _data_->_data27_->workdirf;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_file_read_async (_data_->_tmp8_, G_PRIORITY_DEFAULT, NULL, gitg_stage_revert_patch_ready, _data_);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7275 "gitg-stage.c"
	_state_1:
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp9_ = NULL;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp9_ = g_file_read_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_->workdirf_stream = _data_->_tmp9_;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block27_data_unref (_data_->_data27_);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data27_ = NULL;
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7297 "gitg-stage.c"
		} else {
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 7301 "gitg-stage.c"
		}
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 566 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 7307 "gitg-stage.c"
	}
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 2;
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda20__gitg_stage_with_index_func, _data_->_data27_, gitg_stage_revert_patch_ready, _data_);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7315 "gitg-stage.c"
	_state_2:
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block27_data_unref (_data_->_data27_);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data27_ = NULL;
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7333 "gitg-stage.c"
		} else {
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 7337 "gitg-stage.c"
		}
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 568 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 7343 "gitg-stage.c"
	}
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block27_data_unref (_data_->_data27_);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data27_ = NULL;
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7353 "gitg-stage.c"
	} else {
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 7357 "gitg-stage.c"
	}
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 562 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7363 "gitg-stage.c"
}


static void gitg_stage_delete_data_free (gpointer _data) {
	GitgStageDeleteData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDeleteData, _data_);
#line 7374 "gitg-stage.c"
}


void gitg_stage_delete (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDeleteData* _data_;
	GitgStage* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDeleteData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_delete);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_delete_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = file;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->file);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->file = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete_co (_data_);
#line 7403 "gitg-stage.c"
}


void gitg_stage_delete_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageDeleteData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7413 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 7417 "gitg-stage.c"
}


/**
 * Delete a file from the index.
 *
 * @param file the file to delete.
 *
 * Delete the file from the index.
 */
static Block28Data* block28_data_ref (Block28Data* _data28_) {
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data28_->_ref_count_);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data28_;
#line 7433 "gitg-stage.c"
}


static void block28_data_unref (void * _userdata_) {
	Block28Data* _data28_;
	_data28_ = (Block28Data*) _userdata_;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data28_->_ref_count_)) {
#line 7442 "gitg-stage.c"
		GitgStage* self;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data28_->self;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data28_->file);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block28Data, _data28_);
#line 7452 "gitg-stage.c"
	}
}


static void __lambda21_ (Block28Data* _data28_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndex* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GgitIndex* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data28_->self;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = _data28_->file;
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_remove (_tmp0_, _tmp1_, 0, &_inner_error_);
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 657 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7479 "gitg-stage.c"
	}
#line 658 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = index;
#line 658 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_write (_tmp2_, &_inner_error_);
#line 658 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 658 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 658 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7491 "gitg-stage.c"
	}
}


static void ___lambda21__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda21_ (self, index, error);
#line 7499 "gitg-stage.c"
}


static void gitg_stage_delete_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageDeleteData* _data_;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete_co (_data_);
#line 7513 "gitg-stage.c"
}


static gboolean gitg_stage_delete_co (GitgStageDeleteData* _data_) {
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 7522 "gitg-stage.c"
		goto _state_0;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 7526 "gitg-stage.c"
		goto _state_1;
		default:
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 7531 "gitg-stage.c"
	}
	_state_0:
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_ = g_slice_new0 (Block28Data);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_->_ref_count_ = 1;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_->self = g_object_ref (_data_->self);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->file;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data28_->file);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_->file = _data_->_tmp0_;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_->_async_data_ = _data_;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda21__gitg_stage_with_index_func, _data_->_data28_, gitg_stage_delete_ready, _data_);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7556 "gitg-stage.c"
	_state_1:
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block28_data_unref (_data_->_data28_);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data28_ = NULL;
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7574 "gitg-stage.c"
		} else {
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 7578 "gitg-stage.c"
		}
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 656 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 7584 "gitg-stage.c"
	}
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block28_data_unref (_data_->_data28_);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data28_ = NULL;
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7594 "gitg-stage.c"
	} else {
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 7598 "gitg-stage.c"
	}
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 654 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7604 "gitg-stage.c"
}


static void gitg_stage_delete_path_data_free (gpointer _data) {
	GitgStageDeletePathData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDeletePathData, _data_);
#line 7617 "gitg-stage.c"
}


void gitg_stage_delete_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDeletePathData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDeletePathData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_delete_path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_delete_path_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = path;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->path = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete_path_co (_data_);
#line 7646 "gitg-stage.c"
}


void gitg_stage_delete_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageDeletePathData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7656 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 7660 "gitg-stage.c"
}


/**
 * Delete a relative path from the index.
 *
 * @param path path relative to the working directory.
 *
 * Delete the relative path from the index.
 */
static void gitg_stage_delete_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageDeletePathData* _data_;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete_path_co (_data_);
#line 7681 "gitg-stage.c"
}


static gboolean gitg_stage_delete_path_co (GitgStageDeletePathData* _data_) {
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 7690 "gitg-stage.c"
		goto _state_0;
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 7694 "gitg-stage.c"
		goto _state_1;
		default:
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 7699 "gitg-stage.c"
	}
	_state_0:
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->self->priv->d_repository;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp0_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->path;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = g_file_resolve_relative_path (_data_->_tmp2_, _data_->_tmp3_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete (_data_->self, _data_->_tmp5_, gitg_stage_delete_path_ready, _data_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7732 "gitg-stage.c"
	_state_1:
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_delete_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp5_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp2_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7750 "gitg-stage.c"
		} else {
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 7754 "gitg-stage.c"
		}
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 671 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 7760 "gitg-stage.c"
	}
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7766 "gitg-stage.c"
	} else {
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 7770 "gitg-stage.c"
	}
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 669 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7776 "gitg-stage.c"
}


static void gitg_stage_stage_data_free (gpointer _data) {
	GitgStageStageData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageStageData, _data_);
#line 7787 "gitg-stage.c"
}


void gitg_stage_stage (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageStageData* _data_;
	GitgStage* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageStageData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_stage);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_stage_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = file;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->file);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->file = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_co (_data_);
#line 7816 "gitg-stage.c"
}


void gitg_stage_stage_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageStageData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7826 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 7830 "gitg-stage.c"
}


/**
 * Stage a file to the index.
 *
 * @param file the file to stage.
 *
 * Stage the file to the index. This will record the state of the file in
 * the working directory to the index.
 */
static Block29Data* block29_data_ref (Block29Data* _data29_) {
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data29_->_ref_count_);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data29_;
#line 7847 "gitg-stage.c"
}


static void block29_data_unref (void * _userdata_) {
	Block29Data* _data29_;
	_data29_ = (Block29Data*) _userdata_;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data29_->_ref_count_)) {
#line 7856 "gitg-stage.c"
		GitgStage* self;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data29_->self;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data29_->file);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block29Data, _data29_);
#line 7866 "gitg-stage.c"
	}
}


static void __lambda22_ (Block29Data* _data29_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndex* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GgitIndex* _tmp2_ = NULL;
	GError * _inner_error_ = NULL;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data29_->self;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = _data29_->file;
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_add_file (_tmp0_, _tmp1_, &_inner_error_);
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 685 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7893 "gitg-stage.c"
	}
#line 686 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = index;
#line 686 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_write (_tmp2_, &_inner_error_);
#line 686 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 686 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 686 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 7905 "gitg-stage.c"
	}
}


static void ___lambda22__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda22_ (self, index, error);
#line 7913 "gitg-stage.c"
}


static void gitg_stage_stage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageStageData* _data_;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_co (_data_);
#line 7927 "gitg-stage.c"
}


static gboolean gitg_stage_stage_co (GitgStageStageData* _data_) {
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 7936 "gitg-stage.c"
		goto _state_0;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 7940 "gitg-stage.c"
		goto _state_1;
		default:
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 7945 "gitg-stage.c"
	}
	_state_0:
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_ = g_slice_new0 (Block29Data);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_->_ref_count_ = 1;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_->self = g_object_ref (_data_->self);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->file;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data29_->file);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_->file = _data_->_tmp0_;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_->_async_data_ = _data_;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda22__gitg_stage_with_index_func, _data_->_data29_, gitg_stage_stage_ready, _data_);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 7970 "gitg-stage.c"
	_state_1:
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block29_data_unref (_data_->_data29_);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data29_ = NULL;
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 7988 "gitg-stage.c"
		} else {
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 7992 "gitg-stage.c"
		}
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 684 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 7998 "gitg-stage.c"
	}
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block29_data_unref (_data_->_data29_);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data29_ = NULL;
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8008 "gitg-stage.c"
	} else {
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 8012 "gitg-stage.c"
	}
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 682 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 8018 "gitg-stage.c"
}


static void gitg_stage_stage_path_data_free (gpointer _data) {
	GitgStageStagePathData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageStagePathData, _data_);
#line 8031 "gitg-stage.c"
}


void gitg_stage_stage_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageStagePathData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageStagePathData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_stage_path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_stage_path_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = path;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->path = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_path_co (_data_);
#line 8060 "gitg-stage.c"
}


void gitg_stage_stage_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageStagePathData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8070 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 8074 "gitg-stage.c"
}


/**
 * Stage a path to the index.
 *
 * @param path path relative to the working directory.
 *
 * Stage a relative path to the index. This will record the state of the file in
 * the working directory to the index.
 */
static void gitg_stage_stage_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageStagePathData* _data_;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_path_co (_data_);
#line 8096 "gitg-stage.c"
}


static gboolean gitg_stage_stage_path_co (GitgStageStagePathData* _data_) {
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 8105 "gitg-stage.c"
		goto _state_0;
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 8109 "gitg-stage.c"
		goto _state_1;
		default:
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 8114 "gitg-stage.c"
	}
	_state_0:
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->self->priv->d_repository;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp0_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->path;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = g_file_resolve_relative_path (_data_->_tmp2_, _data_->_tmp3_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage (_data_->self, _data_->_tmp5_, gitg_stage_stage_path_ready, _data_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 8147 "gitg-stage.c"
	_state_1:
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp5_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp2_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8165 "gitg-stage.c"
		} else {
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 8169 "gitg-stage.c"
		}
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 700 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 8175 "gitg-stage.c"
	}
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8181 "gitg-stage.c"
	} else {
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 8185 "gitg-stage.c"
	}
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 698 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 8191 "gitg-stage.c"
}


static void gitg_stage_stage_commit_data_free (gpointer _data) {
	GitgStageStageCommitData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageStageCommitData, _data_);
#line 8202 "gitg-stage.c"
}


void gitg_stage_stage_commit (GitgStage* self, const gchar* path, GgitCommit* commit, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageStageCommitData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GgitCommit* _tmp3_ = NULL;
	GgitCommit* _tmp4_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageStageCommitData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_stage_commit);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_stage_commit_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = path;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->path = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = commit;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->commit);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->commit = _tmp4_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_commit_co (_data_);
#line 8241 "gitg-stage.c"
}


void gitg_stage_stage_commit_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageStageCommitData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8251 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 8255 "gitg-stage.c"
}


/**
 * Stage a commit to the index.
 *
 * @param path path relative to the working directory.
 * @param id the id of the commit object to stage at the given path.
 *
 * Stage a commit to the index with a relative path. This will record the
 * given commit id for file pointed to at path in the index.
 */
static Block30Data* block30_data_ref (Block30Data* _data30_) {
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data30_->_ref_count_);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data30_;
#line 8273 "gitg-stage.c"
}


static void block30_data_unref (void * _userdata_) {
	Block30Data* _data30_;
	_data30_ = (Block30Data*) _userdata_;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data30_->_ref_count_)) {
#line 8282 "gitg-stage.c"
		GitgStage* self;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data30_->self;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (_data30_->path);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data30_->commit);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block30Data, _data30_);
#line 8294 "gitg-stage.c"
	}
}


static void __lambda23_ (Block30Data* _data30_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndexEntry* entry = NULL;
	GitgRepository* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	GgitCommit* _tmp2_ = NULL;
	GgitOId* _tmp3_ = NULL;
	GgitOId* _tmp4_ = NULL;
	GgitIndexEntry* _tmp5_ = NULL;
	GgitIndexEntry* _tmp6_ = NULL;
	GgitIndexEntry* _tmp7_ = NULL;
	GgitCommit* _tmp8_ = NULL;
	GgitIndex* _tmp9_ = NULL;
	GgitIndexEntry* _tmp10_ = NULL;
	GgitIndex* _tmp11_ = NULL;
	GError * _inner_error_ = NULL;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data30_->self;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = _data30_->path;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _data30_->commit;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = ggit_object_get_id ((GgitObject*) _tmp2_);
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = _tmp3_;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = ggit_repository_create_index_entry_for_path ((GgitRepository*) _tmp0_, _tmp1_, _tmp4_, &_inner_error_);
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = _tmp5_;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_tmp4_);
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp6_;
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 715 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8343 "gitg-stage.c"
	}
#line 716 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = entry;
#line 716 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = _data30_->commit;
#line 716 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_entry_set_commit (_tmp7_, _tmp8_);
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = index;
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = entry;
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_add (_tmp9_, _tmp10_, &_inner_error_);
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 718 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8365 "gitg-stage.c"
	}
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = index;
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_write (_tmp11_, &_inner_error_);
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 719 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8379 "gitg-stage.c"
	}
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (entry);
#line 8383 "gitg-stage.c"
}


static void ___lambda23__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda23_ (self, index, error);
#line 8390 "gitg-stage.c"
}


static void gitg_stage_stage_commit_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageStageCommitData* _data_;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_commit_co (_data_);
#line 8404 "gitg-stage.c"
}


static gboolean gitg_stage_stage_commit_co (GitgStageStageCommitData* _data_) {
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 8413 "gitg-stage.c"
		goto _state_0;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 8417 "gitg-stage.c"
		goto _state_1;
		default:
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 8422 "gitg-stage.c"
	}
	_state_0:
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_ = g_slice_new0 (Block30Data);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_->_ref_count_ = 1;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_->self = g_object_ref (_data_->self);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->path;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->_data30_->path);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_->path = _data_->_tmp0_;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->commit;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data30_->commit);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_->commit = _data_->_tmp1_;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_->_async_data_ = _data_;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda23__gitg_stage_with_index_func, _data_->_data30_, gitg_stage_stage_commit_ready, _data_);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 8455 "gitg-stage.c"
	_state_1:
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block30_data_unref (_data_->_data30_);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data30_ = NULL;
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8473 "gitg-stage.c"
		} else {
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 8477 "gitg-stage.c"
		}
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 714 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 8483 "gitg-stage.c"
	}
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block30_data_unref (_data_->_data30_);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data30_ = NULL;
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 8493 "gitg-stage.c"
	} else {
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 8497 "gitg-stage.c"
	}
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 712 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 8503 "gitg-stage.c"
}


static void gitg_stage_copy_stream (GitgStage* self, GOutputStream* dest, GInputStream* src, gsize* pos, gsize index, gsize length, GError** error) {
	gsize _tmp0_ = 0UL;
	guint8* buf = NULL;
	gsize _tmp1_ = 0UL;
	guint8* _tmp2_ = NULL;
	gint buf_length1 = 0;
	gint _buf_size_ = 0;
	gsize _tmp3_ = 0UL;
	gsize _tmp4_ = 0UL;
	GInputStream* _tmp8_ = NULL;
	guint8* _tmp9_ = NULL;
	gint _tmp9__length1 = 0;
	GOutputStream* _tmp10_ = NULL;
	guint8* _tmp11_ = NULL;
	gint _tmp11__length1 = 0;
	gsize _tmp12_ = 0UL;
	gsize _tmp13_ = 0UL;
	GError * _inner_error_ = NULL;
#line 723 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 723 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (dest != NULL);
#line 723 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (src != NULL);
#line 725 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = length;
#line 725 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp0_ == ((gsize) 0)) {
#line 727 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8537 "gitg-stage.c"
	}
#line 730 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = length;
#line 730 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_new0 (guint8, _tmp1_);
#line 730 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	buf = _tmp2_;
#line 730 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	buf_length1 = _tmp1_;
#line 730 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_buf_size_ = buf_length1;
#line 732 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = *pos;
#line 732 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = index;
#line 732 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp3_ != _tmp4_) {
#line 8555 "gitg-stage.c"
		GInputStream* _tmp5_ = NULL;
		gsize _tmp6_ = 0UL;
		gsize _tmp7_ = 0UL;
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp5_ = src;
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = index;
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_seekable_seek (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, g_seekable_get_type (), GSeekable), (gint64) _tmp6_, G_SEEK_SET, NULL, &_inner_error_);
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_propagate_error (error, _inner_error_);
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			buf = (g_free (buf), NULL);
#line 734 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			return;
#line 8573 "gitg-stage.c"
		}
#line 735 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = index;
#line 735 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		*pos = _tmp7_;
#line 8579 "gitg-stage.c"
	}
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = src;
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = buf;
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9__length1 = buf_length1;
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_read_all (_tmp8_, _tmp9_, (gsize) _tmp9__length1, NULL, NULL, &_inner_error_);
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		buf = (g_free (buf), NULL);
#line 738 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8597 "gitg-stage.c"
	}
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = dest;
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = buf;
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11__length1 = buf_length1;
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_output_stream_write_all (_tmp10_, _tmp11_, (gsize) _tmp11__length1, NULL, NULL, &_inner_error_);
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		buf = (g_free (buf), NULL);
#line 739 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8615 "gitg-stage.c"
	}
#line 741 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = *pos;
#line 741 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = length;
#line 741 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	*pos = _tmp12_ + _tmp13_;
#line 723 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	buf = (g_free (buf), NULL);
#line 8625 "gitg-stage.c"
}


static void gitg_stage_apply_patch (GitgStage* self, GgitIndex* index, GInputStream* old_stream, GInputStream* new_stream, GitgPatchSet* patch, GError** error) {
	GgitBlobOutputStream* patched_stream = NULL;
	GitgRepository* _tmp0_ = NULL;
	GgitBlobOutputStream* _tmp1_ = NULL;
	GInputStream* _tmp2_ = NULL;
	GInputStream* _tmp3_ = NULL;
	GgitBlobOutputStream* _tmp4_ = NULL;
	GitgPatchSet* _tmp5_ = NULL;
	GgitBlobOutputStream* _tmp6_ = NULL;
	GgitOId* new_id = NULL;
	GgitBlobOutputStream* _tmp7_ = NULL;
	GgitOId* _tmp8_ = NULL;
	GgitIndexEntry* new_entry = NULL;
	GitgRepository* _tmp9_ = NULL;
	GitgPatchSet* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	GgitOId* _tmp12_ = NULL;
	GgitIndexEntry* _tmp13_ = NULL;
	GgitIndex* _tmp14_ = NULL;
	GgitIndexEntry* _tmp15_ = NULL;
	GgitIndex* _tmp16_ = NULL;
	GError * _inner_error_ = NULL;
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (old_stream != NULL);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (new_stream != NULL);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (patch != NULL);
#line 749 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 749 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_repository_create_blob ((GgitRepository*) _tmp0_);
#line 749 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	patched_stream = _tmp1_;
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = old_stream;
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = new_stream;
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = patched_stream;
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = patch;
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_apply_patch_stream (self, _tmp2_, _tmp3_, (GOutputStream*) _tmp4_, _tmp5_, &_inner_error_);
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 751 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8685 "gitg-stage.c"
	}
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = patched_stream;
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_output_stream_close ((GOutputStream*) _tmp6_, NULL, &_inner_error_);
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 753 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8699 "gitg-stage.c"
	}
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = patched_stream;
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = ggit_blob_output_stream_get_id (_tmp7_, &_inner_error_);
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	new_id = _tmp8_;
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 754 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8715 "gitg-stage.c"
	}
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = self->priv->d_repository;
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = patch;
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = _tmp10_->filename;
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = new_id;
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = ggit_repository_create_index_entry_for_path ((GgitRepository*) _tmp9_, _tmp11_, _tmp12_, &_inner_error_);
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	new_entry = _tmp13_;
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (new_id);
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 756 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8739 "gitg-stage.c"
	}
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = index;
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = new_entry;
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_add (_tmp14_, _tmp15_, &_inner_error_);
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (new_entry);
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (new_id);
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 759 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8759 "gitg-stage.c"
	}
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp16_ = index;
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_write (_tmp16_, &_inner_error_);
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (new_entry);
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (new_id);
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (patched_stream);
#line 760 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8777 "gitg-stage.c"
	}
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (new_entry);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (new_id);
#line 744 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (patched_stream);
#line 8785 "gitg-stage.c"
}


static void gitg_stage_apply_patch_stream (GitgStage* self, GInputStream* old_stream, GInputStream* new_stream, GOutputStream* patched_stream, GitgPatchSet* patch, GError** error) {
	gsize old_ptr = 0UL;
	gsize new_ptr = 0UL;
	GitgPatchSet* _tmp0_ = NULL;
	GitgPatchSetPatch* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GOutputStream* _tmp22_ = NULL;
	GInputStream* _tmp23_ = NULL;
	GError * _inner_error_ = NULL;
#line 763 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (self != NULL);
#line 763 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (old_stream != NULL);
#line 763 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (new_stream != NULL);
#line 763 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (patched_stream != NULL);
#line 763 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (patch != NULL);
#line 768 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old_ptr = (gsize) 0;
#line 769 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	new_ptr = (gsize) 0;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = patch;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = _tmp0_->patches;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1__length1 = _tmp0_->patches_length1;
#line 8818 "gitg-stage.c"
	{
		GitgPatchSetPatch* p_collection = NULL;
		gint p_collection_length1 = 0;
		gint _p_collection_size_ = 0;
		gint p_it = 0;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		p_collection = _tmp1_;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		p_collection_length1 = _tmp1__length1;
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		for (p_it = 0; p_it < _tmp1__length1; p_it = p_it + 1) {
#line 8830 "gitg-stage.c"
			GitgPatchSetPatch p = {0};
#line 773 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			p = p_collection[p_it];
#line 8834 "gitg-stage.c"
			{
				GOutputStream* _tmp2_ = NULL;
				GInputStream* _tmp3_ = NULL;
				gsize _tmp4_ = 0UL;
				GitgPatchSetPatch _tmp5_ = {0};
				gsize _tmp6_ = 0UL;
				gsize _tmp7_ = 0UL;
				GitgPatchSetPatch _tmp8_ = {0};
				GitgPatchSetType _tmp9_ = 0;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp2_ = patched_stream;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp3_ = old_stream;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp4_ = old_ptr;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp5_ = p;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp6_ = _tmp5_.old_offset;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp7_ = old_ptr;
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				gitg_stage_copy_stream (self, _tmp2_, _tmp3_, &old_ptr, _tmp4_, _tmp6_ - _tmp7_, &_inner_error_);
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					g_propagate_error (error, _inner_error_);
#line 776 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					return;
#line 8864 "gitg-stage.c"
				}
#line 782 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp8_ = p;
#line 782 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_tmp9_ = _tmp8_.type;
#line 782 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				if (_tmp9_ == GITG_PATCH_SET_TYPE_REMOVE) {
#line 8872 "gitg-stage.c"
					GInputStream* _tmp10_ = NULL;
					GitgPatchSetPatch _tmp11_ = {0};
					gsize _tmp12_ = 0UL;
					gsize _tmp13_ = 0UL;
					GitgPatchSetPatch _tmp14_ = {0};
					gsize _tmp15_ = 0UL;
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp10_ = old_stream;
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp11_ = p;
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp12_ = _tmp11_.length;
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					g_seekable_seek (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, g_seekable_get_type (), GSeekable), (gint64) _tmp12_, G_SEEK_CUR, NULL, &_inner_error_);
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						g_propagate_error (error, _inner_error_);
#line 785 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						return;
#line 8893 "gitg-stage.c"
					}
#line 786 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp13_ = old_ptr;
#line 786 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp14_ = p;
#line 786 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp15_ = _tmp14_.length;
#line 786 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					old_ptr = _tmp13_ + _tmp15_;
#line 8903 "gitg-stage.c"
				} else {
					GOutputStream* _tmp16_ = NULL;
					GInputStream* _tmp17_ = NULL;
					GitgPatchSetPatch _tmp18_ = {0};
					gsize _tmp19_ = 0UL;
					GitgPatchSetPatch _tmp20_ = {0};
					gsize _tmp21_ = 0UL;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp16_ = patched_stream;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp17_ = new_stream;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp18_ = p;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp19_ = _tmp18_.new_offset;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp20_ = p;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_tmp21_ = _tmp20_.length;
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					gitg_stage_copy_stream (self, _tmp16_, _tmp17_, &new_ptr, _tmp19_, _tmp21_, &_inner_error_);
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						g_propagate_error (error, _inner_error_);
#line 791 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						return;
#line 8931 "gitg-stage.c"
					}
				}
			}
		}
	}
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = patched_stream;
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp23_ = old_stream;
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_output_stream_splice (_tmp22_, _tmp23_, G_OUTPUT_STREAM_SPLICE_NONE, NULL, &_inner_error_);
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 800 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 8949 "gitg-stage.c"
	}
}


static void gitg_stage_stage_patch_data_free (gpointer _data) {
	GitgStageStagePatchData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageStagePatchData, _data_);
#line 8961 "gitg-stage.c"
}


void gitg_stage_stage_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageStagePatchData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgPatchSet* _tmp1_ = NULL;
	GitgPatchSet* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageStagePatchData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_stage_patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_stage_patch_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = patch;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _gitg_patch_set_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->patch = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_patch_co (_data_);
#line 8990 "gitg-stage.c"
}


void gitg_stage_stage_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageStagePatchData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9000 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 9004 "gitg-stage.c"
}


/**
 * Stage a patch to the index.
 *
 * @param patch the patch to stage.
 *
 * Stage a provided patch to the index. The patch should contain changes
 * of the file in the current working directory to the contents of the
 * index (i.e. as obtained from diff_workdir)
 */
static Block31Data* block31_data_ref (Block31Data* _data31_) {
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data31_->_ref_count_);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data31_;
#line 9022 "gitg-stage.c"
}


static void block31_data_unref (void * _userdata_) {
	Block31Data* _data31_;
	_data31_ = (Block31Data*) _userdata_;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data31_->_ref_count_)) {
#line 9031 "gitg-stage.c"
		GitgStage* self;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data31_->self;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data31_->new_stream);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data31_->newf);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (_data31_->patch);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block31Data, _data31_);
#line 9045 "gitg-stage.c"
	}
}


static void gitg_stage_stage_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageStagePatchData* _data_;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_stage_patch_co (_data_);
#line 9060 "gitg-stage.c"
}


static void __lambda24_ (Block31Data* _data31_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndexEntries* entries = NULL;
	GgitIndex* _tmp0_ = NULL;
	GgitIndexEntries* _tmp1_ = NULL;
	GgitIndexEntry* entry = NULL;
	GgitIndexEntries* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GgitIndexEntry* _tmp4_ = NULL;
	GgitIndexEntry* _tmp5_ = NULL;
	GgitBlob* old_blob = NULL;
	GitgRepository* _tmp9_ = NULL;
	GgitIndexEntry* _tmp10_ = NULL;
	GgitOId* _tmp11_ = NULL;
	GgitOId* _tmp12_ = NULL;
	gpointer _tmp13_ = NULL;
	GgitBlob* _tmp14_ = NULL;
	guchar* old_content = NULL;
	GgitBlob* _tmp15_ = NULL;
	gsize _tmp16_;
	guint8* _tmp17_ = NULL;
	gint old_content_length1 = 0;
	gint _old_content_size_ = 0;
	GMemoryInputStream* old_stream = NULL;
	guchar* _tmp18_ = NULL;
	gint _tmp18__length1 = 0;
	GBytes* _tmp19_ = NULL;
	GBytes* _tmp20_ = NULL;
	GMemoryInputStream* _tmp21_ = NULL;
	GMemoryInputStream* _tmp22_ = NULL;
	GgitIndex* _tmp23_ = NULL;
	GMemoryInputStream* _tmp24_ = NULL;
	GFileInputStream* _tmp25_ = NULL;
	GitgPatchSet* _tmp26_ = NULL;
	GFileInputStream* _tmp27_ = NULL;
	GMemoryInputStream* _tmp28_ = NULL;
	GError * _inner_error_ = NULL;
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data31_->self;
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 819 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 819 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_index_get_entries (_tmp0_);
#line 819 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entries = _tmp1_;
#line 820 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = entries;
#line 820 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _data31_->newf;
#line 820 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ggit_index_entries_get_by_path (_tmp2_, _tmp3_, 0);
#line 820 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp4_;
#line 822 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = entry;
#line 822 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp5_ == NULL) {
#line 9123 "gitg-stage.c"
		GitgPatchSet* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = _data31_->patch;
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = _tmp6_->filename;
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp8_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_INDEX_ENTRY_NOT_FOUND, _tmp7_);
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp8_;
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 824 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9143 "gitg-stage.c"
	}
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = self->priv->d_repository;
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = entry;
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = ggit_index_entry_get_id (_tmp10_);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = _tmp11_;
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = gitg_repository_lookup (_tmp9_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp12_, &_inner_error_);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = (GgitBlob*) _tmp13_;
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_tmp12_);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old_blob = _tmp14_;
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 827 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9171 "gitg-stage.c"
	}
#line 828 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = old_blob;
#line 828 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = ggit_blob_get_raw_content (_tmp15_, &_tmp16_);
#line 828 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old_content = _tmp17_;
#line 828 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old_content_length1 = _tmp16_;
#line 828 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_old_content_size_ = old_content_length1;
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = old_content;
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18__length1 = old_content_length1;
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = g_bytes_new (_tmp18_, _tmp18__length1);
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp20_ = _tmp19_;
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_tmp20_);
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = _tmp21_;
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_bytes_unref0 (_tmp20_);
#line 830 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	old_stream = _tmp22_;
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp23_ = index;
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp24_ = old_stream;
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp25_ = _data31_->new_stream;
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp26_ = _data31_->patch;
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_apply_patch (self, _tmp23_, (GInputStream*) _tmp24_, (GInputStream*) _tmp25_, _tmp26_, &_inner_error_);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_stream);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_blob);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 832 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9223 "gitg-stage.c"
	}
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp27_ = _data31_->new_stream;
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp27_, NULL, &_inner_error_);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_stream);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_blob);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 834 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9243 "gitg-stage.c"
	}
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp28_ = old_stream;
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp28_, NULL, &_inner_error_);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_stream);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (old_blob);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 835 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9263 "gitg-stage.c"
	}
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (old_stream);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (old_blob);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (entry);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entries_unref0 (entries);
#line 9273 "gitg-stage.c"
}


static void ___lambda24__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda24_ (self, index, error);
#line 9280 "gitg-stage.c"
}


static gboolean gitg_stage_stage_patch_co (GitgStageStagePatchData* _data_) {
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 9289 "gitg-stage.c"
		goto _state_0;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 9293 "gitg-stage.c"
		goto _state_1;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 2:
#line 9297 "gitg-stage.c"
		goto _state_2;
		default:
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 9302 "gitg-stage.c"
	}
	_state_0:
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_ = g_slice_new0 (Block31Data);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->_ref_count_ = 1;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->self = g_object_ref (_data_->self);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->patch;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->_data31_->patch);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->patch = _data_->_tmp0_;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->_async_data_ = _data_;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->self->priv->d_repository;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp1_);
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_data31_->patch;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_->filename;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = g_file_resolve_relative_path (_data_->_tmp3_, _data_->_tmp5_);
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp3_);
#line 815 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->newf = _data_->_tmp7_;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = NULL;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = _data_->_data31_->newf;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_file_read_async (_data_->_tmp8_, G_PRIORITY_DEFAULT, NULL, gitg_stage_stage_patch_ready, _data_);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9363 "gitg-stage.c"
	_state_1:
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp9_ = NULL;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp9_ = g_file_read_finish (_data_->_tmp8_, _data_->_res_, &_data_->_inner_error_);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_->new_stream = _data_->_tmp9_;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block31_data_unref (_data_->_data31_);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data31_ = NULL;
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9385 "gitg-stage.c"
		} else {
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 9389 "gitg-stage.c"
		}
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 816 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 9395 "gitg-stage.c"
	}
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 2;
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda24__gitg_stage_with_index_func, _data_->_data31_, gitg_stage_stage_patch_ready, _data_);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9403 "gitg-stage.c"
	_state_2:
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block31_data_unref (_data_->_data31_);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data31_ = NULL;
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9421 "gitg-stage.c"
		} else {
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 9425 "gitg-stage.c"
		}
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 818 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 9431 "gitg-stage.c"
	}
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block31_data_unref (_data_->_data31_);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data31_ = NULL;
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9441 "gitg-stage.c"
	} else {
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 9445 "gitg-stage.c"
	}
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 812 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9451 "gitg-stage.c"
}


static void gitg_stage_unstage_data_free (gpointer _data) {
	GitgStageUnstageData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageUnstageData, _data_);
#line 9462 "gitg-stage.c"
}


void gitg_stage_unstage (GitgStage* self, GFile* file, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageUnstageData* _data_;
	GitgStage* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageUnstageData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_unstage);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_unstage_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = file;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->file);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->file = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_co (_data_);
#line 9491 "gitg-stage.c"
}


void gitg_stage_unstage_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageUnstageData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9501 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 9505 "gitg-stage.c"
}


/**
 * Unstage a file from the index.
 *
 * @param file the file to unstage.
 *
 * Unstage changes in the specified file from the index. This will record
 * the state of the file in HEAD to the index.
 */
static Block32Data* block32_data_ref (Block32Data* _data32_) {
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data32_->_ref_count_);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data32_;
#line 9522 "gitg-stage.c"
}


static void block32_data_unref (void * _userdata_) {
	Block32Data* _data32_;
	_data32_ = (Block32Data*) _userdata_;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data32_->_ref_count_)) {
#line 9531 "gitg-stage.c"
		GitgStage* self;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data32_->self;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data32_->tree);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data32_->file);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block32Data, _data32_);
#line 9543 "gitg-stage.c"
	}
}


static void gitg_stage_unstage_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageUnstageData* _data_;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_co (_data_);
#line 9558 "gitg-stage.c"
}


static void __lambda25_ (Block32Data* _data32_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GFile* wd = NULL;
	GitgRepository* _tmp0_ = NULL;
	GFile* _tmp1_ = NULL;
	gchar* path = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	GgitTreeEntry* entry = NULL;
	GgitTree* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GgitTreeEntry* _tmp7_ = NULL;
	GgitOId* id = NULL;
	GgitTreeEntry* _tmp8_ = NULL;
	GgitOId* _tmp9_ = NULL;
	GgitIndexEntry* ientry = NULL;
	GitgRepository* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	GgitOId* _tmp12_ = NULL;
	GgitIndexEntry* _tmp13_ = NULL;
	GgitIndexEntry* _tmp14_ = NULL;
	GgitTreeEntry* _tmp15_ = NULL;
	GgitFileMode _tmp16_ = 0;
	GgitIndex* _tmp17_ = NULL;
	GgitIndexEntry* _tmp18_ = NULL;
	GgitIndex* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data32_->self;
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 853 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = self->priv->d_repository;
#line 853 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _tmp0_);
#line 853 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	wd = _tmp1_;
#line 854 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = wd;
#line 854 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _data32_->file;
#line 854 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = g_file_get_relative_path (_tmp2_, _tmp3_);
#line 854 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	path = _tmp4_;
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = _data32_->tree;
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp6_ = path;
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp7_ = ggit_tree_get_by_path (_tmp5_, _tmp6_, &_inner_error_);
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp7_;
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 857 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9626 "gitg-stage.c"
	}
#line 858 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp8_ = entry;
#line 858 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = ggit_tree_entry_get_id (_tmp8_);
#line 858 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	id = _tmp9_;
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = self->priv->d_repository;
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = path;
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = id;
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = ggit_repository_create_index_entry_for_path ((GgitRepository*) _tmp10_, _tmp11_, _tmp12_, &_inner_error_);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ientry = _tmp13_;
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 862 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9658 "gitg-stage.c"
	}
#line 865 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = ientry;
#line 865 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = entry;
#line 865 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp16_ = ggit_tree_entry_get_file_mode (_tmp15_);
#line 865 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_entry_set_mode (_tmp14_, (guint) _tmp16_);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = index;
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = ientry;
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_add (_tmp17_, _tmp18_, &_inner_error_);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (ientry);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 867 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9690 "gitg-stage.c"
	}
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = index;
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_index_write (_tmp19_, &_inner_error_);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (ientry);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		__vala_GgitOId_free0 (id);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (entry);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_free0 (path);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (wd);
#line 868 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9712 "gitg-stage.c"
	}
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (ientry);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (id);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_tree_entry_unref0 (entry);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (path);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (wd);
#line 9724 "gitg-stage.c"
}


static void ___lambda25__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda25_ (self, index, error);
#line 9731 "gitg-stage.c"
}


static gboolean gitg_stage_unstage_co (GitgStageUnstageData* _data_) {
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 9740 "gitg-stage.c"
		goto _state_0;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 9744 "gitg-stage.c"
		goto _state_1;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 2:
#line 9748 "gitg-stage.c"
		goto _state_2;
		default:
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 9753 "gitg-stage.c"
	}
	_state_0:
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_ = g_slice_new0 (Block32Data);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_->_ref_count_ = 1;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_->self = g_object_ref (_data_->self);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->file;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_data32_->file);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_->file = _data_->_tmp0_;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_->_async_data_ = _data_;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree (_data_->self, gitg_stage_unstage_ready, _data_);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9778 "gitg-stage.c"
	_state_1:
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = gitg_stage_get_head_tree_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_->tree = _data_->_tmp1_;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block32_data_unref (_data_->_data32_);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data32_ = NULL;
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9800 "gitg-stage.c"
		} else {
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 9804 "gitg-stage.c"
		}
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 849 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 9810 "gitg-stage.c"
	}
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 2;
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda25__gitg_stage_with_index_func, _data_->_data32_, gitg_stage_unstage_ready, _data_);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9818 "gitg-stage.c"
	_state_2:
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block32_data_unref (_data_->_data32_);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data32_ = NULL;
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9836 "gitg-stage.c"
		} else {
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 9840 "gitg-stage.c"
		}
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 851 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 9846 "gitg-stage.c"
	}
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block32_data_unref (_data_->_data32_);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data32_ = NULL;
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 9856 "gitg-stage.c"
	} else {
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 9860 "gitg-stage.c"
	}
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 847 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9866 "gitg-stage.c"
}


static void gitg_stage_unstage_path_data_free (gpointer _data) {
	GitgStageUnstagePathData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageUnstagePathData, _data_);
#line 9879 "gitg-stage.c"
}


void gitg_stage_unstage_path (GitgStage* self, const gchar* path, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageUnstagePathData* _data_;
	GitgStage* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageUnstagePathData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_unstage_path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_unstage_path_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = path;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_free0 (_data_->path);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->path = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_path_co (_data_);
#line 9908 "gitg-stage.c"
}


void gitg_stage_unstage_path_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageUnstagePathData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 9918 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 9922 "gitg-stage.c"
}


/**
 * Unstage a path from the index.
 *
 * @param path path relative to the working directory.
 *
 * Unstage changes in the specified relative path from the index. This will record
 * the state of the file in HEAD to the index.
 */
static void gitg_stage_unstage_path_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageUnstagePathData* _data_;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_path_co (_data_);
#line 9944 "gitg-stage.c"
}


static gboolean gitg_stage_unstage_path_co (GitgStageUnstagePathData* _data_) {
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 9953 "gitg-stage.c"
		goto _state_0;
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 9957 "gitg-stage.c"
		goto _state_1;
		default:
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 9962 "gitg-stage.c"
	}
	_state_0:
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->self->priv->d_repository;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp0_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->_tmp1_;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->path;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = g_file_resolve_relative_path (_data_->_tmp2_, _data_->_tmp3_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage (_data_->self, _data_->_tmp5_, gitg_stage_unstage_path_ready, _data_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 9995 "gitg-stage.c"
	_state_1:
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp5_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp2_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 10013 "gitg-stage.c"
		} else {
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 10017 "gitg-stage.c"
		}
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 882 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 10023 "gitg-stage.c"
	}
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 10029 "gitg-stage.c"
	} else {
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 10033 "gitg-stage.c"
	}
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 880 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 10039 "gitg-stage.c"
}


static void gitg_stage_unstage_patch_data_free (gpointer _data) {
	GitgStageUnstagePatchData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageUnstagePatchData, _data_);
#line 10050 "gitg-stage.c"
}


void gitg_stage_unstage_patch (GitgStage* self, GitgPatchSet* patch, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageUnstagePatchData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgPatchSet* _tmp1_ = NULL;
	GitgPatchSet* _tmp2_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageUnstagePatchData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_unstage_patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_unstage_patch_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = patch;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _gitg_patch_set_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->patch);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->patch = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_patch_co (_data_);
#line 10079 "gitg-stage.c"
}


void gitg_stage_unstage_patch_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GitgStageUnstagePatchData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10089 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 10093 "gitg-stage.c"
}


/**
 * Unstage a patch from the index.
 *
 * @param patch the patch to unstage.
 *
 * Unstage a provided patch from the index. The patch should contain changes
 * of the file in the index to the file in HEAD.
 */
static Block33Data* block33_data_ref (Block33Data* _data33_) {
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_atomic_int_inc (&_data33_->_ref_count_);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return _data33_;
#line 10110 "gitg-stage.c"
}


static void block33_data_unref (void * _userdata_) {
	Block33Data* _data33_;
	_data33_ = (Block33Data*) _userdata_;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_atomic_int_dec_and_test (&_data33_->_ref_count_)) {
#line 10119 "gitg-stage.c"
		GitgStage* self;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		self = _data33_->self;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data33_->tree);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data33_->file);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (_data33_->patch);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (self);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_slice_free (Block33Data, _data33_);
#line 10133 "gitg-stage.c"
	}
}


static void gitg_stage_unstage_patch_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageUnstagePatchData* _data_;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_unstage_patch_co (_data_);
#line 10148 "gitg-stage.c"
}


static void __lambda26_ (Block33Data* _data33_, GgitIndex* index, GError** error) {
	GitgStage* self;
	GgitIndexEntries* entries = NULL;
	GgitIndex* _tmp0_ = NULL;
	GgitIndexEntries* _tmp1_ = NULL;
	GgitIndexEntry* entry = NULL;
	GgitIndexEntries* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	GgitIndexEntry* _tmp4_ = NULL;
	GgitIndexEntry* _tmp5_ = NULL;
	GgitTreeEntry* head_entry = NULL;
	GgitTree* _tmp9_ = NULL;
	GitgPatchSet* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	GgitTreeEntry* _tmp12_ = NULL;
	GgitBlob* head_blob = NULL;
	GitgRepository* _tmp13_ = NULL;
	GgitTreeEntry* _tmp14_ = NULL;
	GgitOId* _tmp15_ = NULL;
	GgitOId* _tmp16_ = NULL;
	gpointer _tmp17_ = NULL;
	GgitBlob* _tmp18_ = NULL;
	GgitBlob* index_blob = NULL;
	GitgRepository* _tmp19_ = NULL;
	GgitIndexEntry* _tmp20_ = NULL;
	GgitOId* _tmp21_ = NULL;
	GgitOId* _tmp22_ = NULL;
	gpointer _tmp23_ = NULL;
	GgitBlob* _tmp24_ = NULL;
	guchar* head_content = NULL;
	GgitBlob* _tmp25_ = NULL;
	gsize _tmp26_;
	guint8* _tmp27_ = NULL;
	gint head_content_length1 = 0;
	gint _head_content_size_ = 0;
	guchar* index_content = NULL;
	GgitBlob* _tmp28_ = NULL;
	gsize _tmp29_;
	guint8* _tmp30_ = NULL;
	gint index_content_length1 = 0;
	gint _index_content_size_ = 0;
	GMemoryInputStream* head_stream = NULL;
	guchar* _tmp31_ = NULL;
	gint _tmp31__length1 = 0;
	GBytes* _tmp32_ = NULL;
	GBytes* _tmp33_ = NULL;
	GMemoryInputStream* _tmp34_ = NULL;
	GMemoryInputStream* _tmp35_ = NULL;
	GMemoryInputStream* index_stream = NULL;
	guchar* _tmp36_ = NULL;
	gint _tmp36__length1 = 0;
	GBytes* _tmp37_ = NULL;
	GBytes* _tmp38_ = NULL;
	GMemoryInputStream* _tmp39_ = NULL;
	GMemoryInputStream* _tmp40_ = NULL;
	GitgPatchSet* reversed = NULL;
	GitgPatchSet* _tmp41_ = NULL;
	GitgPatchSet* _tmp42_ = NULL;
	GgitIndex* _tmp43_ = NULL;
	GMemoryInputStream* _tmp44_ = NULL;
	GMemoryInputStream* _tmp45_ = NULL;
	GitgPatchSet* _tmp46_ = NULL;
	GMemoryInputStream* _tmp47_ = NULL;
	GMemoryInputStream* _tmp48_ = NULL;
	GError * _inner_error_ = NULL;
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = _data33_->self;
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_return_if_fail (index != NULL);
#line 899 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = index;
#line 899 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = ggit_index_get_entries (_tmp0_);
#line 899 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entries = _tmp1_;
#line 900 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = entries;
#line 900 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _data33_->file;
#line 900 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = ggit_index_entries_get_by_path (_tmp2_, _tmp3_, 0);
#line 900 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	entry = _tmp4_;
#line 902 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp5_ = entry;
#line 902 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_tmp5_ == NULL) {
#line 10239 "gitg-stage.c"
		GitgPatchSet* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		GError* _tmp8_ = NULL;
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp6_ = _data33_->patch;
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp7_ = _tmp6_->filename;
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_tmp8_ = g_error_new_literal (GITG_STAGE_ERROR, GITG_STAGE_ERROR_INDEX_ENTRY_NOT_FOUND, _tmp7_);
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_inner_error_ = _tmp8_;
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 904 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10259 "gitg-stage.c"
	}
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp9_ = _data33_->tree;
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp10_ = _data33_->patch;
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp11_ = _tmp10_->filename;
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp12_ = ggit_tree_get_by_path (_tmp9_, _tmp11_, &_inner_error_);
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head_entry = _tmp12_;
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 907 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10281 "gitg-stage.c"
	}
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp13_ = self->priv->d_repository;
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp14_ = head_entry;
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp15_ = ggit_tree_entry_get_id (_tmp14_);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp16_ = _tmp15_;
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp17_ = gitg_repository_lookup (_tmp13_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp16_, &_inner_error_);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp18_ = (GgitBlob*) _tmp17_;
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_tmp16_);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head_blob = _tmp18_;
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (head_entry);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 908 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10311 "gitg-stage.c"
	}
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp19_ = self->priv->d_repository;
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp20_ = entry;
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp21_ = ggit_index_entry_get_id (_tmp20_);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp22_ = _tmp21_;
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp23_ = gitg_repository_lookup (_tmp19_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp22_, &_inner_error_);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp24_ = (GgitBlob*) _tmp23_;
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__vala_GgitOId_free0 (_tmp22_);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_blob = _tmp24_;
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_blob);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (head_entry);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 909 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10343 "gitg-stage.c"
	}
#line 911 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp25_ = head_blob;
#line 911 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp27_ = ggit_blob_get_raw_content (_tmp25_, &_tmp26_);
#line 911 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head_content = _tmp27_;
#line 911 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head_content_length1 = _tmp26_;
#line 911 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_head_content_size_ = head_content_length1;
#line 912 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp28_ = index_blob;
#line 912 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp30_ = ggit_blob_get_raw_content (_tmp28_, &_tmp29_);
#line 912 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_content = _tmp30_;
#line 912 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_content_length1 = _tmp29_;
#line 912 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_index_content_size_ = index_content_length1;
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp31_ = head_content;
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp31__length1 = head_content_length1;
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp32_ = g_bytes_new (_tmp31_, _tmp31__length1);
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp33_ = _tmp32_;
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp34_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_tmp33_);
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp35_ = _tmp34_;
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_bytes_unref0 (_tmp33_);
#line 914 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	head_stream = _tmp35_;
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp36_ = index_content;
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp36__length1 = index_content_length1;
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp37_ = g_bytes_new (_tmp36_, _tmp36__length1);
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp38_ = _tmp37_;
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp39_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_tmp38_);
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp40_ = _tmp39_;
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_bytes_unref0 (_tmp38_);
#line 915 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	index_stream = _tmp40_;
#line 917 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp41_ = _data33_->patch;
#line 917 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp42_ = gitg_patch_set_reversed (_tmp41_);
#line 917 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	reversed = _tmp42_;
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp43_ = index;
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp44_ = index_stream;
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp45_ = head_stream;
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp46_ = reversed;
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_apply_patch (self, _tmp43_, (GInputStream*) _tmp44_, (GInputStream*) _tmp45_, _tmp46_, &_inner_error_);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_stream);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_blob);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (head_entry);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 919 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10435 "gitg-stage.c"
	}
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp47_ = head_stream;
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp47_, NULL, &_inner_error_);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_stream);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_blob);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (head_entry);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 921 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10463 "gitg-stage.c"
	}
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp48_ = index_stream;
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_input_stream_close ((GInputStream*) _tmp48_, NULL, &_inner_error_);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_propagate_error (error, _inner_error_);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_gitg_patch_set_unref0 (reversed);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_stream);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_stream);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (index_blob);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (head_blob);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_tree_entry_unref0 (head_entry);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entry_unref0 (entry);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_ggit_index_entries_unref0 (entries);
#line 922 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return;
#line 10491 "gitg-stage.c"
	}
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (reversed);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (index_stream);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (head_stream);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (index_blob);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (head_blob);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_tree_entry_unref0 (head_entry);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entry_unref0 (entry);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_ggit_index_entries_unref0 (entries);
#line 10509 "gitg-stage.c"
}


static void ___lambda26__gitg_stage_with_index_func (GgitIndex* index, gpointer self, GError** error) {
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	__lambda26_ (self, index, error);
#line 10516 "gitg-stage.c"
}


static gboolean gitg_stage_unstage_patch_co (GitgStageUnstagePatchData* _data_) {
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 10525 "gitg-stage.c"
		goto _state_0;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 10529 "gitg-stage.c"
		goto _state_1;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 2:
#line 10533 "gitg-stage.c"
		goto _state_2;
		default:
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 10538 "gitg-stage.c"
	}
	_state_0:
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_ = g_slice_new0 (Block33Data);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->_ref_count_ = 1;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->self = g_object_ref (_data_->self);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->patch;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_gitg_patch_set_unref0 (_data_->_data33_->patch);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->patch = _data_->_tmp0_;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->_async_data_ = _data_;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->self->priv->d_repository;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp1_);
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = _data_->_tmp2_;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_data33_->patch;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->_tmp4_->filename;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = g_file_resolve_relative_path (_data_->_tmp3_, _data_->_tmp5_);
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp3_);
#line 895 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->file = _data_->_tmp7_;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree (_data_->self, gitg_stage_unstage_patch_ready, _data_);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 10595 "gitg-stage.c"
	_state_1:
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = NULL;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = gitg_stage_get_head_tree_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_->tree = _data_->_tmp8_;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block33_data_unref (_data_->_data33_);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data33_ = NULL;
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 10617 "gitg-stage.c"
		} else {
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 10621 "gitg-stage.c"
		}
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 896 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 10627 "gitg-stage.c"
	}
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 2;
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index (_data_->self, ___lambda26__gitg_stage_with_index_func, _data_->_data33_, gitg_stage_unstage_patch_ready, _data_);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 10635 "gitg-stage.c"
	_state_2:
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_thread_index_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		block33_data_unref (_data_->_data33_);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_data33_ = NULL;
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 10653 "gitg-stage.c"
		} else {
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 10657 "gitg-stage.c"
		}
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 898 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 10663 "gitg-stage.c"
	}
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	block33_data_unref (_data_->_data33_);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_data33_ = NULL;
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 10673 "gitg-stage.c"
	} else {
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 10677 "gitg-stage.c"
	}
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 893 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 10683 "gitg-stage.c"
}


static void gitg_stage_diff_index_all_data_free (gpointer _data) {
	GitgStageDiffIndexAllData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDiffIndexAllData, _data_);
#line 10698 "gitg-stage.c"
}


void gitg_stage_diff_index_all (GitgStage* self, GitgStageStatusItem** files, int files_length1, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDiffIndexAllData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgStageStatusItem** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GgitDiffOptions* _tmp2_ = NULL;
	GgitDiffOptions* _tmp3_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDiffIndexAllData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_diff_index_all);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_diff_index_all_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = files;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1__length1 = files_length1;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->files = _tmp1_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->files_length1 = _tmp1__length1;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = defopts;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->defopts = _tmp3_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_index_all_co (_data_);
#line 10737 "gitg-stage.c"
}


GgitDiff* gitg_stage_diff_index_all_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitDiff* result;
	GitgStageDiffIndexAllData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 10748 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 10758 "gitg-stage.c"
}


static void gitg_stage_diff_index_all_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageDiffIndexAllData* _data_;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_index_all_co (_data_);
#line 10772 "gitg-stage.c"
}


static gboolean gitg_stage_diff_index_all_co (GitgStageDiffIndexAllData* _data_) {
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 10781 "gitg-stage.c"
		goto _state_0;
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 10785 "gitg-stage.c"
		goto _state_1;
		default:
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 10790 "gitg-stage.c"
	}
	_state_0:
#line 929 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 929 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = ggit_diff_options_new ();
#line 929 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->opts = _data_->_tmp0_;
#line 931 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 931 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->opts;
#line 931 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_diff_options_set_flags (_data_->_tmp1_, (GGIT_DIFF_INCLUDE_UNTRACKED | GGIT_DIFF_DISABLE_PATHSPEC_MATCH) | GGIT_DIFF_RECURSE_UNTRACKED_DIRS);
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2__length1 = 0;
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->files;
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2__length1 = _data_->files_length1;
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp2_ != NULL) {
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = NULL;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3__length1 = 0;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = _data_->files;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3__length1 = _data_->files_length1;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = NULL;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = g_new0 (gchar*, _data_->_tmp3__length1 + 1);
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec_length1 = 0;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_pspec_size_ = 0;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec = _data_->_tmp4_;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec_length1 = _data_->_tmp3__length1;
#line 938 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_pspec_size_ = _data_->pspec_length1;
#line 10837 "gitg-stage.c"
		{
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->i = 0;
#line 10841 "gitg-stage.c"
			{
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_data_->_tmp5_ = TRUE;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				while (TRUE) {
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (!_data_->_tmp5_) {
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->_tmp6_ = 0;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->_tmp6_ = _data_->i;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->i = _data_->_tmp6_ + 1;
#line 10855 "gitg-stage.c"
					}
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp5_ = FALSE;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp7_ = 0;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp7_ = _data_->i;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8_ = NULL;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8__length1 = 0;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8_ = _data_->files;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8__length1 = _data_->files_length1;
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (!(_data_->_tmp7_ < _data_->_tmp8__length1)) {
#line 940 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						break;
#line 10875 "gitg-stage.c"
					}
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9__length1 = 0;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_ = _data_->pspec;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9__length1 = _data_->pspec_length1;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp10_ = 0;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp10_ = _data_->i;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11__length1 = 0;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11_ = _data_->files;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11__length1 = _data_->files_length1;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp12_ = 0;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp12_ = _data_->i;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp13_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp13_ = _data_->_tmp11_[_data_->_tmp12_];
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp14_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp14_ = gitg_stage_status_item_get_path (_data_->_tmp13_);
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp15_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp15_ = _data_->_tmp14_;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_g_free0 (_data_->_tmp9_[_data_->_tmp10_]);
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_[_data_->_tmp10_] = _data_->_tmp15_;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp16_ = NULL;
#line 942 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp16_ = _data_->_tmp9_[_data_->_tmp10_];
#line 10921 "gitg-stage.c"
				}
			}
		}
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp17_ = NULL;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp17_ = _data_->opts;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18_ = NULL;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18__length1 = 0;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18_ = _data_->pspec;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18__length1 = _data_->pspec_length1;
#line 945 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_pathspec (_data_->_tmp17_, _data_->_tmp18_);
#line 936 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec = (_vala_array_free (_data_->pspec, _data_->pspec_length1, (GDestroyNotify) g_free), NULL);
#line 10941 "gitg-stage.c"
	}
#line 948 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp19_ = NULL;
#line 948 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp19_ = _data_->defopts;
#line 948 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp19_ != NULL) {
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp20_ = NULL;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp20_ = _data_->opts;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp21_ = NULL;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp21_ = _data_->opts;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp22_ = 0;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp22_ = ggit_diff_options_get_flags (_data_->_tmp21_);
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp23_ = 0;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp24_ = NULL;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp24_ = _data_->defopts;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp25_ = 0;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp25_ = ggit_diff_options_get_flags (_data_->_tmp24_);
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp26_ = 0;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp26_ = _data_->_tmp25_;
#line 950 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_flags (_data_->_tmp21_, _data_->_tmp23_ | _data_->_tmp26_);
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp27_ = NULL;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp27_ = _data_->opts;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp28_ = NULL;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp28_ = _data_->defopts;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp29_ = 0;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp29_ = ggit_diff_options_get_n_context_lines (_data_->_tmp28_);
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp30_ = 0;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp30_ = _data_->_tmp29_;
#line 952 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_n_context_lines (_data_->_tmp27_, _data_->_tmp30_);
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp31_ = NULL;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp31_ = _data_->opts;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp32_ = NULL;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp32_ = _data_->defopts;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp33_ = 0;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp33_ = ggit_diff_options_get_n_interhunk_lines (_data_->_tmp32_);
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp34_ = 0;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp34_ = _data_->_tmp33_;
#line 953 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_n_interhunk_lines (_data_->_tmp31_, _data_->_tmp34_);
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp35_ = NULL;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp35_ = _data_->opts;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp36_ = NULL;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp36_ = _data_->defopts;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp37_ = NULL;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp37_ = ggit_diff_options_get_old_prefix (_data_->_tmp36_);
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp38_ = NULL;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp38_ = _data_->_tmp37_;
#line 955 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_old_prefix (_data_->_tmp35_, _data_->_tmp38_);
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp39_ = NULL;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp39_ = _data_->opts;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp40_ = NULL;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp40_ = _data_->defopts;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp41_ = NULL;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp41_ = ggit_diff_options_get_new_prefix (_data_->_tmp40_);
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp42_ = NULL;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp42_ = _data_->_tmp41_;
#line 956 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_new_prefix (_data_->_tmp39_, _data_->_tmp42_);
#line 11051 "gitg-stage.c"
	}
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_get_head_tree (_data_->self, gitg_stage_diff_index_all_ready, _data_);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 11059 "gitg-stage.c"
	_state_1:
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp43_ = NULL;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp43_ = gitg_stage_get_head_tree_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->tree = _data_->_tmp43_;
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->opts);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11079 "gitg-stage.c"
		} else {
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11083 "gitg-stage.c"
		}
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 959 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11089 "gitg-stage.c"
	}
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp45_ = NULL;
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp45_ = _data_->self->priv->d_repository;
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp46_ = NULL;
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp46_ = ggit_repository_get_index ((GgitRepository*) _data_->_tmp45_, &_data_->_inner_error_);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp44_ = _data_->_tmp46_;
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->tree);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->opts);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11115 "gitg-stage.c"
		} else {
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11119 "gitg-stage.c"
		}
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 963 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11125 "gitg-stage.c"
	}
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp48_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp48_ = _data_->self->priv->d_repository;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp49_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp49_ = _data_->tree;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp50_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp50_ = _data_->opts;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp51_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp51_ = ggit_diff_new_tree_to_index ((GgitRepository*) _data_->_tmp48_, _data_->_tmp49_, _data_->_tmp44_, _data_->_tmp50_, &_data_->_inner_error_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp47_ = _data_->_tmp51_;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->_tmp44_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->tree);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->opts);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11161 "gitg-stage.c"
		} else {
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11165 "gitg-stage.c"
		}
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11171 "gitg-stage.c"
	}
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp52_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp52_ = _data_->_tmp47_;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp47_ = NULL;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp52_;
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp47_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp44_);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->tree);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->opts);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11193 "gitg-stage.c"
	} else {
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11197 "gitg-stage.c"
	}
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 961 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp47_);
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp44_);
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->tree);
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->opts);
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11215 "gitg-stage.c"
	} else {
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11219 "gitg-stage.c"
	}
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 926 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 11225 "gitg-stage.c"
}


static void gitg_stage_diff_index_data_free (gpointer _data) {
	GitgStageDiffIndexData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->f);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDiffIndexData, _data_);
#line 11242 "gitg-stage.c"
}


void gitg_stage_diff_index (GitgStage* self, GitgStageStatusItem* f, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDiffIndexData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgStageStatusItem* _tmp1_ = NULL;
	GitgStageStatusItem* _tmp2_ = NULL;
	GgitDiffOptions* _tmp3_ = NULL;
	GgitDiffOptions* _tmp4_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDiffIndexData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_diff_index);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_diff_index_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = f;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->f);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->f = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = defopts;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->defopts = _tmp4_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_index_co (_data_);
#line 11281 "gitg-stage.c"
}


GgitDiff* gitg_stage_diff_index_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitDiff* result;
	GitgStageDiffIndexData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 11292 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 11302 "gitg-stage.c"
}


static void gitg_stage_diff_index_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageDiffIndexData* _data_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_index_co (_data_);
#line 11316 "gitg-stage.c"
}


static gboolean gitg_stage_diff_index_co (GitgStageDiffIndexData* _data_) {
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 11325 "gitg-stage.c"
		goto _state_0;
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 11329 "gitg-stage.c"
		goto _state_1;
		default:
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 11334 "gitg-stage.c"
	}
	_state_0:
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->f;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = g_new0 (GitgStageStatusItem*, 1 + 1);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_[0] = _data_->_tmp2_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4__length1 = 0;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4__length1 = 1;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->defopts;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_index_all (_data_->self, _data_->_tmp4_, 1, _data_->_tmp5_, gitg_stage_diff_index_ready, _data_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 11369 "gitg-stage.c"
	_state_1:
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = gitg_stage_diff_index_all_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_object_unref), NULL);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->_tmp7_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11393 "gitg-stage.c"
		} else {
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11397 "gitg-stage.c"
		}
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11403 "gitg-stage.c"
	}
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = _data_->_tmp0_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp8_;
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp0_);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11419 "gitg-stage.c"
	} else {
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11423 "gitg-stage.c"
	}
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 970 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp0_);
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11435 "gitg-stage.c"
	} else {
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11439 "gitg-stage.c"
	}
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 967 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 11445 "gitg-stage.c"
}


static void gitg_stage_diff_workdir_all_data_free (gpointer _data) {
	GitgStageDiffWorkdirAllData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDiffWorkdirAllData, _data_);
#line 11460 "gitg-stage.c"
}


void gitg_stage_diff_workdir_all (GitgStage* self, GitgStageStatusItem** files, int files_length1, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDiffWorkdirAllData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgStageStatusItem** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	GgitDiffOptions* _tmp2_ = NULL;
	GgitDiffOptions* _tmp3_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDiffWorkdirAllData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_diff_workdir_all);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_diff_workdir_all_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = files;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1__length1 = files_length1;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->files = _tmp1_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->files_length1 = _tmp1__length1;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = defopts;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = _g_object_ref0 (_tmp2_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->defopts = _tmp3_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_workdir_all_co (_data_);
#line 11499 "gitg-stage.c"
}


GgitDiff* gitg_stage_diff_workdir_all_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitDiff* result;
	GitgStageDiffWorkdirAllData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 11510 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 11520 "gitg-stage.c"
}


static gboolean gitg_stage_diff_workdir_all_co (GitgStageDiffWorkdirAllData* _data_) {
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 11529 "gitg-stage.c"
		goto _state_0;
		default:
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 11534 "gitg-stage.c"
	}
	_state_0:
#line 976 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 976 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = ggit_diff_options_new ();
#line 976 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->opts = _data_->_tmp0_;
#line 978 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 978 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->opts;
#line 978 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	ggit_diff_options_set_flags (_data_->_tmp1_, (GGIT_DIFF_INCLUDE_UNTRACKED | GGIT_DIFF_DISABLE_PATHSPEC_MATCH) | GGIT_DIFF_RECURSE_UNTRACKED_DIRS);
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2__length1 = 0;
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _data_->files;
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2__length1 = _data_->files_length1;
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp2_ != NULL) {
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = NULL;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3__length1 = 0;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3_ = _data_->files;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp3__length1 = _data_->files_length1;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = NULL;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp4_ = g_new0 (gchar*, _data_->_tmp3__length1 + 1);
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec_length1 = 0;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_pspec_size_ = 0;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec = _data_->_tmp4_;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec_length1 = _data_->_tmp3__length1;
#line 984 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_pspec_size_ = _data_->pspec_length1;
#line 11581 "gitg-stage.c"
		{
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			_data_->i = 0;
#line 11585 "gitg-stage.c"
			{
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				_data_->_tmp5_ = TRUE;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
				while (TRUE) {
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (!_data_->_tmp5_) {
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->_tmp6_ = 0;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->_tmp6_ = _data_->i;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						_data_->i = _data_->_tmp6_ + 1;
#line 11599 "gitg-stage.c"
					}
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp5_ = FALSE;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp7_ = 0;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp7_ = _data_->i;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8_ = NULL;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8__length1 = 0;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8_ = _data_->files;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp8__length1 = _data_->files_length1;
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					if (!(_data_->_tmp7_ < _data_->_tmp8__length1)) {
#line 986 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
						break;
#line 11619 "gitg-stage.c"
					}
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9__length1 = 0;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_ = _data_->pspec;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9__length1 = _data_->pspec_length1;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp10_ = 0;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp10_ = _data_->i;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11__length1 = 0;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11_ = _data_->files;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp11__length1 = _data_->files_length1;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp12_ = 0;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp12_ = _data_->i;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp13_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp13_ = _data_->_tmp11_[_data_->_tmp12_];
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp14_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp14_ = gitg_stage_status_item_get_path (_data_->_tmp13_);
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp15_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp15_ = _data_->_tmp14_;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_g_free0 (_data_->_tmp9_[_data_->_tmp10_]);
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp9_[_data_->_tmp10_] = _data_->_tmp15_;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp16_ = NULL;
#line 988 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
					_data_->_tmp16_ = _data_->_tmp9_[_data_->_tmp10_];
#line 11665 "gitg-stage.c"
				}
			}
		}
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp17_ = NULL;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp17_ = _data_->opts;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18_ = NULL;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18__length1 = 0;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18_ = _data_->pspec;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp18__length1 = _data_->pspec_length1;
#line 991 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_pathspec (_data_->_tmp17_, _data_->_tmp18_);
#line 982 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->pspec = (_vala_array_free (_data_->pspec, _data_->pspec_length1, (GDestroyNotify) g_free), NULL);
#line 11685 "gitg-stage.c"
	}
#line 994 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp19_ = NULL;
#line 994 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp19_ = _data_->defopts;
#line 994 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_tmp19_ != NULL) {
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp20_ = NULL;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp20_ = _data_->opts;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp21_ = NULL;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp21_ = _data_->opts;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp22_ = 0;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp22_ = ggit_diff_options_get_flags (_data_->_tmp21_);
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp23_ = 0;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp24_ = NULL;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp24_ = _data_->defopts;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp25_ = 0;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp25_ = ggit_diff_options_get_flags (_data_->_tmp24_);
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp26_ = 0;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp26_ = _data_->_tmp25_;
#line 996 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_flags (_data_->_tmp21_, _data_->_tmp23_ | _data_->_tmp26_);
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp27_ = NULL;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp27_ = _data_->opts;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp28_ = NULL;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp28_ = _data_->defopts;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp29_ = 0;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp29_ = ggit_diff_options_get_n_context_lines (_data_->_tmp28_);
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp30_ = 0;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp30_ = _data_->_tmp29_;
#line 998 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_n_context_lines (_data_->_tmp27_, _data_->_tmp30_);
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp31_ = NULL;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp31_ = _data_->opts;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp32_ = NULL;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp32_ = _data_->defopts;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp33_ = 0;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp33_ = ggit_diff_options_get_n_interhunk_lines (_data_->_tmp32_);
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp34_ = 0;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp34_ = _data_->_tmp33_;
#line 999 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_n_interhunk_lines (_data_->_tmp31_, _data_->_tmp34_);
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp35_ = NULL;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp35_ = _data_->opts;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp36_ = NULL;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp36_ = _data_->defopts;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp37_ = NULL;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp37_ = ggit_diff_options_get_old_prefix (_data_->_tmp36_);
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp38_ = NULL;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp38_ = _data_->_tmp37_;
#line 1001 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_old_prefix (_data_->_tmp35_, _data_->_tmp38_);
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp39_ = NULL;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp39_ = _data_->opts;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp40_ = NULL;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp40_ = _data_->defopts;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp41_ = NULL;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp41_ = ggit_diff_options_get_new_prefix (_data_->_tmp40_);
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp42_ = NULL;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_data_->_tmp42_ = _data_->_tmp41_;
#line 1002 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		ggit_diff_options_set_new_prefix (_data_->_tmp39_, _data_->_tmp42_);
#line 11795 "gitg-stage.c"
	}
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp44_ = NULL;
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp44_ = _data_->self->priv->d_repository;
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp45_ = NULL;
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp45_ = ggit_repository_get_index ((GgitRepository*) _data_->_tmp44_, &_data_->_inner_error_);
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp43_ = _data_->_tmp45_;
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->opts);
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11819 "gitg-stage.c"
		} else {
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11823 "gitg-stage.c"
		}
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 1006 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11829 "gitg-stage.c"
	}
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp47_ = NULL;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp47_ = _data_->self->priv->d_repository;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp48_ = NULL;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp48_ = _data_->opts;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp49_ = NULL;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp49_ = ggit_diff_new_index_to_workdir ((GgitRepository*) _data_->_tmp47_, _data_->_tmp43_, _data_->_tmp48_, &_data_->_inner_error_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp46_ = _data_->_tmp49_;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->_tmp43_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		_g_object_unref0 (_data_->opts);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11859 "gitg-stage.c"
		} else {
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 11863 "gitg-stage.c"
		}
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 11869 "gitg-stage.c"
	}
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp50_ = NULL;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp50_ = _data_->_tmp46_;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp46_ = NULL;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp50_;
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp46_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp43_);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->opts);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11889 "gitg-stage.c"
	} else {
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11893 "gitg-stage.c"
	}
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 1005 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp46_);
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp43_);
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->opts);
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 11909 "gitg-stage.c"
	} else {
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 11913 "gitg-stage.c"
	}
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 973 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 11919 "gitg-stage.c"
}


static void gitg_stage_diff_workdir_data_free (gpointer _data) {
	GitgStageDiffWorkdirData* _data_;
	_data_ = _data;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->f);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->result);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_slice_free (GitgStageDiffWorkdirData, _data_);
#line 11936 "gitg-stage.c"
}


void gitg_stage_diff_workdir (GitgStage* self, GitgStageStatusItem* f, GgitDiffOptions* defopts, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	GitgStageDiffWorkdirData* _data_;
	GitgStage* _tmp0_ = NULL;
	GitgStageStatusItem* _tmp1_ = NULL;
	GitgStageStatusItem* _tmp2_ = NULL;
	GgitDiffOptions* _tmp3_ = NULL;
	GgitDiffOptions* _tmp4_ = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_slice_new0 (GitgStageDiffWorkdirData);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, gitg_stage_diff_workdir);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, gitg_stage_diff_workdir_data_free);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->self = _tmp0_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp1_ = f;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->f);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->f = _tmp2_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp3_ = defopts;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->defopts);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->defopts = _tmp4_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_workdir_co (_data_);
#line 11975 "gitg-stage.c"
}


GgitDiff* gitg_stage_diff_workdir_finish (GitgStage* self, GAsyncResult* _res_, GError** error) {
	GgitDiff* result;
	GitgStageDiffWorkdirData* _data_;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return NULL;
#line 11986 "gitg-stage.c"
	}
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	result = _data_->result;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = NULL;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return result;
#line 11996 "gitg-stage.c"
}


static void gitg_stage_diff_workdir_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	GitgStageDiffWorkdirData* _data_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_ = _user_data_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_source_object_ = source_object;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_res_ = _res_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_workdir_co (_data_);
#line 12010 "gitg-stage.c"
}


static gboolean gitg_stage_diff_workdir_co (GitgStageDiffWorkdirData* _data_) {
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	switch (_data_->_state_) {
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 0:
#line 12019 "gitg-stage.c"
		goto _state_0;
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		case 1:
#line 12023 "gitg-stage.c"
		goto _state_1;
		default:
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_assert_not_reached ();
#line 12028 "gitg-stage.c"
	}
	_state_0:
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp1_ = _data_->f;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp2_ = _g_object_ref0 (_data_->_tmp1_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_ = g_new0 (GitgStageStatusItem*, 1 + 1);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp3_[0] = _data_->_tmp2_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4__length1 = 0;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = _data_->_tmp3_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4__length1 = 1;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp5_ = _data_->defopts;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_state_ = 1;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_diff_workdir_all (_data_->self, _data_->_tmp4_, 1, _data_->_tmp5_, gitg_stage_diff_workdir_ready, _data_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 12063 "gitg-stage.c"
	_state_1:
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp6_ = gitg_stage_diff_workdir_all_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp7_ = _data_->_tmp6_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_object_unref), NULL);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = _data_->_tmp7_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_error_free (_data_->_inner_error_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		if (_data_->_state_ == 0) {
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 12087 "gitg-stage.c"
		} else {
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 12091 "gitg-stage.c"
		}
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_object_unref (_data_->_async_result);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		return FALSE;
#line 12097 "gitg-stage.c"
	}
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp8_ = _data_->_tmp0_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->_tmp0_ = NULL;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_data_->result = _data_->_tmp8_;
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp0_);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 12113 "gitg-stage.c"
	} else {
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 12117 "gitg-stage.c"
	}
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 1013 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (_data_->_tmp0_);
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	if (_data_->_state_ == 0) {
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 12129 "gitg-stage.c"
	} else {
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 12133 "gitg-stage.c"
	}
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_object_unref (_data_->_async_result);
#line 1010 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	return FALSE;
#line 12139 "gitg-stage.c"
}


static void gitg_stage_class_init (GitgStageClass * klass) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	gitg_stage_parent_class = g_type_class_peek_parent (klass);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_type_class_add_private (klass, sizeof (GitgStagePrivate));
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	G_OBJECT_CLASS (klass)->finalize = gitg_stage_finalize;
#line 12150 "gitg-stage.c"
}


static void gitg_stage_instance_init (GitgStage * self) {
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self->priv = GITG_STAGE_GET_PRIVATE (self);
#line 96 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_rec_mutex_init (&self->priv->__lock_d_index_mutex);
#line 12159 "gitg-stage.c"
}


static void gitg_stage_finalize (GObject* obj) {
	GitgStage * self;
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_STAGE, GitgStage);
#line 96 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	g_rec_mutex_clear (&self->priv->__lock_d_index_mutex);
#line 96 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_vala_clear_GMutex (&self->priv->d_index_mutex);
#line 97 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	_g_object_unref0 (self->priv->d_head_tree);
#line 93 "/home/garrett/hacking/gnome/gitg/libgitg/gitg-stage.vala"
	G_OBJECT_CLASS (gitg_stage_parent_class)->finalize (obj);
#line 12175 "gitg-stage.c"
}


GType gitg_stage_get_type (void) {
	static volatile gsize gitg_stage_type_id__volatile = 0;
	if (g_once_init_enter (&gitg_stage_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (GitgStageClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_stage_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgStage), 0, (GInstanceInitFunc) gitg_stage_instance_init, NULL };
		GType gitg_stage_type_id;
		gitg_stage_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgStage", &g_define_type_info, 0);
		g_once_init_leave (&gitg_stage_type_id__volatile, gitg_stage_type_id);
	}
	return gitg_stage_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static void _vala_clear_GMutex (GMutex * mutex) {
	GMutex zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GMutex))) {
		g_mutex_clear (mutex);
		memset (mutex, 0, sizeof (GMutex));
	}
}


static void _vala_clear_GRecMutex (GRecMutex * mutex) {
	GRecMutex zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GRecMutex))) {
		g_rec_mutex_clear (mutex);
		memset (mutex, 0, sizeof (GRecMutex));
	}
}


static void _vala_clear_GRWLock (GRWLock * mutex) {
	GRWLock zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GRWLock))) {
		g_rw_lock_clear (mutex);
		memset (mutex, 0, sizeof (GRWLock));
	}
}


static void _vala_clear_GCond (GCond * mutex) {
	GCond zero_mutex = { 0 };
	if (memcmp (mutex, &zero_mutex, sizeof (GCond))) {
		g_cond_clear (mutex);
		memset (mutex, 0, sizeof (GCond));
	}
}



