Re: Confusion about diffing branches

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

 



Theodore Tso <tytso@xxxxxxx> writes:

> The bigger inconsistency is with git-format-patch, which *does* take a
> set of commits, and where "git-format-patch a" does operates on a very
> different set of commits than what what "git-rev-list a" returns.  I
> understand that for backwards compatibility "git-format-patch a" is
> equivalent to "git-format-patch a..HEAD", but what it means is that
> all other ways of specifying sets of commits work with
> git-format-patch, *except* if you want to specify all commits from the
> beginning of time to a particular head (i.e., "git-rev-list a") is
> something that you simply can not possibly do using git-format-patch.

Heh, I really hate when people say this.

If you wanted to, you could:

	$ git format-patch a a

The original syntax

	$ git format-patch upstream

may have been a mistake and maybe

	$ git format-patch ^upstream

or even        

	$ git format-patch --since upstream

might have been better.  It is (1) too late to change now, and
(2) for too small or perhaps negative a gain.

The reason why I say (2) is because _I_ think it is far more
common and frequent to want to get "patches the other guy does
not have" than "everything since nothingness up to this point".

Oops.  I think I have a solution.

	$ git format-patch a a

does not do _ROOT_ commit.  So you have to say

	$ git format-patch --root a a

for the above example to work.  Why not tweak the option parser
so that:

	$ git format-patch --root a

to do what you want?  Without --root and with a single positive
commit, it can keep doing the traditional "what I did since I
forked from that guy's history".

Hmm...

-
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