[LyX/master] Give error if adding a branch that already exists
Richard Kimberly Heck
rikiheck at gmail.com
Mon Mar 24 17:16:00 UTC 2025
On 3/24/25 8:22 AM, Scott Kostyshak wrote:
> On Mon, Mar 24, 2025 at 12:16:49PM +0000, Scott Kostyshak wrote:
>> commit 7d1eea0301986c6f7a080bfaf8166d051aa71f05
>> Author: Scott Kostyshak <skostysh at lyx.org>
>> Date: Mon Mar 24 12:37:05 2025 +0100
>>
>> Give error if adding a branch that already exists
>>
>> The previous behavior was a silent no-op. Now, we inform the user
>> that the branch name already exists, and preserve the field text so
>> it can be easily modified after the message.
>> ---
>> src/frontends/qt/GuiBranches.cpp | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
> Is it OK if I add an assertion (in attached patch) to potentially find
> other places where we add a branch that already exists? I feel as though
> all cases should handle the situation add a higher level, although I'm
> not confident in that claim.
Given that some people do use master for actual work, that seems a bit
harsh (since it will effectively crash the program). How about just
adding an alert here or something?
Riki
More information about the lyx-devel
mailing list