Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove case-sensitive duplicate files #118

Open
jdoubleu opened this issue Oct 10, 2020 · 2 comments
Open

Remove case-sensitive duplicate files #118

jdoubleu opened this issue Oct 10, 2020 · 2 comments

Comments

@jdoubleu
Copy link

jdoubleu commented Oct 10, 2020

Unfortunately, git gets confused on non case-sensitive file systems (e.g. Windows NTFS by default), showing file changes, because it cannot properly distinguish between the two files.

This is only really a problem when there are two files with the same name but different cases in a folder. Please read this StackOverflow answer.

When I checked out this repository, I get the following changes:

Click to expand
HEAD detached at 0c39cb5
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_CONNMARK.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_DSCP.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_MARK.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_RATEEST.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_TCPMSS.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv4/ipt_ECN.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv4/ipt_TTL.h
        modified:   arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv6/ip6t_HL.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_CONNMARK.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_DSCP.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_MARK.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_RATEEST.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_TCPMSS.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv4/ipt_ECN.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv4/ipt_TTL.h
        modified:   arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/arm-bcm2708hardfp-linux-gnueabi/sysroot/usr/include/linux/netfilter_ipv6/ip6t_HL.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter/xt_CONNMARK.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter/xt_DSCP.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter/xt_MARK.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter/xt_RATEEST.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter/xt_TCPMSS.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter_ipv4/ipt_ECN.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter_ipv4/ipt_TTL.h
        modified:   arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/include/linux/netfilter_ipv6/ip6t_HL.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_CONNMARK.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_DSCP.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_MARK.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_RATEEST.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_TCPMSS.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv4/ipt_ECN.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv4/ipt_TTL.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv6/ip6t_HL.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_CONNMARK.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_DSCP.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_MARK.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_RATEEST.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter/xt_TCPMSS.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv4/ipt_ECN.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv4/ipt_TTL.h
        modified:   arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/libc/usr/include/linux/netfilter_ipv6/ip6t_HL.h

Looking at the linux kernel source, there are no such duplicate files (compare https://github.com/torvalds/linux/tree/v4.9/net/netfilter) @popcornmix pointed out they're coming from the uapi: https://github.com/torvalds/linux/blob/master/include/uapi/linux/netfilter/xt_CONNMARK.h.

When there is no good reason to keep them, I suggest to delete the upper-case files (e.g. arm-bcm2708/arm-bcm2708-linux-gnueabi/arm-bcm2708-linux-gnueabi/sysroot/usr/include/linux/netfilter/xt_CONNMARK.h).

@popcornmix
Copy link
Contributor

These will come from the uapi directory. e.g. https://github.com/torvalds/linux/blob/master/include/uapi/linux/netfilter/xt_CONNMARK.h

@jdoubleu
Copy link
Author

jdoubleu commented Oct 10, 2020

Okay thanks, didn't notice.

However, they just include the lower-case version anyway.

Apparently this commit just moved the files into the uapi folder (LKML message, LWN article). Unfortunately, there is no history prior to this. I assume its an artifact from the previous source code tree. There are probably some build systems out there, relying on these files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants