From: Christian Couder Date: Fri, 04 Aug 2023 08:28:53 GMT Subject: Re: [QUESTION] how to diff one blob with nothing Message-ID: In-Reply-To: On Fri, Aug 4, 2023 at 6:42 AM ZheNing Hu wrote: > Actually, there is no need to support a default empty blob. > For example, with the command "git diff --no-index /dev/null", > it can compare a file with /dev/null, but it can only compare > and not . > Therefore, using commands like "git diff /dev/null", > "git diff --no-index /dev/null", or even "git diff --stdin" > could potentially solve this issue. Maybe it would be clearer to have a new option, called for example "--blob-vs-file", for that then. It could support both: $ git diff --blob-vs-file and: $ git diff --blob-vs-file