From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B960C46499 for ; Fri, 5 Jul 2019 05:29:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D8C97218A6 for ; Fri, 5 Jul 2019 05:29:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562304550; bh=ku9aEp+wapV1jAtHr82zZH6REpuJWRVS+GCf+tHXR7Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=NUCV9+3FEk9BcVzBkL0unUkzBPyjOwwMvFgC29z8RHb3uHjp4Spc5npgjjyVZn4Qu SRpsSln2MJFCjsvOT+I6YFYDghzRvaqcFry+L+T8ajFoh4bERBVRgZLv3J0lwsC24n xvqoQTeKey49q3GThIkzT1t3R3NsVTRuFi8CVWrE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727478AbfGEF3J (ORCPT ); Fri, 5 Jul 2019 01:29:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:49358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbfGEF3I (ORCPT ); Fri, 5 Jul 2019 01:29:08 -0400 Received: from localhost.localdomain (c-73-223-200-170.hsd1.ca.comcast.net [73.223.200.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 111B621850; Fri, 5 Jul 2019 05:29:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1562304547; bh=ku9aEp+wapV1jAtHr82zZH6REpuJWRVS+GCf+tHXR7Y=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gpwsyMS6DRC1CwjjTw4nWYbfs5wE2bJ85FBSXW84XxfeYBs6quUOEtr8MLEJ6QcMZ 03jv6nY0lDeUSDRQOggVvU24ZcWC8z5wMyc53vkGgU4qbFnuhBeU8cBq+krJtoDFTV 5BAl2jqKEoiqIRjP7Qf7cwvYh0pBZRG2A96dQtGc= Date: Thu, 4 Jul 2019 22:29:06 -0700 From: Andrew Morton To: Joe Perches Cc: Stephen Rothwell , Masahiro Yamada , Randy Dunlap , Mark Brown , linux-fsdevel@vger.kernel.org, Linux Kernel Mailing List , linux-mm@kvack.org, Linux-Next Mailing List , mhocko@suse.cz, mm-commits@vger.kernel.org, Michal Wajdeczko , Daniel Vetter , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Intel Graphics , DRI , Chris Wilson Subject: Re: mmotm 2019-07-04-15-01 uploaded (gpu/drm/i915/oa/) Message-Id: <20190704222906.f817d02cb248561edd84a669@linux-foundation.org> In-Reply-To: <5f4680cce78573ecfbbdc0dfca489710581b966f.camel@perches.com> References: <20190704220152.1bF4q6uyw%akpm@linux-foundation.org> <80bf2204-558a-6d3f-c493-bf17b891fc8a@infradead.org> <20190705131435.58c2be19@canb.auug.org.au> <20190704220931.f1bd2462907901f9e7aca686@linux-foundation.org> <5f4680cce78573ecfbbdc0dfca489710581b966f.camel@perches.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 04 Jul 2019 22:22:41 -0700 Joe Perches wrote: > > So when comparing a zero-length file with a non-existent file, diff > > produces no output. > > Why use the -N option ? > > $ diff --help > [...] > -N, --new-file treat absent files as empty > > otherwise > > $ cd $(mktemp -d -p .) > $ touch x > $ diff -u x y > diff: y: No such file or directory Without -N diff fails and exits with an error. -N does what's desired as long as the non-missing file isn't empty.