author | Shawn Pearce <spearce@spearce.org> | |
Thu, 2 Mar 2006 17:21:33 +0000 (12:21 -0500) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 3 Mar 2006 07:07:42 +0000 (23:07 -0800) | ||
commit | a41c175d6f3e903844131b6dc39da986248c7585 | |
tree | 2827c48cfea527828bb12396386424329c4ce9bb | tree | snapshot |
parent | c7569b1e0009e0187ce9f87f23699eaa8576b6ee | commit | diff |
Prevent --index-info from ignoring -z.
If git-update-index --index-info -z is used only the first
record given to the process will actually be updated as
the -z option is ignored until after all index records
have been read and processed. This meant that multiple
null terminated records were seen as a single record which
was lacking a trailing LF, however since the first record
ended in a null the C string handling functions ignored the
trailing garbage. So --index-info should be required to be
the last command line option, much as --stdin is required
to be the last command line option. Because --index-info
implies --stdin this isn't an issue as the user shouldn't
be passing --stdin when also passing --index-info.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If git-update-index --index-info -z is used only the first
record given to the process will actually be updated as
the -z option is ignored until after all index records
have been read and processed. This meant that multiple
null terminated records were seen as a single record which
was lacking a trailing LF, however since the first record
ended in a null the C string handling functions ignored the
trailing garbage. So --index-info should be required to be
the last command line option, much as --stdin is required
to be the last command line option. Because --index-info
implies --stdin this isn't an issue as the user shouldn't
be passing --stdin when also passing --index-info.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
update-index.c | diff | blob | history |