danny0838 / git-store-meta

Simple file metadata storing and applying for git.
MIT License
124 stars 19 forks source link

Exclude data file metadata from data file #14

Closed fabricemoreau closed 5 years ago

fabricemoreau commented 6 years ago

Hello,

We use git-store-meta in my projects to keep dates for a year, but for a team work with branches, it creates conflicts each time we merge, because of the metadatas of .git-store-meta file. In our case, keeping metadatas of .git-store-meta is not usefull, so I tryed to add an option -x that don't store metadatas for this file. Here is the patch: 0001-exclude-datafile.zip I'm not skilled in perl, so I don't know if it's really safe and clear. Maybe the option syntax name is not fully adequate. Would you like to add this option in your project?

Thank you for git-store-meta

danny0838 commented 5 years ago

Your patch introduces a potential issue that the data file not correctly determined if the --target option is given, though it's not difficult to fix, as what we have done.

It's a good idea to exclude the data file. Actually, I could hardly think of a use case that manipulation of the metadata of the data file is desired. Maybe it would be better to make it the default behavior rather than add an option?

fabricemoreau commented 5 years ago

Thank you for this integration and rewriting. As the project started already 3 years ago without this behaviour, maybe there was some use cases. If it's not the case, I think it can be the default behavior too.

danny0838 commented 5 years ago

As adding the option is not useful and complicates hooks design, we decide to make it the default behavior. Thank you for the nice feedback.