Re: git diff woes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Ericsson
Date: Monday, November 12, 2007 - 4:19 am

Johannes Schindelin wrote:

The context is ambiguous, as it must be present in both the new and the
old file for it to actually *be* context. Otherwise it would be part of
the +- diff text.


Sure, but the useraid with writing the apparent function declaration in
the hunk header *will* be confusing if the function declaration changes
in the same patch as other things in the function.


Give me something valuable instead, such as your opinion on whether it
would be better to not print the function declaration at all if it will
be changed by applying the same patch, or if one should pick one of the
declarations from old or new and, if so, which one to pick.

I simply refuse to believe that you wouldn't immediately think the hunk
below holds an obvious bug. I thought so because of the helpful function
context git diff prints (which is a helper for human reviewers, and not
something git-apply or GNU patch needs to work), and now I want to do
something about it so others won't have to suffer the same confusion.

@@ -583,75 +346,100 @@ double jitter_request(const char *host, int *status){
       if(verbose) printf("%d candiate peers available\n", num_candidates);
       if(verbose && syncsource_found) printf("synchronization source found\n")
       if(! syncsource_found){
-               *status = STATE_UNKNOWN;
+               status = STATE_WARNING;
               if(verbose) printf("warning: no synchronization source found\n")
       }

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231
-
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:
git diff woes, Andreas Ericsson, (Mon Nov 12, 2:44 am)
Re: git diff woes, Johannes Schindelin, (Mon Nov 12, 3:01 am)
Re: git diff woes, Andreas Ericsson, (Mon Nov 12, 3:35 am)
Re: git diff woes, Johannes Schindelin, (Mon Nov 12, 3:50 am)
Re: git diff woes, Andreas Ericsson, (Mon Nov 12, 4:19 am)
Re: git diff woes, Junio C Hamano, (Mon Nov 12, 2:30 pm)
Re: git diff woes, Andreas Ericsson, (Mon Nov 12, 5:03 pm)
Re: git diff woes, Johannes Schindelin, (Mon Nov 12, 5:59 pm)
Re: git diff woes, Miles Bader, (Mon Nov 12, 7:53 pm)
Re: git diff woes, Andreas Ericsson, (Tue Nov 13, 12:40 am)
[PATCH] diffcore: Allow users to decide what funcname to use, Andreas Ericsson, (Tue Nov 13, 2:15 am)