質問

Is there an Mercurial extension that removes lines from .hgignore that aren't matching any files in the local repository.

役に立ちましたか?

解決

There exists no extension or built in function that does this. You could jerry rig a script to do to find lines that are ignoring nothing without too much work, but consider that this is probably a bad idea.

Just because the .hgignore line isn't matching an files on your local repository doesn't mean it's not matching them on anyone else's repository. Within .hgignore files you'll often find patterns like .swp and .bak. You might not use vi (which creates .swp files) and you might not use an editor that creates '.bakfiles, but other do. Or perhaps your editor creates .swp files but you don't currently have any because you're not actively editing a file. Removing that line means you'd not be ignoring a .swp file next time you had one andhg addremove` would cause it to become tracked.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top