Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: git@vger.kernel.org
Subject: git-apply --reject
Date: Sun, 27 Aug 2006 16:03:40 -0700	[thread overview]
Message-ID: <7vac5pvl0z.fsf@assigned-by-dhcp.cox.net> (raw)

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.

                 reply	other threads:[~2006-08-27 23:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vac5pvl0z.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox