Handle no changed content in presubmit support
Handle no changed content in presubmit support

git cl presubmit has --all option which marks all files as modified.
However, that doesn't work well with SCM diff. That is, git diff may not
contain affected file. Instead of throwing an exception in such case,
just return no diff.

R=bdcbd10822f2f5deecea3bf14d73e9025b1b8375@google.com

Fixed: 808346
Change-Id: Ie1d534b8eebc84bc5206eba7db8057829390fbec
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3485501
Auto-Submit: Josip Sokcevic <4606aec58cba917397ff2e4738f995e4758694f8@google.com>
Reviewed-by: Gavin Mak <bdcbd10822f2f5deecea3bf14d73e9025b1b8375@google.com>
Commit-Queue: Gavin Mak <bdcbd10822f2f5deecea3bf14d73e9025b1b8375@google.com>

CoherentLabs/depot_tools,CoherentLabs/depot_tools