forked from Mirrors/flatpak-builder
git: Add helper for checking git version for feature
Closes: #62 Approved by: alexlarssontingping/wmclass
parent
baf8d4630b
commit
3d603320f2
|
@ -148,6 +148,12 @@ git_has_version (int major,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
git_version_supports_fsck_and_shallow (void)
|
||||||
|
{
|
||||||
|
return git_has_version (1,8,3,2);
|
||||||
|
}
|
||||||
|
|
||||||
static GHashTable *
|
static GHashTable *
|
||||||
git_ls_remote (GFile *repo_dir,
|
git_ls_remote (GFile *repo_dir,
|
||||||
const char *remote,
|
const char *remote,
|
||||||
|
@ -427,7 +433,7 @@ builder_git_mirror_repo (const char *repo_location,
|
||||||
gboolean was_shallow = FALSE;
|
gboolean was_shallow = FALSE;
|
||||||
gboolean do_disable_shallow = FALSE;
|
gboolean do_disable_shallow = FALSE;
|
||||||
|
|
||||||
gboolean git_supports_fsck_and_shallow = git_has_version (1,8,3,2);
|
gboolean git_supports_fsck_and_shallow = git_version_supports_fsck_and_shallow ();
|
||||||
|
|
||||||
cache_mirror_dir = git_get_mirror_dir (repo_location, context);
|
cache_mirror_dir = git_get_mirror_dir (repo_location, context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue