* git-apply --reject
@ 2006-08-27 23:03 Junio C Hamano
0 siblings, 0 replies; only message in thread
From: Junio C Hamano @ 2006-08-27 23:03 UTC (permalink / raw)
To: git
The git-apply program in "next" has had a few additional options
for some time: --reject and --verbose. I've been using this
after a failed "git am" attempt:
git apply --reject --verbose .dotest/patch
This, instead of the usual "patch does not apply so I would not
touch any of your working tree files" behaviour, applies hunks
that are applicable and leaves *.rej files the rejected hunks,
and it reports what it is doing. With --index, files with a
rejected hunk do not get their index entries updated at all, so
"git diff" will show the hunks that successfully got applied.
This seems to be working rather nicely, so I intend to make it
graduate to "master". I made a mistake of adding the man page
that already talks about these options to "master", but with an
incorrect the description for --reject (earlier I planned to
send the rejected hunks to stdout which is still what the
documentation describes), so the documentation will be updated
accordingly.
I initially made --reject without --verbose not talk about
anything that applied cleanly, but as the above example usage
shows, I find myself always using --verbose when using --reject.
Without --verbose to remind the user that the patch updated some
other paths cleanly, it is very easy to lose track of the status
of the working tree. So I'll make the final adjustment to make
it imply --verbose before pushing it out.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-27 23:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-27 23:03 git-apply --reject Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox