gnucash stable: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Mon May 12 15:42:23 EDT 2025


Updated	 via  https://github.com/Gnucash/gnucash/commit/9ea1734c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d38e0d23 (commit)
	from  https://github.com/Gnucash/gnucash/commit/3ac0c211 (commit)



commit 9ea1734c7b155fb512c0f16bee1d1ff5ade5f86e
Merge: 3ac0c2118b d38e0d232e
Author: John Ralls <jralls at ceridwen.us>
Date:   Mon May 12 12:30:45 2025 -0700

    Merge Bill Sommerfeld's 'gnc-vcs-info-echo' into stable.


commit d38e0d232e65401ae51c7c6f8ddf562fe9321d1c
Author: Bill Sommerfeld <sommerfeld at hamachi.org>
Date:   Mon May 12 09:31:23 2025 -0700

    Avoid non-POSIX "echo -n" behavior in util/gnc-vcs-info
    
    POSIX declined to standardize -n and recommends against using it.
    Instead, for -r, do a single echo with both the commithash and the modified flag.
    
    Tested on illumos, MacOS, and linux.

diff --git a/util/gnc-vcs-info b/util/gnc-vcs-info
index 0e38e784a3..cb9af943c6 100755
--- a/util/gnc-vcs-info
+++ b/util/gnc-vcs-info
@@ -102,13 +102,13 @@ then
     rc=$?
   fi
   if [ $rc = 0 ]; then
-    /bin/echo -n $githead
     # Add a "+" to the hash if there deleted or modified files (not excluded by .gitignore and friends)
+    modified=""
     # "Ignores" untracked files
-    # [ $("$GIT_CMD" --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
+    # [ $("$GIT_CMD" --git-dir "${real_gitdir}" ls-files -dkm 2>/dev/null | wc -l) -gt 0 ] && modified="+"
     # Includes untracked files
-    [ $("$GIT_CMD" --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && /bin/echo -n "+"
-    echo
+    [ $("$GIT_CMD" --git-dir "${real_gitdir}" ls-files -dkmo --exclude-standard 2>/dev/null | wc -l) -gt 0 ] && modified="+"
+    echo ${githead}${modified}
     exit 0
   else
     exit 1



Summary of changes:
 util/gnc-vcs-info | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)



More information about the gnucash-changes mailing list