aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/git-sync8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/git-sync b/scripts/git-sync
index 17db0f6..cddacdd 100755
--- a/scripts/git-sync
+++ b/scripts/git-sync
@@ -4,6 +4,8 @@ set -eu
verbose=0
hosthash=$(python3 -c "import uuid, hashlib
print(hashlib.new('sha1', str(uuid.getnode()).encode('utf8')).hexdigest())")
+#hostident="${HOSTNAME}"
+hostident="${hosthash}"
if [ -d "$(git rev-parse --git-dir)/annex" ]; then
echo 'Sync: using git annex'
@@ -17,7 +19,7 @@ branch_name=$(git symbolic-ref -q --short HEAD)
remote_name=$(git config --get branch.${branch_name}.remote || true)
# conflict commit message
-conflict_message="Merge conflict autocommit on ${hosthash}"
+conflict_message="Merge conflict autocommit on ${hostident}"
if [ -z "$remote_name" ]; then
echo "No remote for this repository" >&2
@@ -37,7 +39,7 @@ fi
git add -A "./$(git rev-parse --show-cdup)"
if git status --porcelain | grep -q .; then
git status --short
- git commit -m "Auto-commit on ${hosthash}"
+ git commit -m "Auto-commit on ${hostident}"
fi
if [ "$verbose" -ne 0 ]; then
@@ -56,7 +58,7 @@ fi
git status --porcelain | while read -r filename; do
state="${filename:0:2}"
filename="${filename:3}"
- ours="${filename}.${hosthash}.conflict"
+ ours="${filename}.${hostident}.conflict"
theirs="${filename}.${remote_name}.conflict"
case "$state" in
*U*)