From 25948322d3835d47bf3b6b5fdbc428786a316a2a Mon Sep 17 00:00:00 2001
From: "Antoine R. Dumont (@ardumont)" <antoine.romain.dumont@gmail.com>
Date: Thu, 23 Jun 2016 12:30:35 +0200
Subject: [PATCH] Fix: echo -n to avoid adding an extra line

---
 bin/git-revhash | 4 ++--
 bin/swh-revhash | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bin/git-revhash b/bin/git-revhash
index 1c02c06f..69d1d1cd 100755
--- a/bin/git-revhash
+++ b/bin/git-revhash
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # Use
-# git-revhash 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nparent 22c0fa5195a53f2e733ec75a9b6e9d1624a8b771\nauthor seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\ncommitter seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\n\nmaking dir structure...'  # noqa
+# git-revhash 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nparent 22c0fa5195a53f2e733ec75a9b6e9d1624a8b771\nauthor seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\ncommitter seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\n\nmaking dir structure...\n'  # noqa
 # output: 17a631d474f49bbebfdf3d885dcde470d7faafd7
 
-echo -e $* | git hash-object --stdin -t commit
+echo -ne $* | git hash-object --stdin -t commit
diff --git a/bin/swh-revhash b/bin/swh-revhash
index 795acd30..c7e2998a 100755
--- a/bin/swh-revhash
+++ b/bin/swh-revhash
@@ -5,7 +5,7 @@
 # output: 17a631d474f49bbebfdf3d885dcde470d7faafd7
 
 # To compare with git:
-# echo -e 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nparent 22c0fa5195a53f2e733ec75a9b6e9d1624a8b771\nauthor seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\ncommitter seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\n\nmaking dir structure...' | git hash-object -t commit --stdin   # noqa
+# git-revhash 'tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\nparent 22c0fa5195a53f2e733ec75a9b6e9d1624a8b771\nauthor seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\ncommitter seanius <seanius@3187e211-bb14-4c82-9596-0b59d67cd7f4> 1138341044 +0000\n\nmaking dir structure...\n'   # noqa
 # output: 17a631d474f49bbebfdf3d885dcde470d7faafd7
 
 
-- 
GitLab