Przeglądaj źródła

Do not break with long releases

If release contains many commits and/or those commits contain many
changed files, the command line could grow past OS limit.  Using stdin
avoids this.
Alois Mahdal 7 lat temu
rodzic
commit
faf44ea6cb
1 zmienionych plików z 5 dodań i 1 usunięć
  1. 5
    1
      src/include/release.sh

+ 5
- 1
src/include/release.sh Wyświetl plik

@@ -142,6 +142,7 @@ __vbump() {
142 142
     #
143 143
     local rlevel=$1     # bump level (x, y or z)
144 144
     local nextver       # version after the bump
145
+    local cache         # cache for the message
145 146
     __relck git_present
146 147
     __relck at_relsrc
147 148
     __relck not_dirty
@@ -152,7 +153,10 @@ __vbump() {
152 153
       || die "failed to update version in mkit.ini"
153 154
     git add mkit.ini \
154 155
       || die "failed to add mkit.ini to the index"
155
-    git commit -e -m "$(_vbump_gitmsg)"
156
+    cache=$(mktemp -t "mkit._vbump_gitmsg.XXXXXXXX")
157
+    _vbump_gitmsg > "$cache"
158
+    git commit -e -F "$cache"   # note: reading from stdin will break vim
159
+    rm "$cache"
156 160
 }
157 161
 
158 162
 _vbump_gitmsg() {