Re: git log --name-only improvement: show old file name in rename
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: git log --name-only improvement: show old file name in rename
- From: Nathan Faulkner <natedogith1@xxxxxxxxx>
- Date: Thu, 16 May 2024 19:13:34 -0400
- Cc: "git@xxxxxxxxxxxxxxx" <git@xxxxxxxxxxxxxxx>
- In-reply-to: <BL0PR11MB34608AE271344D508676D17A9D9C0@BL0PR11MB3460.namprd11.prod.outlook.com>
- References: <BL0PR11MB3460BEB60550854661B5178B9D800@BL0PR11MB3460.namprd11.prod.outlook.com> <xmqqsgf1i46l.fsf@gitster.c.googlers.com> <25ca66fb-82bc-7278-90e9-5e1999593068@iee.email> <xmqqh7vg2p4p.fsf@gitster.c.googlers.com> <BL0PR11MB34608AE271344D508676D17A9D9C0@BL0PR11MB3460.namprd11.prod.outlook.com>
- User-agent: Mozilla Thunderbird
The documentation for --name-only says "Show only names of changed
files." I would interpret this to mean "output the names of all files
that changed", not "output the names of all files that changed, unless
git detected it as renamed". --no-renames makes it behave as expected,
but having to specify it isn't obvious. A warning in the documentation
could help, but --no-renames should probably be included by default when
--name-only is specified.
I ran into an issue today with code that expected git diff --name-only
to output all changed files. A file was created and an unrelated file
was deleted in the same commit, but they happened to be similar enough
that git detected it as rename, and thus git diff --name-only indicated
only one file changed when two files were actually changed.
[Index of Archives]
[Linux Kernel Development]
[Gcc Help]
[IETF Annouce]
[DCCP]
[Netdev]
[Networking]
[Security]
[V4L]
[Bugtraq]
[Yosemite]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux SCSI]
[Fedora Users]