Closed benoit-pierre closed 10 months ago
depends on koreader/koreader-base#1675
Because crskin.cpp & wolutil.cpp did use some of the stuff you removed?
depends on koreader/koreader-base#1675
Because crskin.cpp & wolutil.cpp did use some of the stuff you removed?
There's one use in there, yes.
Fine. I would squash these 4 commits as a single one, as they end up being dependant:
Why? There's nothing to be gained, you loose context in the subject line (e.g. in blame), end-up with not strictly related changes in the commit. Generally speaking: more (simpler) commits = better, no?
Generally speaking: more (simpler) commits = better, no?
For the review, yes indeed! Thank you for that.
But later, when using git log
or git blame
or git show
, having to follow the related (because each is nearly possible because of the previous one - they may compile, but they may not make sense :)) changes across 4 (super small) commits feels less easy - and they are small and localized enough that it should be followable in a single relatively small final commit.
If you really want to keep the individual commits, please add a common prefix Avoid unnecessary string modifications [1/4]:...
in the commit subject, so we know in git log and blame they are not really standalone.
I disagree, but OK, your project, your rules.
No... you shouldn't have done this yourself. We should have kept your 4 commits in this PR, for reference. (See @NiLuJe 's PRs :) Now, we can't see them anywhere, and the above discussion has lost infos and context :( Only in the squashed commit in master we would have them merged as a single commit - which is fine in the whole crengine context. We can always go back to the PR when needed to see more context and the individual work units, when it happens to be needed.
It's already annoying to not be able to use git branch --merged
to cleanup merged work, but it's even worse if I split commits and they end-up being squashed. Next time I won't split them, it's more work for me.
I understand. The individual small commits help with reviewing, but for #538 and this PR, I would have been ok reviewing and understanding it as a single commit. It all depends on the amount of changes and how they are localized/related.
(You still need to remove the Draft state when you want to proceed.)
(You still need to remove the Draft state when you want to proceed.)
I'll remove it once https://github.com/koreader/koreader-base/pull/1675 and its dependent are merged.
I'll remove it once koreader/koreader-base#1675 and its dependent are merged.
Also Draft. Or you mean https://github.com/koreader/koreader-base/pull/1679 should go first?
I'll remove it once koreader/koreader-base#1675 and its dependent are merged.
Also Draft. Or you mean koreader/koreader-base#1679 should go first?
That one can wait (this way I'll cleanup the no longer necessary crskin
related defines).
The extra
value_type & operator []
accessors would get picked-up over the normal readonly one:value_type operator []
, resulting in unnecessary calls tomodify()
(triggering an allocation+copy if the reference count is not 1). Get rid of the former, and fixlastChar
andfirstChar
method to also be read-only. Additionally, avoid using theat()
method (prefer an explicitmodify()[…]
when needed), and remove it.Note: depends on https://github.com/koreader/koreader-base/pull/1675.
This change is![Reviewable](https://reviewable.io/review_button.svg)