/* gitg-diff-view-file-info.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-diff-view-file-info.vala, do not modify */

#include <glib-object.h>
#include <libgit2-glib/ggit.h>
#include <glib.h>
#include "libgitg.h"
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define GITG_TYPE_DIFF_VIEW_FILE_INFO (gitg_diff_view_file_info_get_type ())
#define GITG_DIFF_VIEW_FILE_INFO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfo))
#define GITG_DIFF_VIEW_FILE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfoClass))
#define GITG_IS_DIFF_VIEW_FILE_INFO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_DIFF_VIEW_FILE_INFO))
#define GITG_IS_DIFF_VIEW_FILE_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GITG_TYPE_DIFF_VIEW_FILE_INFO))
#define GITG_DIFF_VIEW_FILE_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfoClass))

typedef struct _GitgDiffViewFileInfo GitgDiffViewFileInfo;
typedef struct _GitgDiffViewFileInfoClass GitgDiffViewFileInfoClass;
typedef struct _GitgDiffViewFileInfoPrivate GitgDiffViewFileInfoPrivate;
enum  {
	GITG_DIFF_VIEW_FILE_INFO_0_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY,
	GITG_DIFF_VIEW_FILE_INFO_NUM_PROPERTIES
};
static GParamSpec* gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_NUM_PROPERTIES];
#define _ggit_diff_delta_unref0(var) ((var == NULL) ? NULL : (var = (ggit_diff_delta_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _GitgDiffViewFileInfoQueryData GitgDiffViewFileInfoQueryData;
#define __vala_GgitOId_free0(var) ((var == NULL) ? NULL : (var = (_vala_GgitOId_free (var), NULL)))
#define _ggit_diff_file_unref0(var) ((var == NULL) ? NULL : (var = (ggit_diff_file_unref (var), NULL)))
#define _g_bytes_unref0(var) ((var == NULL) ? NULL : (var = (g_bytes_unref (var), NULL)))
typedef struct _GitgDiffViewFileInfoQueryContentData GitgDiffViewFileInfoQueryContentData;
typedef struct _GitgDiffViewFileInfoGuessContentTypeData GitgDiffViewFileInfoGuessContentTypeData;

struct _GitgDiffViewFileInfo {
	GObject parent_instance;
	GitgDiffViewFileInfoPrivate * priv;
};

struct _GitgDiffViewFileInfoClass {
	GObjectClass parent_class;
};

struct _GitgDiffViewFileInfoPrivate {
	GgitDiffDelta* _delta;
	gboolean _from_workdir;
	GitgRepository* _repository;
	GInputStream* _new_file_input_stream;
	gchar* _new_file_content_type;
};

struct _GitgDiffViewFileInfoQueryData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgDiffViewFileInfo* self;
	GCancellable* cancellable;
};

struct _GitgDiffViewFileInfoQueryContentData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgDiffViewFileInfo* self;
	GCancellable* cancellable;
	GgitDiffFile* file;
	GgitDiffDelta* _tmp0_;
	GgitDiffFile* _tmp1_;
	GgitDiffFile* _tmp2_;
	GgitOId* id;
	GgitDiffFile* _tmp3_;
	GgitOId* _tmp4_;
	GgitOId* _tmp5_;
	gchar* path;
	GgitDiffFile* _tmp6_;
	const gchar* _tmp7_;
	gchar* _tmp8_;
	gboolean _tmp9_;
	gboolean _tmp10_;
	GitgRepository* _tmp11_;
	gboolean _tmp12_;
	GgitOId* _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	const gchar* _tmp16_;
	gboolean _tmp17_;
	GFile* workdir;
	GitgRepository* _tmp18_;
	GFile* _tmp19_;
	GFile* _tmp20_;
	GFile* _tmp21_;
	GFile* _tmp22_;
	const gchar* _tmp23_;
	GFile* _tmp24_;
	GFile* location;
	GFile* _tmp25_;
	gboolean _tmp26_;
	GgitBlob* blob;
	GgitBlob* _tmp27_;
	GitgRepository* _tmp28_;
	GgitOId* _tmp29_;
	gpointer _tmp30_;
	GgitBlob* _tmp31_;
	guint8* raw_content;
	GgitBlob* _tmp32_;
	gsize _tmp33_;
	guint8* _tmp34_;
	guint8* _tmp35_;
	gint _tmp35__length1;
	gint raw_content_length1;
	gint _raw_content_size_;
	GitgRepository* _tmp36_;
	GgitDiffFile* _tmp37_;
	GitgRepository* _tmp38_;
	GgitDiffFile* _tmp39_;
	guint8* _tmp40_;
	gint _tmp40__length1;
	gint _tmp41_;
	guint8* _tmp42_;
	GBytes* bytes;
	guint8* _tmp43_;
	gint _tmp43__length1;
	GBytes* _tmp44_;
	GBytes* _tmp45_;
	GMemoryInputStream* _tmp46_;
	GMemoryInputStream* _tmp47_;
	GFile* _tmp48_;
	GitgRepository* _tmp49_;
	GgitDiffFile* _tmp50_;
	guint8* content;
	gint content_length1;
	gint _content_size_;
	GFile* _tmp51_;
	guint8* _tmp52_;
	gsize _tmp53_;
	GitgRepository* _tmp54_;
	GgitDiffFile* _tmp55_;
	guint8* _tmp56_;
	gint _tmp56__length1;
	gint _tmp57_;
	guint8* _tmp58_;
	GBytes* _vala1_bytes;
	guint8* _tmp59_;
	gint _tmp59__length1;
	GBytes* _tmp60_;
	GBytes* _tmp61_;
	GMemoryInputStream* _tmp62_;
	GMemoryInputStream* _tmp63_;
	GFileInputStream* _tmp64_;
	GFile* _tmp65_;
	GFileInputStream* _tmp66_;
	GSeekable* seekable;
	GInputStream* _tmp67_;
	GSeekable* _tmp68_;
	gboolean _tmp69_;
	GSeekable* _tmp70_;
	GSeekable* _tmp71_;
	gchar* _tmp72_;
	GFile* _tmp73_;
	GFile* _tmp74_;
	gchar* _tmp75_;
	GInputStream* _tmp76_;
	GSeekable* _tmp77_;
	FILE* _tmp78_;
	GError* _inner_error0_;
};

