You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/05 14:10:52 UTC
svn commit: r982563 - /subversion/trunk/subversion/libsvn_diff/parse-diff.c
Author: dannas
Date: Thu Aug 5 12:10:52 2010
New Revision: 982563
URL: http://svn.apache.org/viewvc?rev=982563&view=rev
Log:
Follow-up to r982534. Remove obsolute TODO's.
We're not going to do any checks to compare the paths found
on the '--git diff a/old_path b/new_path' line with paths found
in subsequent lines. I haven't come up with a way to handle
paths with spaces in the git diff line unless old_path and
new_path are the same which is only guarenteed for added and
deleted empty paths.
* subversion/libsvn_diff/parse-diff.c
(git_minus,
git_plus,
git_move_from,
git_move_to,
git_copy_from,
git_copy_to,
svn_diff_parse_next_patch): Remove obsolute TODO's.
Modified:
subversion/trunk/subversion/libsvn_diff/parse-diff.c
Modified: subversion/trunk/subversion/libsvn_diff/parse-diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_diff/parse-diff.c?rev=982563&r1=982562&r2=982563&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_diff/parse-diff.c (original)
+++ subversion/trunk/subversion/libsvn_diff/parse-diff.c Thu Aug 5 12:10:52 2010
@@ -985,8 +985,6 @@ static svn_error_t *
git_minus(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
/* If we can find a tab, it separates the filename from
* the rest of the line which we can discard. */
char *tab = strchr(line, '\t');
@@ -1006,8 +1004,6 @@ static svn_error_t *
git_plus(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
/* If we can find a tab, it separates the filename from
* the rest of the line which we can discard. */
char *tab = strchr(line, '\t');
@@ -1027,8 +1023,6 @@ static svn_error_t *
git_move_from(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
SVN_ERR(grab_filename(&patch->old_filename, line + strlen("rename from "),
result_pool, scratch_pool));
@@ -1041,8 +1035,6 @@ static svn_error_t *
git_move_to(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
SVN_ERR(grab_filename(&patch->new_filename, line + strlen("rename to "),
result_pool, scratch_pool));
@@ -1057,8 +1049,6 @@ static svn_error_t *
git_copy_from(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
SVN_ERR(grab_filename(&patch->old_filename, line + strlen("copy from "),
result_pool, scratch_pool));
@@ -1071,8 +1061,6 @@ static svn_error_t *
git_copy_to(enum parse_state *new_state, const char *line, svn_patch_t *patch,
apr_pool_t *result_pool, apr_pool_t *scratch_pool)
{
- /* ### Check that the path is consistent with the 'git --diff ' line. */
-
SVN_ERR(grab_filename(&patch->new_filename, line + strlen("copy to "),
result_pool, scratch_pool));
@@ -1149,11 +1137,6 @@ svn_diff_parse_next_patch(svn_patch_t **
enum parse_state state = state_start;
- /* ### dannas: As I've understood the git diff format, the first line
- * ### contains both paths and the paths in the headers that follow are only
- * ### there to ensure that the path is valid. Not sure though, the
- * ### research continues... */
-
/* Our table consisting of:
* Expected Input Required state Function to call */
struct transition transitions[] =