Re: [PATCH] git-diff: Output a warning about stale files in the index

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Monday, August 6, 2007 - 11:46 pm

Steven Grimm <koreth@midwinter.com> writes:


Hmph.  One way to avoid causing problems for diffs that are
piped into other programs and still give the "index of sync"
warning is to emit "diff --git" line and no patch body fot
textual diffs, or 0{40} SHA-1 on the right hand side for --raw
format diffs.

Jokes aside...

For textual diffs, I think we can always spit out the warning
message at the beginning of at the end on the standard output
without harming any of the patch based toolchain.

So how about...

 - If and only if the output format asks for textual diff
   (DIFF_FORMAT_PATCH), we do this "stat-dirty-removal";
   otherwise we do not spend extra cycles and keep the current
   behaviour.

 - At the end of patch text, show "stat-dirty-removal" warning
   on stdout.



-
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:
Re: git-diff on touched files: bug or feature?, Matthieu Moy, (Thu Aug 2, 2:23 am)
Re: git-diff on touched files: bug or feature?, Johannes Schindelin, (Thu Aug 2, 2:51 am)
Re: git-diff on touched files: bug or feature?, Matthieu Moy, (Thu Aug 2, 2:57 am)
Re: git-diff on touched files: bug or feature?, Johannes Schindelin, (Thu Aug 2, 3:48 am)
Re: git-diff on touched files: bug or feature?, jean_francois_veillette, (Thu Aug 2, 7:04 am)
Re: git-diff on touched files: bug or feature?, Johannes Schindelin, (Thu Aug 2, 7:43 am)
Re: git-diff on touched files: bug or feature?, Steven Grimm, (Thu Aug 2, 8:10 am)
Re: git-diff on touched files: bug or feature?, Johannes Schindelin, (Thu Aug 2, 8:23 am)
Re: git-diff on touched files: bug or feature?, Matthieu Moy, (Thu Aug 2, 8:45 am)
Re: git-diff on touched files: bug or feature?, J. Bruce Fields, (Thu Aug 2, 10:58 am)
Re: git-diff on touched files: bug or feature?, Junio C Hamano, (Thu Aug 2, 1:50 pm)
Re: [PATCH] git-diff: Output a warning about stale files i ..., Junio C Hamano, (Mon Aug 6, 11:46 pm)