Git-svn W: -empty_dir warnings. What do they mean?

后端 未结 3 466
暗喜
暗喜 2021-02-01 02:31

While trying to clone an existing Subversion repository using git-svn using standard layout, I got a bunch of W: -empty_dir (and W: +empty_dir) warning

3条回答
  •  难免孤独
    2021-02-01 02:50

    Regarding the question in the title (which is what draws google's attention to this page), according to my findings, using either git-svn 1.7.1 or git 1.8.5: the warning W: -empty_dir: x/y/z means that the file or folder x/y/z was removed in the SVN changeset. Unless you specified -q (--quiet), that fact was already reported as D x/y/z. What I think it tries to say is that as a consequence, the folder x/y might have become empty and was therefore removed from the git view. It is far more common that x/y did not become empty and there is nothing peculiar going on.

    In practice, if removing x/y/z would have left x/y empty, you would probably have removed the whole of x/y in the SVN changeset, and the removal of x/y/z would not even be reported separately. So you would not get that warning, but instead W: -empty_dir: x/y warns you that x might have become empty, which you know it didn't because then you would have deleted x...

    If, on the other hand, you did leave empty directories around and want to keep them, I guess you would use --preserve-empty-dirs and I see no point in the warning either (if it still appears in that case).

    So in short, ignore it. Unlike W: +empty_dir, which is a different story.

提交回复
热议问题