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

keep gitignore & gitattributes on upgrade/rename #162

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

guyhughes
Copy link

fixes #37, further to #54 -- I feel that the user expects to keep the .gitignore.d/foo and .gitattributes.d/foo files in effect when renaming repo foo to bar. Currently upgrade() abandons the foo files and updates .git to point to bar files.

I've implemented renaming the files with mv in upgrade() so that even if core.excludesfile or core.attributesfile points elsewhere, they can be moved into the recommended location.

mv will exit with an error instead of overwriting any file, and I've handled showing that to the user.

I've only played with this a bit. Open for improvements.

@alerque
Copy link
Collaborator

alerque commented Mar 31, 2021

Hey thanks for taking the time to contribute this. I did some cleanup work to the coding style and tweaked some shell scripting issues. I haven't had a chance to put it through any paces or really figure out if the approach is right, but I can't push to this PR (it was opened under GitHub's legacy system, you might have a check box to enable maintainers to modify the PR) but wanted to note that I stashed the WIP on this in this branch.

@alerque
Copy link
Collaborator

alerque commented Apr 2, 2021

See also extra discussion in #163 and particular the alternative implementation in this branch. That should be compared as part of reviewing this.

@alerque
Copy link
Collaborator

alerque commented Jun 1, 2021

Hey @guyhughes just a gentle ping if you're around and can check for that "allow maintainers..." checkbox in the sidebar that would facilitate moving this along finally.

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

Successfully merging this pull request may close these issues.

rename command should take care of .gitignore file
2 participants