Hi Jiří,

The thing to note here is that filemode is only affecting (the understanding of) the executable bit.

It does *not* affect the file contents at all, so if the 'empty' .gitkeep file is now being shown as having gained a line then there is some other effect going on.

It maybe that there is some error/warning/advice message saying that the original file had no "end of file" (*) which is being confused as being that it has an extra line.

What is the actual message you see? (cut and paste?)

Philip

(*) I have seen discussions that suggest that a proper file, consisting of lines of text, should always have a terminating LF (line feed) as that is (stated as) the terminating delimiter for a line, so if it isn't there, there isn't a line... However some of that is just standards lawyering, and is ignored often (I don't even remember which standards might have said that - Posix?)

On 21/11/2019 08:04, Jiří Bělský wrote:
Thanks for reply,

Repos are hosted on gitlab and most devs are on linux (but not all) and as example, when i set filemode=true in one of the repos, it gives me changes in .gitkeep file saying i added a line to it (its empty file)

But again, since it does set it automatically, guess my option will be just to manually change it to false each time :)

čt 21. 11. 2019 v 0:30 odesílatel Philip Oakley <philipoakley@iee.email> napsal:

    Hi,

    the clone command automatically detects if your local file system
    is 'filemode' compatible.

    `git help config`

    search for `core.filemode`

    " git-clone(1) or git-init(1) probe the filesystem to see if it
    handles the executable bit correctly and this variable is
    automatically set as necessary."

    You may also need to consider how your team works compatibly
    between OS systems. (what OS/version does the maintainer of the
    repo being cloned use?)

    Perhaps give an example of such a "file changed" report.


    On Wednesday, November 20, 2019 at 1:48:34 PM UTC, Jiří Bělský wrote:

        Hi,

        im pretty sure this must be a bug, no matter what i tried, git
        will always ignore filemode=false in global settings and set
        filemode=true while cloning new repositories, which results in
        having a lot of files tagged as changed.

        Commands:
        git config --get --global core.filemode
        returned: false

        git clone [some repository]
        cd [some repository]
        git config --get --local core.filemode
        returned: true

        i even tried setting global filemode with sudo, still same
        result (:

        Elementary OS 5 (based on Ubuntu 18.04)
        Git version 2.24.0 (happening on 2.17.X and earlier as well)

-- You received this message because you are subscribed to a topic in
    the Google Groups "Git for human beings" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/git-users/laea5leUejI/unsubscribe.
    To unsubscribe from this group and all its topics, send an email
    to git-users+unsubscr...@googlegroups.com
    <mailto:git-users+unsubscr...@googlegroups.com>.
    To view this discussion on the web visit
    
https://groups.google.com/d/msgid/git-users/27ce4968-a05e-4363-8e7f-81c726a332b8%40googlegroups.com
    
<https://groups.google.com/d/msgid/git-users/27ce4968-a05e-4363-8e7f-81c726a332b8%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr...@googlegroups.com <mailto:git-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/git-users/CAA2ZSoh30pU3j%3Dp4kr8zpFL1bxHOneLq8E6-3UnWaxq-dthDow%40mail.gmail.com <https://groups.google.com/d/msgid/git-users/CAA2ZSoh30pU3j%3Dp4kr8zpFL1bxHOneLq8E6-3UnWaxq-dthDow%40mail.gmail.com?utm_medium=email&utm_source=footer>.

--
You received this message because you are subscribed to the Google Groups "Git for 
human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/34472833-111f-6ad1-1b85-225ecb2a8001%40iee.email.

Reply via email to