struct _GitgDiffViewFileInfoGuessContentTypeData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	GitgDiffViewFileInfo* self;
	GInputStream* stream;
	gchar* basename;
	GCancellable* cancellable;
	guint8* buffer;
	guint8* _tmp0_;
	gint buffer_length1;
	gint _buffer_size_;
	gsize bytes_read;
	gsize _tmp1_;
	gboolean uncertain;
	gboolean _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GError* _inner_error0_;
};

static gint GitgDiffViewFileInfo_private_offset;
static gpointer gitg_diff_view_file_info_parent_class = NULL;

VALA_EXTERN GType gitg_diff_view_file_info_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GitgDiffViewFileInfo* gitg_diff_view_file_info_new (GitgRepository* repository,
                                                    GgitDiffDelta* delta,
                                                    gboolean from_workdir);
VALA_EXTERN GitgDiffViewFileInfo* gitg_diff_view_file_info_construct (GType object_type,
                                                          GitgRepository* repository,
                                                          GgitDiffDelta* delta,
                                                          gboolean from_workdir);
static void gitg_diff_view_file_info_query_data_free (gpointer _data);
VALA_EXTERN void gitg_diff_view_file_info_query (GitgDiffViewFileInfo* self,
                                     GCancellable* cancellable,
                                     GAsyncReadyCallback _callback_,
                                     gpointer _user_data_);
VALA_EXTERN void gitg_diff_view_file_info_query_finish (GitgDiffViewFileInfo* self,
                                            GAsyncResult* _res_);
static gboolean gitg_diff_view_file_info_query_co (GitgDiffViewFileInfoQueryData* _data_);
static void gitg_diff_view_file_info_query_content (GitgDiffViewFileInfo* self,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_);
static void gitg_diff_view_file_info_query_content_finish (GitgDiffViewFileInfo* self,
                                                    GAsyncResult* _res_);
static void gitg_diff_view_file_info_query_ready (GObject* source_object,
                                           GAsyncResult* _res_,
                                           gpointer _user_data_);
static void gitg_diff_view_file_info_query_content_data_free (gpointer _data);
static gboolean gitg_diff_view_file_info_query_content_co (GitgDiffViewFileInfoQueryContentData* _data_);
VALA_EXTERN GgitDiffDelta* gitg_diff_view_file_info_get_delta (GitgDiffViewFileInfo* self);
static GgitOId* _vala_GgitOId_copy (GgitOId* self);
VALA_EXTERN GitgRepository* gitg_diff_view_file_info_get_repository (GitgDiffViewFileInfo* self);
VALA_EXTERN gboolean gitg_diff_view_file_info_get_from_workdir (GitgDiffViewFileInfo* self);
static void _vala_GgitOId_free (GgitOId* self);
static guint8* _vala_array_dup10 (guint8* self,
                           gssize length);
VALA_EXTERN void gitg_diff_view_file_info_set_new_file_input_stream (GitgDiffViewFileInfo* self,
                                                         GInputStream* value);
static void gitg_diff_view_file_info_query_content_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_);
VALA_EXTERN GInputStream* gitg_diff_view_file_info_get_new_file_input_stream (GitgDiffViewFileInfo* self);
static void gitg_diff_view_file_info_guess_content_type (GitgDiffViewFileInfo* self,
                                                  GInputStream* stream,
                                                  const gchar* basename,
                                                  GCancellable* cancellable,
                                                  GAsyncReadyCallback _callback_,
                                                  gpointer _user_data_);
static void gitg_diff_view_file_info_guess_content_type_finish (GitgDiffViewFileInfo* self,
                                                         GAsyncResult* _res_);
static void gitg_diff_view_file_info_guess_content_type_data_free (gpointer _data);
static gboolean gitg_diff_view_file_info_guess_content_type_co (GitgDiffViewFileInfoGuessContentTypeData* _data_);
static void gitg_diff_view_file_info_guess_content_type_ready (GObject* source_object,
                                                        GAsyncResult* _res_,
                                                        gpointer _user_data_);
static void gitg_diff_view_file_info_set_new_file_content_type (GitgDiffViewFileInfo* self,
                                                         const gchar* value);
VALA_EXTERN void gitg_diff_view_file_info_set_delta (GitgDiffViewFileInfo* self,
                                         GgitDiffDelta* value);
VALA_EXTERN void gitg_diff_view_file_info_set_from_workdir (GitgDiffViewFileInfo* self,
                                                gboolean value);
VALA_EXTERN void gitg_diff_view_file_info_set_repository (GitgDiffViewFileInfo* self,
                                              GitgRepository* value);
VALA_EXTERN const gchar* gitg_diff_view_file_info_get_new_file_content_type (GitgDiffViewFileInfo* self);
static void gitg_diff_view_file_info_finalize (GObject * obj);
static GType gitg_diff_view_file_info_get_type_once (void);
static void _vala_gitg_diff_view_file_info_get_property (GObject * object,
                                                  guint property_id,
                                                  GValue * value,
                                                  GParamSpec * pspec);
static void _vala_gitg_diff_view_file_info_set_property (GObject * object,
                                                  guint property_id,
                                                  const GValue * value,
                                                  GParamSpec * pspec);

static inline gpointer
gitg_diff_view_file_info_get_instance_private (GitgDiffViewFileInfo* self)
{
	return G_STRUCT_MEMBER_P (self, GitgDiffViewFileInfo_private_offset);
}

GitgDiffViewFileInfo*
gitg_diff_view_file_info_construct (GType object_type,
                                    GitgRepository* repository,
                                    GgitDiffDelta* delta,
                                    gboolean from_workdir)
{
	GitgDiffViewFileInfo * self = NULL;
	g_return_val_if_fail (delta != NULL, NULL);
	self = (GitgDiffViewFileInfo*) g_object_new (object_type, "repository", repository, "delta", delta, "from-workdir", from_workdir, NULL);
	return self;
}

GitgDiffViewFileInfo*
gitg_diff_view_file_info_new (GitgRepository* repository,
                              GgitDiffDelta* delta,
                              gboolean from_workdir)
{
	return gitg_diff_view_file_info_construct (GITG_TYPE_DIFF_VIEW_FILE_INFO, repository, delta, from_workdir);
}

static void
gitg_diff_view_file_info_query_data_free (gpointer _data)
{
	GitgDiffViewFileInfoQueryData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgDiffViewFileInfoQueryData, _data_);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

void
gitg_diff_view_file_info_query (GitgDiffViewFileInfo* self,
                                GCancellable* cancellable,
                                GAsyncReadyCallback _callback_,
                                gpointer _user_data_)
{
	GitgDiffViewFileInfoQueryData* _data_;
	GitgDiffViewFileInfo* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (GitgDiffViewFileInfoQueryData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_diff_view_file_info_query_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	gitg_diff_view_file_info_query_co (_data_);
}

void
gitg_diff_view_file_info_query_finish (GitgDiffViewFileInfo* self,
                                       GAsyncResult* _res_)
{
	GitgDiffViewFileInfoQueryData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static void
gitg_diff_view_file_info_query_ready (GObject* source_object,
                                      GAsyncResult* _res_,
                                      gpointer _user_data_)
{
	GitgDiffViewFileInfoQueryData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_diff_view_file_info_query_co (_data_);
}

static gboolean
gitg_diff_view_file_info_query_co (GitgDiffViewFileInfoQueryData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_state_ = 1;
	gitg_diff_view_file_info_query_content (_data_->self, _data_->cancellable, gitg_diff_view_file_info_query_ready, _data_);
	return FALSE;
	_state_1:
	gitg_diff_view_file_info_query_content_finish (_data_->self, _data_->_res_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gitg_diff_view_file_info_query_content_data_free (gpointer _data)
{
	GitgDiffViewFileInfoQueryContentData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgDiffViewFileInfoQueryContentData, _data_);
}

static void
gitg_diff_view_file_info_query_content (GitgDiffViewFileInfo* self,
                                        GCancellable* cancellable,
                                        GAsyncReadyCallback _callback_,
                                        gpointer _user_data_)
{
	GitgDiffViewFileInfoQueryContentData* _data_;
	GitgDiffViewFileInfo* _tmp0_;
	GCancellable* _tmp1_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (GitgDiffViewFileInfoQueryContentData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_diff_view_file_info_query_content_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp1_;
	gitg_diff_view_file_info_query_content_co (_data_);
}

static void
gitg_diff_view_file_info_query_content_finish (GitgDiffViewFileInfo* self,
                                               GAsyncResult* _res_)
{
	GitgDiffViewFileInfoQueryContentData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static gpointer
_ggit_diff_file_ref0 (gpointer self)
{
	return self ? ggit_diff_file_ref (self) : NULL;
}

static GgitOId*
_vala_GgitOId_copy (GgitOId* self)
{
	return g_boxed_copy (ggit_oid_get_type (), self);
}

static gpointer
__vala_GgitOId_copy0 (gpointer self)
{
	return self ? _vala_GgitOId_copy (self) : NULL;
}

static void
_vala_GgitOId_free (GgitOId* self)
{
	g_boxed_free (ggit_oid_get_type (), self);
}

static guint8*
_vala_array_dup10 (guint8* self,
                   gssize length)
{
	if (length > 0) {
		return g_memdup2 (self, length * sizeof (guint8));
	}
	return NULL;
}

static void
gitg_diff_view_file_info_query_content_ready (GObject* source_object,
                                              GAsyncResult* _res_,
                                              gpointer _user_data_)
{
	GitgDiffViewFileInfoQueryContentData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_diff_view_file_info_query_content_co (_data_);
}

static gboolean
gitg_diff_view_file_info_query_content_co (GitgDiffViewFileInfoQueryContentData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->_delta;
	_data_->_tmp1_ = ggit_diff_delta_get_new_file (_data_->_tmp0_);
	_data_->_tmp2_ = _ggit_diff_file_ref0 (_data_->_tmp1_);
	_data_->file = _data_->_tmp2_;
	_data_->_tmp3_ = _data_->file;
	_data_->_tmp4_ = ggit_diff_file_get_oid (_data_->_tmp3_);
	_data_->_tmp5_ = __vala_GgitOId_copy0 (_data_->_tmp4_);
	_data_->id = _data_->_tmp5_;
	_data_->_tmp6_ = _data_->file;
	_data_->_tmp7_ = ggit_diff_file_get_path (_data_->_tmp6_);
	_data_->_tmp8_ = g_strdup (_data_->_tmp7_);
	_data_->path = _data_->_tmp8_;
	_data_->_tmp11_ = _data_->self->priv->_repository;
	if (_data_->_tmp11_ == NULL) {
		_data_->_tmp10_ = TRUE;
	} else {
		_data_->_tmp13_ = _data_->id;
		if (ggit_oid_is_zero (_data_->_tmp13_)) {
			_data_->_tmp14_ = _data_->self->priv->_from_workdir;
			_data_->_tmp12_ = !_data_->_tmp14_;
		} else {
			_data_->_tmp12_ = FALSE;
		}
		_data_->_tmp10_ = _data_->_tmp12_;
	}
	if (_data_->_tmp10_) {
		_data_->_tmp9_ = TRUE;
	} else {
		_data_->_tmp16_ = _data_->path;
		if (_data_->_tmp16_ == NULL) {
			_data_->_tmp17_ = _data_->self->priv->_from_workdir;
			_data_->_tmp15_ = _data_->_tmp17_;
		} else {
			_data_->_tmp15_ = FALSE;
		}
		_data_->_tmp9_ = _data_->_tmp15_;
	}
	if (_data_->_tmp9_) {
		_g_free0 (_data_->path);
		__vala_GgitOId_free0 (_data_->id);
		_ggit_diff_file_unref0 (_data_->file);
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp18_ = _data_->self->priv->_repository;
	_data_->_tmp19_ = ggit_repository_get_workdir ((GgitRepository*) _data_->_tmp18_);
	_data_->workdir = _data_->_tmp19_;
	_data_->_tmp21_ = _data_->workdir;
	if (_data_->_tmp21_ != NULL) {
		_data_->_tmp22_ = _data_->workdir;
		_data_->_tmp23_ = _data_->path;
		_data_->_tmp24_ = g_file_get_child (_data_->_tmp22_, _data_->_tmp23_);
		_g_object_unref0 (_data_->_tmp20_);
		_data_->_tmp20_ = _data_->_tmp24_;
	} else {
		_g_object_unref0 (_data_->_tmp20_);
		_data_->_tmp20_ = NULL;
	}
	_data_->_tmp25_ = _data_->_tmp20_;
	_data_->_tmp20_ = NULL;
	_data_->location = _data_->_tmp25_;
	_data_->_tmp26_ = _data_->self->priv->_from_workdir;
	if (!_data_->_tmp26_) {
		{
			_data_->_tmp28_ = _data_->self->priv->_repository;
			_data_->_tmp29_ = _data_->id;
			_data_->_tmp30_ = gitg_repository_lookup (_data_->_tmp28_, ggit_blob_get_type (), (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, _data_->_tmp29_, &_data_->_inner_error0_);
			_data_->_tmp27_ = (GgitBlob*) _data_->_tmp30_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
			_data_->_tmp31_ = _data_->_tmp27_;
			_data_->_tmp27_ = NULL;
			_g_object_unref0 (_data_->blob);
			_data_->blob = _data_->_tmp31_;
			_g_object_unref0 (_data_->_tmp27_);
		}
		goto __finally0;
		__catch0_g_error:
		{
			g_clear_error (&_data_->_inner_error0_);
			_g_object_unref0 (_data_->blob);
			_g_object_unref0 (_data_->location);
			_g_object_unref0 (_data_->_tmp20_);
			_g_object_unref0 (_data_->workdir);
			_g_free0 (_data_->path);
			__vala_GgitOId_free0 (_data_->id);
			_ggit_diff_file_unref0 (_data_->file);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		__finally0:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_object_unref0 (_data_->blob);
			_g_object_unref0 (_data_->location);
			_g_object_unref0 (_data_->_tmp20_);
			_g_object_unref0 (_data_->workdir);
			_g_free0 (_data_->path);
			__vala_GgitOId_free0 (_data_->id);
			_ggit_diff_file_unref0 (_data_->file);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp32_ = _data_->blob;
		_data_->_tmp33_ = 0;
		_data_->_tmp34_ = ggit_blob_get_raw_content (_data_->_tmp32_, &_data_->_tmp33_);
		_data_->_tmp35_ = (_data_->_tmp34_ != NULL) ? _vala_array_dup10 (_data_->_tmp34_, _data_->_tmp33_) : _data_->_tmp34_;
		_data_->_tmp35__length1 = _data_->_tmp33_;
		_data_->raw_content = _data_->_tmp35_;
		_data_->raw_content_length1 = _data_->_tmp35__length1;
		_data_->_raw_content_size_ = _data_->raw_content_length1;
		_data_->_tmp36_ = _data_->self->priv->_repository;
		_data_->_tmp37_ = _data_->file;
		if (gitg_text_conv_has_textconv_command (_data_->_tmp36_, _data_->_tmp37_)) {
			_data_->_tmp38_ = _data_->self->priv->_repository;
			_data_->_tmp39_ = _data_->file;
			_data_->_tmp40_ = _data_->raw_content;
			_data_->_tmp40__length1 = _data_->raw_content_length1;
			_data_->_tmp41_ = 0;
			_data_->_tmp42_ = gitg_text_conv_get_textconv_content_from_raw (_data_->_tmp38_, _data_->_tmp39_, _data_->_tmp40_, (gint) _data_->_tmp40__length1, &_data_->_tmp41_);
			_data_->raw_content = (g_free (_data_->raw_content), NULL);
			_data_->raw_content = _data_->_tmp42_;
			_data_->raw_content_length1 = _data_->_tmp41_;
			_data_->_raw_content_size_ = _data_->raw_content_length1;
		}
		_data_->_tmp43_ = _data_->raw_content;
		_data_->_tmp43__length1 = _data_->raw_content_length1;
		_data_->_tmp44_ = g_bytes_new (_data_->_tmp43_, _data_->_tmp43__length1);
		_data_->bytes = _data_->_tmp44_;
		_data_->_tmp45_ = _data_->bytes;
		_data_->_tmp46_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_data_->_tmp45_);
		_data_->_tmp47_ = _data_->_tmp46_;
		gitg_diff_view_file_info_set_new_file_input_stream (_data_->self, (GInputStream*) _data_->_tmp47_);
		_g_object_unref0 (_data_->_tmp47_);
		_g_bytes_unref0 (_data_->bytes);
		_data_->raw_content = (g_free (_data_->raw_content), NULL);
		_g_object_unref0 (_data_->blob);
	} else {
		_data_->_tmp48_ = _data_->location;
		if (_data_->_tmp48_ != NULL) {
			{
				_data_->_tmp49_ = _data_->self->priv->_repository;
				_data_->_tmp50_ = _data_->file;
				if (gitg_text_conv_has_textconv_command (_data_->_tmp49_, _data_->_tmp50_)) {
					_data_->content = NULL;
					_data_->content_length1 = 0;
					_data_->_content_size_ = _data_->content_length1;
					_data_->_tmp51_ = _data_->location;
					_data_->_tmp52_ = NULL;
					_data_->_tmp53_ = 0;
					_data_->_state_ = 1;
					g_file_load_contents_async (_data_->_tmp51_, _data_->cancellable, gitg_diff_view_file_info_query_content_ready, _data_);
					return FALSE;
					_state_1:
					g_file_load_contents_finish (_data_->_tmp51_, _data_->_res_, &_data_->_tmp52_, &_data_->_tmp53_, NULL, &_data_->_inner_error0_);
					_data_->content = (g_free (_data_->content), NULL);
					_data_->content = _data_->_tmp52_;
					_data_->content_length1 = _data_->_tmp53_;
					_data_->_content_size_ = _data_->content_length1;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						_data_->content = (g_free (_data_->content), NULL);
						goto __catch1_g_error;
					}
					_data_->_tmp54_ = _data_->self->priv->_repository;
					_data_->_tmp55_ = _data_->file;
					_data_->_tmp56_ = _data_->content;
					_data_->_tmp56__length1 = _data_->content_length1;
					_data_->_tmp57_ = 0;
					_data_->_tmp58_ = gitg_text_conv_get_textconv_content_from_raw (_data_->_tmp54_, _data_->_tmp55_, _data_->_tmp56_, (gint) _data_->_tmp56__length1, &_data_->_tmp57_);
					_data_->content = (g_free (_data_->content), NULL);
					_data_->content = _data_->_tmp58_;
					_data_->content_length1 = _data_->_tmp57_;
					_data_->_content_size_ = _data_->content_length1;
					_data_->_tmp59_ = _data_->content;
					_data_->_tmp59__length1 = _data_->content_length1;
					_data_->_tmp60_ = g_bytes_new (_data_->_tmp59_, _data_->_tmp59__length1);
					_data_->_vala1_bytes = _data_->_tmp60_;
					_data_->_tmp61_ = _data_->_vala1_bytes;
					_data_->_tmp62_ = (GMemoryInputStream*) g_memory_input_stream_new_from_bytes (_data_->_tmp61_);
					_data_->_tmp63_ = _data_->_tmp62_;
					gitg_diff_view_file_info_set_new_file_input_stream (_data_->self, (GInputStream*) _data_->_tmp63_);
					_g_object_unref0 (_data_->_tmp63_);
					_g_bytes_unref0 (_data_->_vala1_bytes);
					_data_->content = (g_free (_data_->content), NULL);
				} else {
					_data_->_tmp65_ = _data_->location;
					_data_->_state_ = 2;
					g_file_read_async (_data_->_tmp65_, G_PRIORITY_DEFAULT, _data_->cancellable, gitg_diff_view_file_info_query_content_ready, _data_);
					return FALSE;
					_state_2:
					_data_->_tmp66_ = g_file_read_finish (_data_->_tmp65_, _data_->_res_, &_data_->_inner_error0_);
					_data_->_tmp64_ = _data_->_tmp66_;
					if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
						goto __catch1_g_error;
					}
					gitg_diff_view_file_info_set_new_file_input_stream (_data_->self, (GInputStream*) _data_->_tmp64_);
					_g_object_unref0 (_data_->_tmp64_);
				}
			}
			goto __finally1;
			__catch1_g_error:
			{
				g_clear_error (&_data_->_inner_error0_);
				_g_object_unref0 (_data_->location);
				_g_object_unref0 (_data_->_tmp20_);
				_g_object_unref0 (_data_->workdir);
				_g_free0 (_data_->path);
				__vala_GgitOId_free0 (_data_->id);
				_ggit_diff_file_unref0 (_data_->file);
				g_task_return_pointer (_data_->_async_result, _data_, NULL);
				if (_data_->_state_ != 0) {
					while (!g_task_get_completed (_data_->_async_result)) {
						g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
					}
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			__finally1:
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_object_unref0 (_data_->location);
				_g_object_unref0 (_data_->_tmp20_);
				_g_object_unref0 (_data_->workdir);
				_g_free0 (_data_->path);
				__vala_GgitOId_free0 (_data_->id);
				_ggit_diff_file_unref0 (_data_->file);
				g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
				g_clear_error (&_data_->_inner_error0_);
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	}
	_data_->_tmp67_ = _data_->self->priv->_new_file_input_stream;
	_data_->_tmp68_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp67_, g_seekable_get_type ()) ? ((GSeekable*) _data_->_tmp67_) : NULL);
	_data_->seekable = _data_->_tmp68_;
	_data_->_tmp70_ = _data_->seekable;
	if (_data_->_tmp70_ != NULL) {
		_data_->_tmp71_ = _data_->seekable;
		_data_->_tmp69_ = g_seekable_can_seek (_data_->_tmp71_);
	} else {
		_data_->_tmp69_ = FALSE;
	}
	if (_data_->_tmp69_) {
		_data_->_tmp73_ = _data_->location;
		if (_data_->_tmp73_ != NULL) {
			_data_->_tmp74_ = _data_->location;
			_data_->_tmp75_ = g_file_get_basename (_data_->_tmp74_);
			_g_free0 (_data_->_tmp72_);
			_data_->_tmp72_ = _data_->_tmp75_;
		} else {
			_g_free0 (_data_->_tmp72_);
			_data_->_tmp72_ = NULL;
		}
		_data_->_tmp76_ = _data_->self->priv->_new_file_input_stream;
		_data_->_state_ = 3;
		gitg_diff_view_file_info_guess_content_type (_data_->self, _data_->_tmp76_, _data_->_tmp72_, _data_->cancellable, gitg_diff_view_file_info_query_content_ready, _data_);
		return FALSE;
		_state_3:
		gitg_diff_view_file_info_guess_content_type_finish (_data_->self, _data_->_res_);
		{
			_data_->_tmp77_ = _data_->seekable;
			g_seekable_seek (_data_->_tmp77_, (gint64) 0, G_SEEK_SET, _data_->cancellable, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch2_g_error;
			}
		}
		goto __finally2;
		__catch2_g_error:
		{
			g_clear_error (&_data_->_inner_error0_);
			_data_->_tmp78_ = stderr;
			fprintf (_data_->_tmp78_, "Failed to seek back to beginning of stream...\n");
			gitg_diff_view_file_info_set_new_file_input_stream (_data_->self, NULL);
		}
		__finally2:
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			_g_free0 (_data_->_tmp72_);
			_g_object_unref0 (_data_->seekable);
			_g_object_unref0 (_data_->location);
			_g_object_unref0 (_data_->_tmp20_);
			_g_object_unref0 (_data_->workdir);
			_g_free0 (_data_->path);
			__vala_GgitOId_free0 (_data_->id);
			_ggit_diff_file_unref0 (_data_->file);
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
			g_clear_error (&_data_->_inner_error0_);
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_free0 (_data_->_tmp72_);
	}
	_g_object_unref0 (_data_->seekable);
	_g_object_unref0 (_data_->location);
	_g_object_unref0 (_data_->_tmp20_);
	_g_object_unref0 (_data_->workdir);
	_g_free0 (_data_->path);
	__vala_GgitOId_free0 (_data_->id);
	_ggit_diff_file_unref0 (_data_->file);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
gitg_diff_view_file_info_guess_content_type_data_free (gpointer _data)
{
	GitgDiffViewFileInfoGuessContentTypeData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->stream);
	_g_free0 (_data_->basename);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (GitgDiffViewFileInfoGuessContentTypeData, _data_);
}

static void
gitg_diff_view_file_info_guess_content_type (GitgDiffViewFileInfo* self,
                                             GInputStream* stream,
                                             const gchar* basename,
                                             GCancellable* cancellable,
                                             GAsyncReadyCallback _callback_,
                                             gpointer _user_data_)
{
	GitgDiffViewFileInfoGuessContentTypeData* _data_;
	GitgDiffViewFileInfo* _tmp0_;
	GInputStream* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (stream != NULL);
	g_return_if_fail (basename != NULL);
	_data_ = g_slice_new0 (GitgDiffViewFileInfoGuessContentTypeData);
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, gitg_diff_view_file_info_guess_content_type_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (stream);
	_g_object_unref0 (_data_->stream);
	_data_->stream = _tmp1_;
	_tmp2_ = g_strdup (basename);
	_g_free0 (_data_->basename);
	_data_->basename = _tmp2_;
	_tmp3_ = _g_object_ref0 (cancellable);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp3_;
	gitg_diff_view_file_info_guess_content_type_co (_data_);
}

static void
gitg_diff_view_file_info_guess_content_type_finish (GitgDiffViewFileInfo* self,
                                                    GAsyncResult* _res_)
{
	GitgDiffViewFileInfoGuessContentTypeData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	if (NULL == _data_) {
		return;
	}
}

static void
gitg_diff_view_file_info_guess_content_type_ready (GObject* source_object,
                                                   GAsyncResult* _res_,
                                                   gpointer _user_data_)
{
	GitgDiffViewFileInfoGuessContentTypeData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	gitg_diff_view_file_info_guess_content_type_co (_data_);
}

static gboolean
gitg_diff_view_file_info_guess_content_type_co (GitgDiffViewFileInfoGuessContentTypeData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_new0 (guint8, 4096);
	_data_->buffer = _data_->_tmp0_;
	_data_->buffer_length1 = 4096;
	_data_->_buffer_size_ = _data_->buffer_length1;
	_data_->bytes_read = (gsize) 0;
	{
		_data_->_tmp1_ = 0UL;
		_data_->_state_ = 1;
		g_input_stream_read_all_async (_data_->stream, _data_->buffer, (gsize) _data_->buffer_length1, G_PRIORITY_DEFAULT, _data_->cancellable, gitg_diff_view_file_info_guess_content_type_ready, _data_);
		return FALSE;
		_state_1:
		g_input_stream_read_all_finish (_data_->stream, _data_->_res_, &_data_->_tmp1_, &_data_->_inner_error0_);
		_data_->bytes_read = _data_->_tmp1_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		g_clear_error (&_data_->_inner_error0_);
		if (_data_->bytes_read <= ((gsize) 0)) {
			_data_->buffer = (g_free (_data_->buffer), NULL);
			g_task_return_pointer (_data_->_async_result, _data_, NULL);
			if (_data_->_state_ != 0) {
				while (!g_task_get_completed (_data_->_async_result)) {
					g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
				}
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		_data_->buffer = (g_free (_data_->buffer), NULL);
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->buffer_length1 = (gint) _data_->bytes_read;
	_data_->_tmp2_ = FALSE;
	_data_->_tmp3_ = g_content_type_guess (_data_->basename, _data_->buffer, (gsize) _data_->buffer_length1, &_data_->_tmp2_);
	_data_->uncertain = _data_->_tmp2_;
	_data_->_tmp4_ = _data_->_tmp3_;
	gitg_diff_view_file_info_set_new_file_content_type (_data_->self, _data_->_tmp4_);
	_g_free0 (_data_->_tmp4_);
	_data_->buffer = (g_free (_data_->buffer), NULL);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

GgitDiffDelta*
gitg_diff_view_file_info_get_delta (GitgDiffViewFileInfo* self)
{
	GgitDiffDelta* result;
	GgitDiffDelta* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_delta;
	result = _tmp0_;
	return result;
}

static gpointer
_ggit_diff_delta_ref0 (gpointer self)
{
	return self ? ggit_diff_delta_ref (self) : NULL;
}

void
gitg_diff_view_file_info_set_delta (GitgDiffViewFileInfo* self,
                                    GgitDiffDelta* value)
{
	GgitDiffDelta* old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_diff_view_file_info_get_delta (self);
	if (old_value != value) {
		GgitDiffDelta* _tmp0_;
		_tmp0_ = _ggit_diff_delta_ref0 (value);
		_ggit_diff_delta_unref0 (self->priv->_delta);
		self->priv->_delta = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY]);
	}
}

gboolean
gitg_diff_view_file_info_get_from_workdir (GitgDiffViewFileInfo* self)
{
	gboolean result;
	g_return_val_if_fail (self != NULL, FALSE);
	result = self->priv->_from_workdir;
	return result;
}

void
gitg_diff_view_file_info_set_from_workdir (GitgDiffViewFileInfo* self,
                                           gboolean value)
{
	gboolean old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_diff_view_file_info_get_from_workdir (self);
	if (old_value != value) {
		self->priv->_from_workdir = value;
		g_object_notify_by_pspec ((GObject *) self, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY]);
	}
}

GitgRepository*
gitg_diff_view_file_info_get_repository (GitgDiffViewFileInfo* self)
{
	GitgRepository* result;
	GitgRepository* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_repository;
	result = _tmp0_;
	return result;
}

void
gitg_diff_view_file_info_set_repository (GitgDiffViewFileInfo* self,
                                         GitgRepository* value)
{
	GitgRepository* old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_diff_view_file_info_get_repository (self);
	if (old_value != value) {
		GitgRepository* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_repository);
		self->priv->_repository = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY]);
	}
}

GInputStream*
gitg_diff_view_file_info_get_new_file_input_stream (GitgDiffViewFileInfo* self)
{
	GInputStream* result;
	GInputStream* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_new_file_input_stream;
	result = _tmp0_;
	return result;
}

void
gitg_diff_view_file_info_set_new_file_input_stream (GitgDiffViewFileInfo* self,
                                                    GInputStream* value)
{
	GInputStream* old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_diff_view_file_info_get_new_file_input_stream (self);
	if (old_value != value) {
		GInputStream* _tmp0_;
		_tmp0_ = _g_object_ref0 (value);
		_g_object_unref0 (self->priv->_new_file_input_stream);
		self->priv->_new_file_input_stream = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY]);
	}
}

const gchar*
gitg_diff_view_file_info_get_new_file_content_type (GitgDiffViewFileInfo* self)
{
	const gchar* result;
	const gchar* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	_tmp0_ = self->priv->_new_file_content_type;
	result = _tmp0_;
	return result;
}

static void
gitg_diff_view_file_info_set_new_file_content_type (GitgDiffViewFileInfo* self,
                                                    const gchar* value)
{
	gchar* old_value;
	g_return_if_fail (self != NULL);
	old_value = gitg_diff_view_file_info_get_new_file_content_type (self);
	if (g_strcmp0 (value, old_value) != 0) {
		gchar* _tmp0_;
		_tmp0_ = g_strdup (value);
		_g_free0 (self->priv->_new_file_content_type);
		self->priv->_new_file_content_type = _tmp0_;
		g_object_notify_by_pspec ((GObject *) self, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY]);
	}
}

static void
gitg_diff_view_file_info_class_init (GitgDiffViewFileInfoClass * klass,
                                     gpointer klass_data)
{
	gitg_diff_view_file_info_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &GitgDiffViewFileInfo_private_offset);
	G_OBJECT_CLASS (klass)->get_property = _vala_gitg_diff_view_file_info_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_gitg_diff_view_file_info_set_property;
	G_OBJECT_CLASS (klass)->finalize = gitg_diff_view_file_info_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY] = g_param_spec_boxed ("delta", "delta", "delta", ggit_diff_delta_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY] = g_param_spec_boolean ("from-workdir", "from-workdir", "from-workdir", FALSE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY] = g_param_spec_object ("repository", "repository", "repository", GITG_TYPE_REPOSITORY, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY] = g_param_spec_object ("new-file-input-stream", "new-file-input-stream", "new-file-input-stream", g_input_stream_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE));
	g_object_class_install_property (G_OBJECT_CLASS (klass), GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY, gitg_diff_view_file_info_properties[GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY] = g_param_spec_string ("new-file-content-type", "new-file-content-type", "new-file-content-type", NULL, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
}

static void
gitg_diff_view_file_info_instance_init (GitgDiffViewFileInfo * self,
                                        gpointer klass)
{
	self->priv = gitg_diff_view_file_info_get_instance_private (self);
}

static void
gitg_diff_view_file_info_finalize (GObject * obj)
{
	GitgDiffViewFileInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfo);
	_ggit_diff_delta_unref0 (self->priv->_delta);
	_g_object_unref0 (self->priv->_repository);
	_g_object_unref0 (self->priv->_new_file_input_stream);
	_g_free0 (self->priv->_new_file_content_type);
	G_OBJECT_CLASS (gitg_diff_view_file_info_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gitg_diff_view_file_info_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgDiffViewFileInfoClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_diff_view_file_info_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GitgDiffViewFileInfo), 0, (GInstanceInitFunc) gitg_diff_view_file_info_instance_init, NULL };
	GType gitg_diff_view_file_info_type_id;
	gitg_diff_view_file_info_type_id = g_type_register_static (G_TYPE_OBJECT, "GitgDiffViewFileInfo", &g_define_type_info, 0);
	GitgDiffViewFileInfo_private_offset = g_type_add_instance_private (gitg_diff_view_file_info_type_id, sizeof (GitgDiffViewFileInfoPrivate));
	return gitg_diff_view_file_info_type_id;
}

GType
gitg_diff_view_file_info_get_type (void)
{
	static gsize gitg_diff_view_file_info_type_id__once = 0;
	if (g_once_init_enter (&gitg_diff_view_file_info_type_id__once)) {
		GType gitg_diff_view_file_info_type_id;
		gitg_diff_view_file_info_type_id = gitg_diff_view_file_info_get_type_once ();
		g_once_init_leave (&gitg_diff_view_file_info_type_id__once, gitg_diff_view_file_info_type_id);
	}
	return gitg_diff_view_file_info_type_id__once;
}

static void
_vala_gitg_diff_view_file_info_get_property (GObject * object,
                                             guint property_id,
                                             GValue * value,
                                             GParamSpec * pspec)
{
	GitgDiffViewFileInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfo);
	switch (property_id) {
		case GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY:
		g_value_set_boxed (value, gitg_diff_view_file_info_get_delta (self));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY:
		g_value_set_boolean (value, gitg_diff_view_file_info_get_from_workdir (self));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY:
		g_value_set_object (value, gitg_diff_view_file_info_get_repository (self));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY:
		g_value_set_object (value, gitg_diff_view_file_info_get_new_file_input_stream (self));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY:
		g_value_set_string (value, gitg_diff_view_file_info_get_new_file_content_type (self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

static void
_vala_gitg_diff_view_file_info_set_property (GObject * object,
                                             guint property_id,
                                             const GValue * value,
                                             GParamSpec * pspec)
{
	GitgDiffViewFileInfo * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, GITG_TYPE_DIFF_VIEW_FILE_INFO, GitgDiffViewFileInfo);
	switch (property_id) {
		case GITG_DIFF_VIEW_FILE_INFO_DELTA_PROPERTY:
		gitg_diff_view_file_info_set_delta (self, g_value_get_boxed (value));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_FROM_WORKDIR_PROPERTY:
		gitg_diff_view_file_info_set_from_workdir (self, g_value_get_boolean (value));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_REPOSITORY_PROPERTY:
		gitg_diff_view_file_info_set_repository (self, g_value_get_object (value));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_INPUT_STREAM_PROPERTY:
		gitg_diff_view_file_info_set_new_file_input_stream (self, g_value_get_object (value));
		break;
		case GITG_DIFF_VIEW_FILE_INFO_NEW_FILE_CONTENT_TYPE_PROPERTY:
		gitg_diff_view_file_info_set_new_file_content_type (self, g_value_get_string (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}

