From: Jeff King <peff@peff.net>
To: "Nikola Knežević" <laladelausanne@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: format-patch problem when using relative
Date: Wed, 26 Nov 2008 13:01:54 -0500 [thread overview]
Message-ID: <20081126180154.GA7584@coredump.intra.peff.net> (raw)
In-Reply-To: <17081052-4480-4971-9F38-BD5C48087379@gmail.com>
On Wed, Nov 26, 2008 at 05:12:02PM +0100, Nikola Knežević wrote:
> git format-patch -o patches -n --relative=click click/master myclick
>
> This produced a bunch of files in patches directory, most of which are
> empty. When I tried this --stdout, I had something like this:
Hmm. It seems that there is no history pruning done with --relative, so
you will still end up with commits that make no changes. However, this
is intentional. See cd676a51:
diff --relative: output paths as relative to the current subdirectory
[...]
- This works not just with diff but also works with the log
family of commands, but the history pruning is not affected.
In other words, if you go to a subdirectory, you can say:
$ git log --relative -p
but it will show the log message even for commits that do not
touch the current directory. You can limit it by giving
pathspec yourself:
$ git log --relative -p .
This originally was not a conscious design choice, but we
have a way to affect diff pathspec and pruning pathspec
independently. IOW "git log --full-diff -p ." tells it to
prune history to commits that affect the current subdirectory
but show the changes with full context. I think it makes
more sense to leave pruning independent from --relative than
the obvious alternative of always pruning with the current
subdirectory, which would break the symmetry.
So I think what you really want is:
git format-patch --relative=click click/master myclick -- click
to limit the path pruning to the 'click' directory.
-Peff
next prev parent reply other threads:[~2008-11-26 18:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 16:12 format-patch problem when using relative Nikola Knežević
2008-11-26 18:01 ` Jeff King [this message]
2008-11-26 18:58 ` Nikola Knežević
2008-11-27 9:42 ` Björn Steinbrink
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=20081126180154.GA7584@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=laladelausanne@gmail.com \
/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