1. 12 4月, 2007 2 次提交
    • L
      Teach directory traversal about subprojects · 09595258
      Linus Torvalds 提交于
      This is the promised cleaned-up version of teaching directory traversal
      (ie the "read_directory()" logic) about subprojects. That makes "git add"
      understand to add/update subprojects.
      
      It now knows to look at the index file to see if a directory is marked as
      a subproject, and use that as information as whether it should be recursed
      into or not.
      
      It also generally cleans up the handling of directory entries when
      traversing the working tree, by splitting up the decision-making process
      into small functions of their own, and adding a fair number of comments.
      
      Finally, it teaches "add_file_to_cache()" that directory names can have
      slashes at the end, since the directory traversal adds them to make the
      difference between a file and a directory clear (it always did that, but
      my previous too-ugly-to-apply subproject patch had a totally different
      path for subproject directories and avoided the slash for that case).
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      09595258
    • L
      Fix thinko in subproject entry sorting · 1833a925
      Linus Torvalds 提交于
      This fixes a total thinko in my original series: subprojects do *not* sort
      like directories, because the index is sorted purely by full pathname, and
      since a subproject shows up in the index as a normal NUL-terminated
      string, it never has the issues with sorting with the '/' at the end.
      
      So if you have a subproject "proj" and a file "proj.c", the subproject
      sorts alphabetically before the file in the index (and must thus also sort
      that way in a tree object, since trees sort as the index).
      
      In contrast, it you have two files "proj/file" and "proj.c", the "proj.c"
      will sort alphabetically before "proj/file" in the index. The index
      itself, of course, does not actually contain an entry "proj/", but in the
      *tree* that gets written out, the tree entry "proj" will sort after the
      file entry "proj.c", which is the only real magic sorting rule.
      
      In other words: the magic sorting rule only affects tree entries, and
      *only* affects tree entries that point to other trees (ie are of the type
      S_IFDIR).
      
      Anyway, that thinko just means that we should remove the special case to
      make S_ISDIRLNK entries sort like S_ISDIR entries. They don't.  They sort
      like normal files.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NJunio C Hamano <junkio@cox.net>
      1833a925
  2. 11 4月, 2007 4 次提交
  3. 10 4月, 2007 3 次提交
  4. 09 4月, 2007 8 次提交
  5. 08 4月, 2007 5 次提交
  6. 07 4月, 2007 18 次提交