git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: "Alex Riesen" <raa.lkml@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC?] Telling git about more complex relationships between commits (Was: Re: FFmpeg considering GIT)
Date: Fri, 4 May 2007 13:53:10 +0200	[thread overview]
Message-ID: <200705041353.17992.johan@herland.net> (raw)
In-Reply-To: <81b0412b0705040236w1d5f26bx8ac351ade2f4ea6a@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]

On Friday 04 May 2007, Alex Riesen wrote:
> On 5/4/07, Johan Herland <johan@herland.net> wrote:
> > 1. "Reverts": Mark a commit as reverting another commit. This could be
> > used by git-log to cancel out pairs of commits, resulting in a cleaner
> > view of history. It can help blame/annotate. There are probably other
> > tools that can benefit from this information also.
> >
> > 2. "Cherry-Pick": When cherry-picking a commit onto another branch, you
> > should be able to tell git which commit you are cherry-picking
> > (git-cherry-pick would of course do this automatically). This could
> > enable git to make smarter decisions when merging the two branches: If
> > the cherry-picked commit would cause a conflict with the original
> > commit, git can either skip it (since it knows that one version of this
> > patch is already present), or it can at least present the conflict to
> > the user with some more context than what is available today. Not to
> > mention how this information could be used by blame/annotate.
>
> These are completely useless after the first "git gc --prune" or "git
> clone" unless these tools taught to preserve the reverted or cherry-picked
> commits (and all their history). And if you are about to teach them that,
> please notice that as for now cloning and repacking does not even look at
> the
> objects contents.
> You'll absolutely kill their performance.

Of course I don't want "git gc --prune" or "git clone" to follow these links, 
or know anything about them at all.

As for "Reverts", the commit pointed to should already be in your history, 
since you cannot revert something that hasn't already been applied at an 
earlier point in your history. In other words, the reverted commit will 
automatically be included in your "git gc --prune" or "git clone" regardless 
of the "Reverts" fields, since "Reverts" can only point to an ancestor.

As for "Cherry-Pick", it's a fairly weak relationship that shouldn't affect 
anything except to give a hint to merge, blame, and similar tools. 
If "Cherry-Pick" identifies an object not in your repo (because of "git 
gc --prune" or "git clone"), that is obviously equivalent to not having 
a "Cherry-Pick" field in the first place. "Cherry-Pick" is only useful when 
you have access to the original commit (pointed to by "Cherry-Pick"), but in 
that case I think it could be _really_ useful.


Have fun!

...Johan

-- 
Johan Herland, <johan@herland.net>
www.herland.net

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  parent reply	other threads:[~2007-05-04 12:00 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-02  9:29 FFmpeg considering GIT Panagiotis Issaris
2007-05-02 23:48 ` Jakub Narebski
2007-05-03  1:03   ` Petr Baudis
2007-05-04  0:42     ` Jakub Narebski
2007-05-04  7:21       ` [RFC?] Telling git about more complex relationships between commits (Was: Re: FFmpeg considering GIT) Johan Herland
2007-05-04  9:36         ` Alex Riesen
2007-05-04 11:39           ` Andy Parkins
2007-05-04 12:06             ` Andrew Ruder
2007-05-04 12:30             ` Johan Herland
2007-05-04 11:53           ` Johan Herland [this message]
2007-05-04 22:11             ` Alex Riesen
2007-05-05 12:49               ` Johan Herland
2007-05-05 18:03                 ` Alex Riesen
2007-05-05 16:13               ` Johan Herland
2007-05-04 11:10         ` Petr Baudis
2007-05-04 12:22           ` Johan Herland
2007-05-03  1:48 ` FFmpeg considering GIT Martin Langhoff
2007-05-03 18:00 ` Uwe Kleine-König
2007-05-03 20:00   ` Petr Baudis
2007-05-03 20:05     ` david
2007-05-03 20:13       ` Petr Baudis
2007-05-04 13:46     ` Michael Niedermayer
2007-05-04 15:53       ` Andy Parkins
2007-05-04 16:09         ` Johannes Sixt
2007-05-04 17:23           ` Florian Weimer
2007-05-04 16:40       ` Nicolas Pitre
2007-05-04 18:17       ` Carl Worth
2007-05-04 18:25         ` Johan Herland
2007-05-04 20:24         ` Michael Niedermayer
2007-05-05  4:15           ` Linus Torvalds
2007-05-05 13:35         ` Karl Hasselström
2007-05-05 17:26           ` Linus Torvalds
2007-05-05 22:18             ` Linus Torvalds
2007-05-05 22:30               ` Linus Torvalds
2007-05-06  7:49                 ` Junio C Hamano
2007-05-07 12:13                 ` Paul Mackerras
2007-05-07 12:30                   ` Karl Hasselström
2007-05-07 12:50                   ` Johan Herland
2007-05-07 12:56                   ` Alex Riesen
2007-05-08  6:30                     ` Marco Costalba
2007-05-09  4:28                       ` Paul Mackerras
2007-05-09  6:38                         ` Marco Costalba
2007-05-09 18:17                           ` Robin Rosenberg
2007-05-09 18:28                           ` Jan Hudec
2007-05-09 21:09                             ` Fredrik Kuivinen
2007-05-09 21:36                               ` Jan Hudec
2007-05-10 11:20                                 ` Marco Costalba
2007-05-10 16:52                                   ` Jan Hudec
2007-05-07 17:52                   ` Jan Hudec
2007-05-07 22:10                     ` Gábor Farkas
2007-05-07 23:21                       ` Randal L. Schwartz
     [not found]                       ` <fcaeb9bf0705080707x7ad28afelf98ecd93276042d1@mail.gmail.com>
2007-05-08 15:53                         ` Gábor Farkas
2007-05-07 19:10                   ` Junio C Hamano
2007-05-08  2:03                   ` Shawn O. Pearce
2007-05-08  7:26                   ` Jeff King
2007-05-06  7:56             ` Karl Hasselström
2007-05-06 10:19             ` Karl Hasselström
2007-05-06 16:38               ` Linus Torvalds
2007-05-06  8:15           ` Marco Costalba
2007-05-06 11:14             ` Karl Hasselström
2007-05-06 12:19               ` Marco Costalba
2007-05-06 12:33                 ` Karl Hasselström
2007-05-06 12:33                 ` Marco Costalba
2007-05-06 12:59                   ` Karl Hasselström
2007-05-06 13:03                     ` Karl Hasselström
2007-05-09 22:30                     ` Pavel Roskin

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=200705041353.17992.johan@herland.net \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    --cc=raa.lkml@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;
as well as URLs for NNTP newsgroup(s).