X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CA3DB38930DA
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
 header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
 spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca
X-Authority-Analysis: v=2.3 cv=OubUNx3t c=1 sm=1 tr=0
 a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
 a=IkcTkHD0fZMA:10 a=AMpejqzua1VCGlgbdkcA:9 a=QEXdDO2ut3YA:10
Subject: Re: patch command incorrectly capitalizes filenames that live on
 external USB flash drives
To: cygwin@cygwin.com
References: <CAKObCaoqPMb6ebbivTcKpWvF_ADhb1HNFgkkD3mpW6nARD4hWQ@mail.gmail.com>
 <e99231bc-59d5-29fa-f3f0-232fdfab26f3@gmail.com>
From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
Autocrypt: addr=Brian.Inglis@SystematicSw.ab.ca; prefer-encrypt=mutual;
 keydata=
 mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0
 LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA
 PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW
 AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO
 WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB
 BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5
 /lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF
 IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5
 RSyTY8X+AQ==
Organization: Systematic Software
Message-ID: <240e41c4-5ada-b84c-7bd4-4130a2debc4b@SystematicSw.ab.ca>
Date: Wed, 29 Apr 2020 17:48:25 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.7.0
MIME-Version: 1.0
In-Reply-To: <e99231bc-59d5-29fa-f3f0-232fdfab26f3@gmail.com>
Content-Language: en-CA
X-CMAE-Envelope: MS4wfK7aAryWF3DjrYatFsBicPuwzF5lCzpy+qJRm2TgAN3js1zkh93zRUnxlN+2W4jSLxUGzVFijFhoC77y/GB2vdRHCkQIanBP4C9Bd5FbCe5yR6AhWw0s
 pON2rQRh3VIhZI02LA8rEVvjnStaB7ZBEAJ5B5KsaQ/W1ID+OmDNIQhM5etxfhK9EwizZHyXMgJB3g==
X-Spam-Status: No, score=-28.1 required=5.0 tests=BAYES_00, GIT_PATCH_0,
 GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_DMARC_STATUS,
 KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP,
 USB_DRIVES autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: cygwin@cygwin.com
Content-Type: text/plain; charset="utf-8"
Errors-To: cygwin-bounces@cygwin.com
Sender: "Cygwin" <cygwin-bounces@cygwin.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 03TNmwRx011219

On 2020-04-28 22:52, Marco Atzeri via Cygwin wrote:
> Am 28.04.2020 um 21:27 schrieb Jason Gross via Cygwin:
>> Consider the following script in foo.sh:
>> ```
>> #!/usr/bin/env bash
>>
>> set -ex
>>
>> cd "$1"
>> rm -rf foo
>> mkdir foo
>> cd foo
>> cat > Makefile <<EOF
>> a
>> b
>> c
>> d
>> e
>> EOF
>> cat > diff <<EOF
>> diff --git a/Makefile b/Makefile
>> index 9405325..86d2f8c 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -1,5 +1,5 @@
>>   a
>>   b
>> -c
>> +ccc
>>   d
>>   e
>> EOF
>> patch -p1 -i ./diff
>> ls
>> ```
>>
>> If I run `./foo.sh /cygdrive/c/`, I get, as expected,
>> ```
>> + cd /cygdrive/c/
>> + rm -rf foo
>> + mkdir foo
>> + cd foo
>> + cat
>> + cat
>> + patch -p1 -i ./diff
>> patching file Makefile
>> + ls
>> diff  Makefile
>> ```
>>
>> If I instead run `./foo.sh /cygdrive/h/`, I get
>> ```
>> + cd /cygdrive/h/
>> + rm -rf foo
>> + mkdir foo
>> + cd foo
>> + cat
>> + cat
>> + patch -p1 -i ./diff
>> patching file Makefile
>> + ls
>> diff  MAKEFILE
>> ```
>>
>> My C drive is an internal SSD (NTFS), my H drive is an external flash
>> drive (FAT32).  I installed cygwin with the commands:
> 
> use a flash driver with NTFS and check the difference
> 
> I doubt it is a patch issue

That might be expected with FAT32, which is normally the default format for
flash drives, for maximum compatibility with microcontrollers, which may not
create VFAT Long File Names when file names are <= 8.3, so they appear as upper
case.

	$ cmd /c help format shows Windows format now supports:

	/FS:filesystem	Specifies the type of the file system (FAT, FAT32,
			exFAT, NTFS, UDF, ReFS).

You might want to try an ExFAT formatted flash drive to see if it works as
expected, and is compatible with your other systems.

Following MS opening up exFAT specs, exFAT is supported on most major OSes but
may require packages normally called exfat-utils and exfat-fuse or fuse-exfat to
be installed: exFAT was designed for flash drives.

[P.S. UDF is the new ISO DVD standard and Re(silient)FS was intended to replace
NTFS for Windows Server, but is deprecated, and creation is being dropped from
Windows 10 Home, so that option value may not work.]

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

