Re: Status of all files (was: Re: How can I tell if a file is ignored by git?

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

 



merlyn@xxxxxxxxxxxxxx (Randal L. Schwartz) writes:

> A lot of these don't make sense for git and other DVCS.

I agree with you in principle, but not with the details in the example.

> For example:
>
> Eric>   'needs-update      The file has not been edited by the user, but there is
> Eric>                      a more recent version on the current branch stored
> Eric>                      in the master file.
>
> This makes sense only with a file-based VCS, not a tree-based VCS like
> git.

This isn't about file vs tree, but more about centralized vs distributed.
In DVCS workflows "needs-update" as a concept does not even exist when you
are working on a topic branch to perfect one thing and one thing only.
You do not want to update only because somebody else did some work that
may be totally unrelated to what you wanted to achieve on the current
branch.

I presume that many people use git in centralized workflow where they use
only 'master' branch and "git pull ; work ; git commit; git push" are the
only things they do.  In that setting, "needs-update" may make sense.  The
VC backend implementation has to do "git fetch" to see if the origin has
advanced.

Almost the same comment applies to 'needs-merge', but the VC backend not
only needs to worry about "file has been edited", but also "commits that
touch the file has been made locally".

> Eric>   'removed           Scheduled to be deleted from the repository
> Eric>   on next commit.
>
> Not useful in git.

Isn't "git rm removed" exactly "scheduled to be deleted"?

> Eric>   'missing           The file is not present in the file system, but the VC
> Eric>                      system still tracks it.
>
> Not available in git.  (If it's not a real file, it can't be tracked. :)

Isn't "rm missing" exactly this?

> Eric>   'ignored           The file showed up in a dir-status listing with a flag
> Eric>                      indicating the version-control system is ignoring it,
>
> Eric>   'unregistered      The file is not under version control.
>
> These two would be identical in git.

Ignored is a subset of Unregistered, no?  Neither exists in the index
(i.e. not tracked); ignored ones are covered by .gitignore and you need to
force "git add" to start tracking them.
--
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]