[Webkit-unassigned] [Bug 34871] svn-apply errors out when removing directories in git

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 11 11:55:43 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=34871





--- Comment #5 from Joseph Pecoraro <joepeck at webkit.org>  2010-04-11 11:55:43 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > Clearly "ignore-unmatch" hides the error.  But why do we have the error in the
> > first place?  Do we try to remove the directory twice?
> 
> I'm guessing git actually removes the directory when it becomes empty (the
> files are removed before the directory). I'll investigate this.

Looks like it. As you know, git doesn't handle empty directories very well.
When you `git rm` all the files in a directory (making the directory empty) git
automatically removes the directory. I whipped up a sample git repo to verify
this behavior:

    # Directory bar with two files
    shell> ls -l
    total 0
    drwxr-xr-x  4 pecoraro_mbp  staff   136B Apr 11 11:50 bar/
    shell> ls -l bar/
    total 0
    -rw-r--r--  1 pecoraro_mbp  staff     0B Apr 11 11:50 a.txt
    -rw-r--r--  1 pecoraro_mbp  staff     0B Apr 11 11:50 b.txt

    # Remove a file, the directory still exists
    shell> git rm bar/a.txt
    rm 'bar/a.txt'
    shell> ls -l
    total 0
    drwxr-xr-x  4 pecoraro_mbp  staff   136B Apr 11 11:50 bar/

    # Remove the last file, the directory gets deleted
    shell> git rm bar/b.txt
    rm 'bar/b.txt'
    shell> ls -l
    # NO OUTPUT

    # Trying to remove what was already removed? Priceless
    shell> git rm bar
    fatal: pathspec 'bar' did not match any files

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list