MestreLion / git-tools

Assorted git tools, including git-restore-mtime
GNU General Public License v3.0
295 stars 74 forks source link

Cleanup/tidy various files #74

Closed Repiteo closed 2 months ago

Repiteo commented 7 months ago
MestreLion commented 2 months ago

The .gitattributes addition and whitespace formatting are welcome improvements, but I'm not sure about consolidating the .gitignores. I kinda like the way multiple ignores makes each sub-directory somewhat "self-contained" in this regard. Are there any recommendations or rationale about a consolidated .gitignore?

Repiteo commented 2 months ago

Consolidated style isn't strictly better, though it is my personal preference. I'm fine with reverting that change

EDIT: Done!

MestreLion commented 2 months ago

Great! This makes it easier to merge this PR and leaves the "consolidation" discussion to a possible future PR. I'm still open to hear any arguments favoring or against it, even subjective reasons to justify the personal preference may be valid points.

MestreLion commented 2 months ago

About the edits in the "main" .gitignore: you're removing the "exceptions" for .gitignore and .editorconfig (and not including one for your new .gitattributes), while keeping the "ignore all hidden" .* rule. This indicates that those files are either editable/removable without triggering a git diff, or were committed to the repository by mistake, and neither is true.

This is possibly a nitpick, but maybe it's time to ditch and remove both the .* rule and my personal, local-only ref/ rule (I can simply toss a * gitignore there and in my .idea/). That is a needed cleanup, those rules never belonged in the public .gitignore anyway. Otherwise I believe you should keep the exceptions and add one for your newly created (and much welcome) .gitattributes.

Or I can merge right away and do the above afterwards, your call. The credit for is yours anyway for calling my attention to these details, oversights and crust.

Repiteo commented 2 months ago

To clarify: Exceptions have no effect on explicitly added files; a file being explicitly added to the repo supersedes .gitignore outright. Changing/removing those files will still cause a diff as if they were any other file; the only difference is that adding them can't happen unless it's done so explicitly. I wouldn't think it implies being added by mistake, as the .git* files are so ubiquitous.

Feel free to just commit this as-is though, I'd rather the decision on how to handle it afterwards (if at all) be up to you.

MestreLion commented 2 months ago

Thanks for your contribution!