diff options
author | Michele Locati <michele@locati.it> | 2018-03-19 16:32:35 +0100 |
---|---|---|
committer | Michele Locati <michele@locati.it> | 2018-03-19 16:32:35 +0100 |
commit | 4235712fd4e3777d271dcab144e01666e532e495 (patch) | |
tree | d0fb0aebffefcbe5881957b3aa111a0e03bd3be8 | |
parent | 5d749b02ff914f8dd76e60da32987e0c0b2157b5 (diff) | |
download | incremental-git-filter-branch-4235712fd4e3777d271dcab144e01666e532e495.tar.gz incremental-git-filter-branch-4235712fd4e3777d271dcab144e01666e532e495.tar.bz2 incremental-git-filter-branch-4235712fd4e3777d271dcab144e01666e532e495.zip |
Use more portable sed syntax
-rwxr-xr-x | bin/incremental-git-filterbranch | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/incremental-git-filterbranch b/bin/incremental-git-filterbranch index 2a785cd..3f59037 100755 --- a/bin/incremental-git-filterbranch +++ b/bin/incremental-git-filterbranch @@ -750,7 +750,7 @@ removeTranslatedTags () { return 0 fi echo '# Listing tags in source repository' - removeTranslatedTags_sourceTags="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --tags source | grep -Ev '\^\{\}$' | sed -E 's:^.*[ \t]refs/tags/::g')" + removeTranslatedTags_sourceTags="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --tags source | grep -Ev '\^\{\}$' | tr '\t' ' ' | sed -E 's:^.* refs/tags/::g')" echo '# Deleting previously converted tags no more existing in source repository' for removeTranslatedTags_workerTag in ${removeTranslatedTags_workerTags} do @@ -813,7 +813,7 @@ processBranches () { # - Empty string if no tag should be removed # - Space-separated list (including a final extra space) of full tag paths (refs/tags/...) otherwise getPruneTags () { - getPruneTags_remoteTags="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --tags destination | grep -Ev '\^\{\}$' | sed -E 's:^.*[ \t]refs/tags/::g')" + getPruneTags_remoteTags="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --tags destination | grep -Ev '\^\{\}$' | tr '\t' ' ' | sed -E 's:^.* refs/tags/::g')" if test -z "${getPruneTags_remoteTags}" then return 0 @@ -840,7 +840,7 @@ getPruneTags () { # Delete in destination repository the non converted branches getPruneBranches () { getPruneBranches_currentBranch='' - getPruneBranches_remoteBranches="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --heads destination | sed -E 's:^.*[ \t]refs/heads/::g')" + getPruneBranches_remoteBranches="$(git -C "${WORKER_REPOSITORY_DIR}" ls-remote --quiet --heads destination | tr '\t' ' ' | sed -E 's:^.* refs/heads/::g')" for getPruneBranches_remoteBranch in ${getPruneBranches_remoteBranches} do if ! itemInList "${getPruneBranches_remoteBranch}" "${WORK_BRANCHES}" |