From bea25d1ceb5a6175a0cac4cf573cf2a9609e02b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Thu, 19 Mar 2020 16:11:39 +0100 Subject: [PATCH] @mschneiderwind review. --- bin/git-cp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/bin/git-cp b/bin/git-cp index 55f4bd0..3120225 100755 --- a/bin/git-cp +++ b/bin/git-cp @@ -3,16 +3,12 @@ PROGRAM=$0 CURRENT_FILENAME="" DESTINATION_FILENAME="" -function current_branch() { - git rev-parse --abbrev-ref HEAD -} - function usage() { echo "USAGE: ${PROGRAM} CURRENT_FILENAME DESTINATION_FILENAME" } -while [[ $# > 0 ]] +while [[ $# -gt 0 ]] do key="$1" @@ -52,7 +48,7 @@ else # We get back our copy rm -f "${DESTINATION_FILENAME}" # Make sure the file doesn't exists somehow - git merge ${SAVED} + git merge "${SAVED}" git commit -a -m "Duplicate ${CURRENT_FILENAME} history." # Keeping both files # We get back our original name