Invoke save on session only if changes were made to the repository.

Signed-off-by: Gregor Zurowski <gregor@zurowski.org>