From unknown Sat Jun 14 19:07:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#28851: [bug-diffutils] - Directories compare doesn't show all differences Resent-From: Jim Meyering Original-Sender: "Debbugs-submit" Resent-CC: bug-diffutils@gnu.org Resent-Date: Sun, 15 Oct 2017 16:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 28851 X-GNU-PR-Package: diffutils X-GNU-PR-Keywords: To: wasser mai Cc: 28851@debbugs.gnu.org, bug-gnu-utils@gnu.org X-Debbugs-Original-Cc: bug-diffutils@gnu.org, bug-gnu-utils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.150808560811917 (code B ref -1); Sun, 15 Oct 2017 16:41:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Oct 2017 16:40:08 +0000 Received: from localhost ([127.0.0.1]:41830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3lxQ-000368-4F for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:40:08 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45307) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e3lxP-00035g-2A for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3lxJ-0006pn-1J for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:40:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:40612) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e3lxI-0006pj-Uc for submit@debbugs.gnu.org; Sun, 15 Oct 2017 12:40:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e3lxH-0000Oe-Sv for bug-diffutils@gnu.org; Sun, 15 Oct 2017 12:40:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e3lxH-0006oj-14 for bug-diffutils@gnu.org; Sun, 15 Oct 2017 12:39:59 -0400 Received: from mail-qt0-x229.google.com ([2607:f8b0:400d:c0d::229]:56891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e3lxE-0006nP-VT; Sun, 15 Oct 2017 12:39:57 -0400 Received: by mail-qt0-x229.google.com with SMTP id z28so25064780qtz.13; Sun, 15 Oct 2017 09:39:55 -0700 (PDT) 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) MIME-Version: 1.0 Received: by 10.55.198.145 with HTTP; Sun, 15 Oct 2017 09:39:34 -0700 (PDT) In-Reply-To: References: From: Jim Meyering Date: Sun, 15 Oct 2017 09:39:34 -0700 X-Google-Sender-Auth: 3vLsvystELfFHFezh4K0jP52toU Message-ID: Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -3.8 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.8 (---) 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]