ACCodeSnippetRepositoryPlugin icon indicating copy to clipboard operation
ACCodeSnippetRepositoryPlugin copied to clipboard

Make one big bulk commit when updating/syncing snippets

Open Buju77 opened this issue 11 years ago • 1 comments

Currently you are immediately commiting and pushing to the repo on each single little change. It would look better for the git history of the snippet repo to have a big bulk commit instead of a lot single commits. Eg. there will be one commit/push for each snippet you delete when you delete all local snippets

Just some pseudo code:

for each action/change do
    doChange();
    git commit
    git push
end

This would be better

for each action/change do
    doChange();
end
git commit
git push

commit and push one big change.

Buju77 avatar Apr 10 '14 12:04 Buju77

Having a commit per change and per snippet is by design. I think it's easier to identify changes (and eventually revert them if necessary) if only one snippet is affected by a given commit. So I wouldn't move the git commit out of the loop.

Regarding the push, it seems it could be extracted out of the loop. Now I think there was a reason not to do so, but I can't honestly remember. I have to dig it up.

acoomans avatar Apr 16 '14 11:04 acoomans