Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Jim Meyering Newsgroups: gnu.utils.bug Subject: Re: [bug-diffutils] - Directories compare doesn't show all differences Date: Sun, 15 Oct 2017 09:39:34 -0700 Lines: 43 Sender: meyering@gmail.com Approved: bug-gnu-utils@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1508085601 7207 208.118.235.17 (15 Oct 2017 16:40:01 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-gnu-utils@gnu.org, bug-diffutils@gnu.org To: wasser mai Envelope-to: bug-gnu-utils@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=OPZDST+bpBSmTeTPeTuO/ZJtak9wWVPvDg/oRSrmyoo=; b=iOsnfXJXP99WPIc+BpU3xr9ynfn4Jfl2+4JdOmhTw/5l5uMI/4MpBVqYZ1zrwjIB8L 1ZuMf3U64qxWug29yHt1Zs5vJx8whzzhp/8E8l+Ld4TFfJyYMLvcKzg1720J/Pby6kY/ nu5Pvyk1ABpSqxAh7HfBxUhCPL8gi3Ft8RHW5JnYHGYjUCcKFT0k9SvbgazDsIPSNxeY k7lQVK2zQJbip6NCuxmJkfumh+uZw1SeuP3kzxYCi6diiJR/t+61J7SYqytlLL6Y1hgr tFbZmPl0Vw6y8ysIHXxbPI7A3RTEoHbU2ykVQlOF3mv5XwtoT3YzcoD/b8QT91Ckzc8M DAiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=OPZDST+bpBSmTeTPeTuO/ZJtak9wWVPvDg/oRSrmyoo=; b=B07B4BZmsIDNgEFO59ZVryozn7vF/zilPM0lqabZqy8w2wgMlsPu5gqz+kxY5mvRM1 R+zTauCJ620fTQxTtQhT4c3SRJLNyptbeQXNoa1M4K/ZUM8TFzzoqV3etwlxkfakdQrB OLJcriGXeLVHZeju7JV50fIaap6yby75fUBd56x08/+/1YvUZSrcP4MqCTi5rteFYj6c XcFgKBpHNagiiyb7Q668OOaW0LgsqROnMiq3cKRs52c90SMgNlam57BvxNvClWnQZP/l pMpWyuHE53GV5TT/zon4gPH6IAoBW3ivFDZyNctmy0YFxsCuVqJrDtDZWOWRxOWpuzF5 1ONA== X-Gm-Message-State: AMCzsaWGUc5O3Y9eVBFbiDJQ9jAqpC3b+pMv+5aPPy5GkVRvk1fTJ6kk 6PFWsca3YkHUgoSagrNpoKABLxp5LUfrq6hAuJ4= X-Google-Smtp-Source: ABhQp+RS53z5WloAN9rRFUrtaUNnucTQzxdFtfX/Ol6JjYYOcMp2QaBv14pyRV6GJV+fMBECb5F/BUNaBDTX+5uBHMY= X-Received: by 10.237.57.228 with SMTP id m91mr5769402qte.267.1508085595031; Sun, 15 Oct 2017 09:39:55 -0700 (PDT) In-Reply-To: X-Google-Sender-Auth: 3vLsvystELfFHFezh4K0jP52toU X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::229 X-BeenThere: bug-gnu-utils@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU utilities List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.utils.bug:2221 On Wed, Oct 11, 2017 at 8:07 AM, wasser mai wrote: > Description of problem: > Directories compare with --brief doesn't show all differencies > > Version-Release number of selected component (if applicable): > 3.6 > > How reproducible: > always > > Steps to Reproduce: > 1. create 2 directories dir1 and dir2 > 2. in dir1 create README file > 3. in dir2 create README directory > 4. in dir2/README directory create some files - readme1.txt readme2.txt > 5. do diff -r --brief dir1/ dir2/ > > Actual results: > file dir1/README is a regular file while file dir2/README is a directory > > Information about files in dir2/README in compare to dir1 is not > present - also difference > > Expected results: > Show all difference as expected Thank you for the report, but what you are seeing is the intended behavior. What if diff (with or without --brief) were to print even just the names of all files under your README directory, recursively? Consider what this invocation of diff should print: touch /tmp/usr && diff -r /tmp/usr / Currently, it prints only this: File /tmp/usr is a regular empty file while file /usr is a directory while with your suggestion, it would print something for each of the many files under /usr. [I've Cc'd the bug-diffutils mailing list, per instructions at the bottom of "diff --help" output]