Skip to content

pr-git-977/dorgonman/dorgon/fix_gitp4_get_diff_description-v2

From: "dorgon.chang" <dorgonman@hotmail.com>

If the submit contain binary files, it will throw exception and stop submit when try to append diff line description.

This commit will skip non-text data files when exception UnicodeDecodeError thrown.

The skip will not affect actual submit files in the resulting cl,
the diff line description will only appear in submit template,
so you can review what changed before actully submit to p4.

I don't know if add any message here will be helpful for users,
so I choose to just skip binary content, since it already append filename previously.

Signed-off-by: dorgon.chang <dorgonman@hotmail.com>

Submitted-As: https://lore.kernel.org/git/pull.977.v2.git.git.1624252574779.gitgitgadget@gmail.com
In-Reply-To: https://lore.kernel.org/git/pull.977.git.git.1615535270135.gitgitgadget@gmail.com
Assets 2