dolt icon indicating copy to clipboard operation
dolt copied to clipboard

feat: Added disclaimer for branch checkout

Open dds05 opened this issue 10 months ago • 3 comments

To fix #6876

dds05 avatar Mar 07 '25 09:03 dds05

A possible better first step would be: https://github.com/dolthub/dolt/issues/8875

macneale4 avatar Mar 18 '25 20:03 macneale4

@macneale4 So should I remove the color from :- cli.PrintErrln(color.YellowString("WARNING: The checked out branch is only changed for this current session."))

dds05 avatar Mar 19 '25 04:03 dds05

No, I think the approach doesn't fit with the way the application works. For example 'os.Args[1:]' should definitely not be used anywhere close to the sql engine. There are many layers between where the command line arguments are parsed and the procedure code. And in the case of CLI commands, they are generally in separate processes. The command line is connecting to a server in some cases.

I think a better plan it to surface warnings by default in dolt sql, then we can return a warning via the standard sql message channel and surface it to the user. See https://github.com/dolthub/dolt/issues/8875

macneale4 avatar Mar 21 '25 00:03 macneale4

I'm going to close this PR since it's gone dormant.

macneale4 avatar Jul 29 '25 21:07 macneale4