Tree with leading '0' modes in 1.7.0.3

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn O. Pearce
Date: Friday, March 26, 2010 - 2:56 pm

Mike (CC'd) found a bad Git tree today, where the modes for subtrees
where formatted using a leading '0':

  $ od -c tree
  0000000   1   0   0   6   4   4       R   E   A   D   M   E  \0 244  \r
  0000020 233 214 350 375   0 263 374 227 264 343   $ 031 027   ` 373 301
  0000040   !   h   0   4   0   0   0   0       m   o   d   u   l   e   s
  0000060  \0 262   z   K 240   4 377   \ 245   C   c   " 231 377  \n   t
  0000100   ,  \n   O   R   E   0   4   0   0   0   0       s   t   e   w
  0000120   a   r   d   b   o   t  \0 037  \b   5 262 345 234 034 303   C
  0000140 373 335 207 300   u 341 277  \f   ] 320 207
  0000153

The '0' on the 3rd line after '! h' is wrong.  It shouldn't be here.
Likewise the '0' on the 5th line after "O R E" is also wrong.
At least its consistently broken.  But its still broken by fsck
standards:

 $ git fsck --full a39aa6d
 warning in tree a39aa6d4a6dcfd6c14d8f818bbdf1dfcb3e11771: contains zero-padded file modes

Mike claims this tree was created with git-core 1.7.0.3.  This thread
actually started over on Gerrit Code Review's mailing list [1],
because JGit refuses to allow this malformed tree mode to pass its
fsck implementation.

Any ideas?  Why is Git 1.7.0.3 jamming a leading '0' on a file mode?


[1] https://groups.google.com/group/repo-discuss/browse_thread/thread/6ff8d7ffba5a9775

-- 
Shawn.
--
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:
Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Fri Mar 26, 2:56 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Jonathan Nieder, (Fri Mar 26, 3:26 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Fri Mar 26, 3:29 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Jonathan Nieder, (Fri Mar 26, 3:40 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Mike.lifeguard, (Fri Mar 26, 3:59 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Fri Mar 26, 4:05 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Junio C Hamano, (Fri Mar 26, 4:09 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Mike.lifeguard, (Fri Mar 26, 4:22 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Jonathan Nieder, (Fri Mar 26, 4:49 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Junio C Hamano, (Fri Mar 26, 4:50 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Avery Pennarun, (Fri Mar 26, 4:56 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Mike.lifeguard, (Fri Mar 26, 5:00 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Fri Mar 26, 6:22 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Nicolas Pitre, (Fri Mar 26, 6:30 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Fri Mar 26, 6:34 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Nicolas Pitre, (Fri Mar 26, 6:56 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Avery Pennarun, (Fri Mar 26, 7:33 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Junio C Hamano, (Fri Mar 26, 10:16 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Scott Chacon, (Sat Mar 27, 5:44 am)
Re: Tree with leading '0' modes in 1.7.0.3, Nicolas Pitre, (Sat Mar 27, 7:21 am)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Sat Mar 27, 12:14 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Sat Mar 27, 12:20 pm)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sat Mar 27, 12:30 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Shawn O. Pearce, (Sat Mar 27, 12:32 pm)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sat Mar 27, 12:39 pm)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sat Mar 27, 12:44 pm)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sat Mar 27, 12:57 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Junio C Hamano, (Sat Mar 27, 1:04 pm)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sat Mar 27, 1:13 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Junio C Hamano, (Sat Mar 27, 1:16 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Avery Pennarun, (Sat Mar 27, 3:16 pm)
Re: Tree with leading '0' modes in 1.7.0.3, Sitaram Chamarty, (Sun Mar 28, 10:38 am)
Re: Tree with leading '0' modes in 1.7.0.3, A Large Angry SCM, (Sun Mar 28, 4:28 pm)