[LyX/master] Give error if adding a branch that already exists
Scott Kostyshak
skostysh at lyx.org
Mon Mar 24 21:22:24 UTC 2025
On Mon, Mar 24, 2025 at 01:16:00PM -0400, Richard Kimberly Heck wrote:
> 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?
Makes sense, I'll do that.
Scott
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20250324/f8a1c4af/attachment.sig>
More information about the lyx-devel
mailing list