Re: [PATCH 0/6] "git commit --dry-run" updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:

> If it's not too much work, it would be nice to somehow detect if -u
> can have any influence at all.  For example,
>
>   $ git status bar
>   # Not currently on any branch.
>   nothing to commit (use -u to show untracked files)
>
> is a bit misleading if 'bar' is tracked because adding a -u won't make
> any difference.

It is an issue shared with the original "git status".  Running

    git init
    >file
    git add file
    git commit -m initial
    git status -uno

will give the same "use -u to show" message.

The thing is, "use -u to show" is because you told git not to check if
there is any untracked file.  Whoever added -uno wanted not to run the
recursive read_directory() to find them.

The message says "you told me not to check about untracked files, so I can
not show you any, because I did not check; if you want, please use -u to
tell me to check so that I can show them to you".  

It is not about "we know that there are untracked files but you told me
not to show it, so I am not telling".  We simply do not know at the point
we give that message.  In other words, conditional removal of that message
is fundamentally incompatible with the use of -uno.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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]