fbiville / headache

Utility to manage license headers in source files
Apache License 2.0
34 stars 8 forks source link

Improve configuration serialization in `.headache-run` #49

Closed fbiville closed 4 years ago

fbiville commented 5 years ago

headache currently needs to track two pieces of data:

The downside of this is that headache may not work with shallow clones as it requires access to enough of Git history to be able to read configuration at the revision during which headache last ran.

fbiville commented 5 years ago

One solution would be to serialize both the JSON configuration and the license header text in .headache-run so there is no need to dive into the Git history to get those elements next time headache runs. That way, headache would still work fine with shallow clones.

fbiville commented 5 years ago

And that would probably fix https://github.com/fbiville/headache/issues/55 as a nice bonus effect!