From: Nguyen Thai Ngoc Duy Date: Fri, 07 Sep 2012 01:18:39 GMT Subject: Re: Re: [PATCH 7/7] t0000: verify that real_path() removes extra slashes Message-ID: In-Reply-To: <7vharb3vib.fsf@alter.siamese.dyndns.org> On Fri, Sep 7, 2012 at 12:34 AM, Junio C Hamano wrote: > Modulo that I suspect you could get rid of offset_1st_component() > altogether and has_dos_drive_prefix() return the length of the "d:" > or "//d" part (which needs to be copied literally regardless of the > "normalization"), what you suggest feels like the right approach. > Why do you need the "keep_root" parameter and do things differently > depending on the setting by the way? That's how offset_1st_component() originally works, root slash if present is counted. > Wouldn't "skip the root level > when computing the offset of the first path component" something the > caller can easily decide to do or not to do, and wouldn't it make > the semantics of the function cleaner and simpler by making it do > only one thing and one thing well? Yeah. I'll have a closer look later and see if we can simplify the function. -- Duy -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en