Re: format-patch problem when using relative

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux