aboutsummaryrefslogtreecommitdiff
path: root/libs/git
diff options
context:
space:
mode:
Diffstat (limited to 'libs/git')
-rwxr-xr-xlibs/git25
1 files changed, 24 insertions, 1 deletions
diff --git a/libs/git b/libs/git
index a83f2246..6fbd2302 100755
--- a/libs/git
+++ b/libs/git
@@ -141,6 +141,26 @@ git_remove() {
)
}
+git_diff_staged_check() {
+ local repository_path=$1
+
+ (
+ cd "$repository_path"
+
+ git diff --staged --quiet
+ )
+}
+
+git_diff_check() {
+ local repository_path=$1
+
+ (
+ cd "$repository_path"
+
+ git diff --quiet
+ )
+}
+
git_commit() {
local repository_path=$1
local message=$2
@@ -340,7 +360,10 @@ git_project_prepare_blobs() {
git_remove "$repository_path" "$blob"
done < "$blobs_path"
- git_commit "$repository_path" "Removed blobs"
+ if ! git_diff_staged_check "$repository_path"
+ then
+ git_commit "$repository_path" "Removed blobs"
+ fi
}
git_project_prepare_patch() {