Skip to content
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

Add config for yadm to create read-only template output #454

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

soraxas
Copy link
Contributor

@soraxas soraxas commented May 29, 2023

What does this PR do?

Allow user to tell yadm to create read-only template output

What issues does this PR fix or reference?

I always forget that the file I'm editing is an output from yadm template :( and loss my editing. (despite already adding a header notice on the top of the file)

Config via:

$ yadm config yadm.template-read-only true

Previous Behavior

yadm copies perms

New Behavior

yadm copies perms, and optionally, remove write perms

Have [tests][1] been written for this change?

No

Have these commits been [signed with GnuPG][2]?

Yes


P.S.
This is a global control.

An alternative solution, that allows per-file controls, is to allow template file to have some extra parameters, e.g., my_config.toml##<condition>,template.esh,template.ro=true

but the original semantic of those values were conditions, so I'm not sure if that'd be a good approach

@TheLocehiliosan TheLocehiliosan self-assigned this Jun 5, 2023
yadm Outdated Show resolved Hide resolved
@soraxas
Copy link
Contributor Author

soraxas commented Aug 22, 2023

A slight bump on this PR:

are there any more blockers for merging this PR?

@TheLocehiliosan TheLocehiliosan changed the base branch from master to develop October 20, 2023 13:55
@TheLocehiliosan
Copy link
Owner

I adjusted this PR to target the develop branch. Can tests and updates to the manpage be added?

@soraxas
Copy link
Contributor Author

soraxas commented Nov 9, 2023

Hi @TheLocehiliosan ! Man and tests had been added!

@TheLocehiliosan
Copy link
Owner

TheLocehiliosan commented Nov 12, 2023

@soraxas - I updated the pull request to target the develop branch, but there are conflicts.

Can you rebase your branch to be on top of the develop branch?

@soraxas
Copy link
Contributor Author

soraxas commented Dec 30, 2023

@TheLocehiliosan A slight bump on this PR again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants