Re: [PATCH 1/5] Add 'df_name_compare()' helper function

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Kastrup
Date: Thursday, March 6, 2008 - 6:03 am

Linus Torvalds <torvalds@linux-foundation.org> writes:


Uh, that screams just bloody murder at me with regard to working on
sorted material.  You'll never even get into the situation where the
conflicting "equal" entries will be compared if you presorted them with
something in between.  Consider the case of a merge of

A:
blubb
blubb.hi

B:
blubb.hi
blubb/

Any traversal that is done reasonably efficiently will never compare
blubb to blubb/ and I don't see how to get around this.

Basically, I think you need a special traversal routine.  This routine
will push all non-directory entries during a parallel traverse into a
might-conflict-queue, appending a slash in the course.  The front of
this queue then gets compared with the next processed entry.  If it is
larger, it is kept at the front, if it is equal, the conflict gets
treated/resolved, if it is smaller, it gets popped (since it can't
conflict anymore).

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/5] Add 'df_name_compare()' helper function, Linus Torvalds, (Wed Mar 5, 7:25 pm)
Re: [PATCH 1/5] Add 'df_name_compare()' helper function, David Kastrup, (Thu Mar 6, 6:03 am)
Re: [PATCH 1/5] Add 'df_name_compare()' helper function, Linus Torvalds, (Thu Mar 6, 8:58 am)
Re: [PATCH 1/5] Add 'df_name_compare()' helper function, David Kastrup, (Thu Mar 6, 2:50 pm)