Mercurial Queues Emulation for Git
Revisión | 03e96d9d2237d90ada6259f1d97e1e5d5824a5ce (tree) |
---|---|
Tiempo | 2022-02-08 20:13:41 |
Autor | ![]() |
Commiter | Keith Marshall |
Handle "git qfold" operations with no commit message.
* git-qfold.shar (mq_msg_file) [no content]: Insert default text; this
is required to ensure that a commit message is available, when running
"git commit", to complete the "git qfold" operation.
@@ -6,7 +6,7 @@ | ||
6 | 6 | # $Id$ |
7 | 7 | # |
8 | 8 | # Written by Keith Marshall <keith@users.osdn.me> |
9 | -# Copyright (C) 2019, Keith Marshall | |
9 | +# Copyright (C) 2019, 2022, Keith Marshall | |
10 | 10 | # |
11 | 11 | # |
12 | 12 | # This file is part of the Git-MQ program suite. |
@@ -202,7 +202,14 @@ printf '%s\n' "$@" | awk >&2 "$mq_series $mq_status $mq_error_handler"' | ||
202 | 202 | } |
203 | 203 | close( cmd ); |
204 | 204 | } |
205 | -# ...generate an updated copy of the series file, omitting entries | |
205 | +# ...checking that at least one of the folded patches has contributed | |
206 | +# content to this commit message, but providing a default, on which we | |
207 | +# may fall back, in the event that none has... | |
208 | +# | |
209 | + if( ! mq_msg_lines ) | |
210 | + { print "[Git-MQ]: '"$mq_patchname"'" > "'"$mq_msg_file"'"; | |
211 | + } | |
212 | +# ...then generate an updated copy of the series file, omitting entries | |
206 | 213 | # for each of the folded patches... |
207 | 214 | # |
208 | 215 | for( idx = 0; entries > idx; idx++ ) |