Junio C Hamano <gits...@pobox.com> writes:

> Tobias Preuss <tobias.pre...@googlemail.com> writes:
>
>> I noticed some bizarre behaviour when using: git stash -u.
>> It deletes folders which contain files configured to be ignored.
>
> The files you mark as ignored are expendable and this is not limited
> to "stash".
> ...
> Here is what should happen when you go to 'master':
>
>     $ git checkout master
>     Switched to branch 'master'
>     $ /bin/ls -AF
>     a  .git/  .gitignore
>
> That is, a/file.c that is safely stored in 'side' branch is removed,
> a/file.o that is expendable is deleted, and the empty directory 'a'
> now can be replaced with the regular file 'a' the 'master' branch
> wants to have.

Addendum 1.

    If *.o files are not treated expendable, you would be forced to
    "make clean" every time you switch between these two branches,
    which is unacceptable.

Addendum 2.

    There was an old wishlist item to introduce another class of
    paths (in addition to the "tracked", "untracked" and "ignored")
    that are "ignored-but-precious".  Then "*.o" would still be
    expendable while a directory that must become a regular file
    with "ignored-but-precious" files in it would prevent switching
    from branch 'side' to 'master' in the illustration in the
    previous message in order to keep that "ignored-but-precious"
    file.

    But nobody needed such a feature badly enough to step up and
    implement it.

    cf. http://article.gmane.org/gmane.comp.version-control.git/185746


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

Reply via email to