-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command-line option allowing no backups #333
Comments
Have you seen the - c switch? |
I had not. But my wish remains unchanged ;) |
Removing the backup files option feels too dangerous to me.
…On Tue, 25 Jan 2022, 15:25 Tom de Geus, ***@***.***> wrote:
I had not. But my wish remains unchanged ;)
—
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYC3V23EYBZOQORF6D3UX26GBANCNFSM5MYOQF4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm not asking to remove the option, nor to change the default. I'm just asking to have the option not to write them, in the case that I have everything covered (e.g. with |
Yes, I understand :)
But, having the option still seems dangerous to me.
If a user chooses this option without realising what they're doing, and
doesn't have version control, and something goes wrong, I might ultimately
end up responsible.
Safety first.
…On Tue, 25 Jan 2022, 15:32 Tom de Geus, ***@***.***> wrote:
I'm not asking to remove the option, nor to change the default. I'm just
asking to have the option not to write them, in the case that I have
everything covered (e.g. with git).
—
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYDRN6BVI4WPYMHMLLDUX267JANCNFSM5MYOQF4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Allright. Thanks for the reply |
Just a question out of curiosity : what happens if I have a |
It should aim for main.bak with this setting.
…On Wed, 26 Jan 2022, 08:35 Tom de Geus, ***@***.***> wrote:
Just a question out of curiosity : what happens if I have a main.tex and
I happen to have made a back-up of something else main.bak0, and I set onlyOneBackUp:
1. Would latexindent.pl then overwrite the unrelated back-up?
—
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYFMRJYQ7P4HD46KF63UX6W4ZANCNFSM5MYOQF4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok, but actually my point was : how does So my point is the following: having I guess that with the current API I should do something like
if I don't want to worry? |
Thanks for these points.
You're right, there is a case in which users may have used main.bak from
another command and then they set onlyOneBackUp to be 1, and then
latexindent.pl could overwrite main.bak.
However, I would argue that by setting onlyOneBackUp to 1, the user is
saying 'I take responsibility for my backup procedure, and I know what I'm
doing'.
The default behaviour of latexindent is to create a new backup each and
every time. Anything other than this requires the user to take action, at
which point they are taking responsibility.
Your proposed use of the c switch sounds consistent with its intended use
:)
…On Wed, 26 Jan 2022, 09:14 Tom de Geus, ***@***.***> wrote:
Ok, but actually my point was : how does onlyOneBackUp: 1 know that it
its backup that it is overwriting?
So my point is the following: having latexindent.pl write files that I
don't operate on, makes me more insecure than it makes me feel secure.
That's why I suggested the command-line option.
I guess that with the current API I should do something like
latexindent.pl -c ~/.cache/latexindent
if I don't want to worry?
—
Reply to this email directly, view it on GitHub
<#333 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ7CYF5T7VL2YQIOXFXWVLUX63PJANCNFSM5MYOQF4Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Spamming backup files for files that are already managed by git is pointless. By using this new flag, the user explicitly states that he or she wants to overwrite the files without backup. There is no short option to avoid triggering this option by accident and the help text should be pretty clear that using this option is not recommended unless you know what you're doing. Hence, the risk of accidental data loss something should be pretty much non-existant. Also note that almost every other source code formatter has options to to reformat and overwrite files without creating a backup. Fixes cmhughes#333.
Spamming backup files for files that are already managed by git is pointless. By using this new flag, the user explicitly states that he or she wants to overwrite the files without backup. There is no short option to avoid triggering this option by accident and the help text should be pretty clear that using this option is not recommended unless you know what you're doing. Hence, the risk of accidental data loss something should be pretty much non-existant. Also note that almost every other source code formatter has options to to reformat and overwrite files without creating a backup. Fixes cmhughes#333.
Spamming backup files for files that are already managed by git is pointless. By using this new flag, the user explicitly states that he or she wants to overwrite the files without backup. There is no short option to avoid triggering this option by accident and the help text should be pretty clear that using this option is not recommended unless you know what you're doing. Hence, the risk of accidental data loss something should be pretty much non-existant. Also note that almost every other source code formatter has options to to reformat and overwrite files without creating a backup. Fixes cmhughes#333.
Add the hooks.latexindent.settings.disableExtraFiles option to prevent the creation of backup and log files. Upstream refuses adding an option to disable backup and log file creation to protect non-version-controlled users from data loss, despite it being considered unnecessary for those using version control. [1] [2] [3] Considering that Git is the standard in Nix and required for flakes, providing this option is reasonable. [1]: cmhughes/latexindent.pl#145 [2]: cmhughes/latexindent.pl#333 [3]: cmhughes/latexindent.pl#354 Link: cachix#514
Add the hooks.latexindent.settings.disableExtraFiles option to prevent the creation of backup and log files. Upstream refuses adding an option to disable backup and log file creation to protect non-version-controlled users from data loss, despite it being considered unnecessary for those using version control. [1] [2] [3] Considering that Git is the standard in Nix and required for flakes, providing this option is reasonable. [1]: cmhughes/latexindent.pl#145 [2]: cmhughes/latexindent.pl#333 [3]: cmhughes/latexindent.pl#354 Link: cachix#514
Add the hooks.latexindent.settings.disableExtraFiles option to prevent the creation of backup and log files. Upstream refuses adding an option to disable backup and log file creation to protect non-version-controlled users from data loss, despite it being considered unnecessary for those using version control. [1] [2] [3] Considering that Git is the standard in Nix and required for flakes, providing this option is reasonable. [1]: cmhughes/latexindent.pl#145 [2]: cmhughes/latexindent.pl#333 [3]: cmhughes/latexindent.pl#354 Link: cachix#514
I would like a command-line option switching of the the feature of writing
.bakX
files.To give an argument: I'm using
git
so this feature is not useful, rather just adding noise.(I know it can be done in user settings, but I would like to be able to do it directly from the command-line)
The text was updated successfully, but these errors were encountered: