darcs

Issue 2659 darcs 2.16 happily record a patch with an empty message

Title darcs 2.16 happily record a patch with an empty message
Priority Status resolved
Milestone Resolved in
Superseder Nosy List gpiero
Assigned To
Topics

Created on 2020-10-18.17:15:54 by gpiero, last changed 2020-10-22.16:51:20 by bfrk.

Messages
msg22483 (view) Author: gpiero Date: 2020-10-18.17:15:50
A minimal regression (imo) in darcs 2.16. Previous darcs versions 
explicitly asked for a patch name when not provided and refused to 
record the patch if the explicit question got unanswered.

$ darcs --version 
2.14.5 (release)
$ darcs ini R
Repository initialized.
$ touch R/file
$ darcs add --repo R file
Adding 'file'
$ VISUAL=cat darcs rec --repo R -a </dev/null

# Please enter the patch name in the first line, and
# optionally, a long description in the following lines.
#
# Lines starting with '#' will be ignored.
#
#
# Summary of selected changes:
#
# A ./fileWARNING: empty or incorrect patch name!
What is the patch name? darcs: askUser: unexpected end of input
CallStack (from HasCallStack):
   error, called at src/Darcs/Util/Prompt.hs:30:36 in darcs-2.14.5-4VFTt935FW076SvU9nltWO:Darcs.Util.Prompt
$ darcs log --repo R


$ darcs --version 
2.16.2 (+ 158 patches)
$ darcs ini R
Finished initializing repository.
$ touch R/file
$ darcs add --repo R file
Adding './file'
Finished adding:
./file
$ VISUAL=cat darcs rec --repo R -a

# Please enter the patch name in the first line, and
# optionally, a long description in the following lines.
#
# Lines starting with '#' will be ignored.
#
#
# Summary of selected changes:
#
# A ./fileFinished recording patch ''
$ darcs log --repo R
patch 7c832c2352c59698d59f5eea2e80e287728f4178
Author: Gian Piero Carrubba <gpiero@rm-rf.it>
Date:   Sun Oct 18 19:16:32 CEST 2020
   *
msg22484 (view) Author: bfrk Date: 2020-10-19.13:15:42
Good catch! Indeed there is a check missing after invoking an editor to
get a new pach name (and possibly long comment). Will send a fix.
History
Date User Action Args
2020-10-18 17:15:54gpierocreate
2020-10-19 13:15:45bfrksetmessages: + msg22484
2020-10-22 16:51:20bfrksetstatus: unknown -> resolved