mnbi / textrepo

A repository to store a note text with a timestamp
MIT License
0 stars 0 forks source link

Add a new feature to update without changing its timestamp #40

Closed mnbi closed 4 years ago

mnbi commented 4 years ago

Is it annoying to change the timestamp with slight portion of change? For example, just fix a typo.

So, Repository#update needs an option to keep timestamp unchanged. When the option was specified, it would update only the content and it would not touch the timestamp.

The interface should be like:

Repository#update(timestamp, text, keep_stamp = false)

The third argument is optional, and it has a default value, false. That is, this modification would not cause any inconsistency for existing client programs.