|
From: Yuri D'E. <wa...@th...> - 2017-01-23 11:35:21
|
Is there a way to make mbsync differentiate between successful sync with and without changes? I'd love to have diff(1) style exit codes: 0: success (with changes), 1: (errors), 2: success (no changes). I remember I was asking for bitfield style error codes to handle timeouts and retries better, but right now I'd be more pressed to speed up mail fetching by not re-indexing the maildir content if no change occurred during sync. I'd be prepared to modify mbsync myself if there is consensus on the behavior. To keep changes to a minimum, we could add a new flag to request the exit code of 2 when some syncing occurred. It could make sense to differentiate between master/slave changes, but to be honest having just a simple change flag would be more than enough for me. It seems you could just collect the status counters and just emit an exit status of 2 if any of them are non-zero. |