From: "Marco Costalba" <mcostalba@gmail.com>
To: "Linus Torvalds" <torvalds@linux-foundation.org>
Cc: "Paul Mackerras" <paulus@samba.org>, git@vger.kernel.org
Subject: Re: New features in gitk
Date: Fri, 2 Nov 2007 17:50:47 +0100 [thread overview]
Message-ID: <e5bfff550711020950w3b628f24k767127c1ffc54510@mail.gmail.com> (raw)
In-Reply-To: <alpine.LFD.0.999.0711020828440.3342@woody.linux-foundation.org>
On 11/2/07, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> But it will *notice* when it gets the wrong answer, though, and can reset
> and start over!
>
> IOW, I might be able to do something that
>
> - prints out the commit info per line
>
> - prepends each line with a line number
>
> - goes back to an earlier line 'n' when it notices that it needs to
> output a commit before a previous commit (or when it notices that a
> commit that it had already output was actually not supposed to show up)
>
> and with something like that, I could make git give you incremental
> output.
>
Yes. That's would be easier to implement. Better yet do not give line
numbers I already push back each revision sha in a vector according to
arrival order. It's a stack like storing.
So would be nice if 'git log --restarting' would work like this:
- Output the normal stream of commits according to git log arguments.
No line numbers, no fancy additional stuff.
- If '--topo-order' or something similar was given git log checks if a
wrong output occurs, as example because it founds a revisions that
should have been already put out say 'n' revisions before the last
outputted one.
- In the above case git log outputs a side-band data of "uhhuh, I screwed
up, I restart from 'n' revisions before the last one outputted".
- Then ouput _again_ the stream starting from 'n' revisions earlier.
Note that not only the new offending revision is trasmitted but *all
the revisions* from the out of order one to the remaining.
Given a vector of 'k' arrived revisions, for me it's far easier simply
to flush the 'n' tail items in the sha vector and restart again then
_insert_ in the vector the new out of order one.
This is because parsing alghoritm is based on an 'append new stuff'
approach, not 'insert in the middle', so better flush all the tail
also if probably the big part of retrasmitted revisions would remain
the same.
Marco
P.S: The out of bound information should be commit data aligned and
could take advantage of the fact that an sha always starts with an
alphanumeric char value [0..9 a..f]
IOW instead of the commit sha this signal could write something like
'Restarting from -12'
and parsing knows that an sha cannot start with an 'R'. Please note
that 'instead of the commit sha' it means in the _exact_ place where
sha is expected and this is not predefined but depends on the git-log
arguments, so that as example
$git log --with-restart
would output:
commit 6959893b0b65ebc68ce2fb524a8ec15a26ca4972
Merge: 452b800... d279fc1...
Author: Junio C Hamano <gitster@pobox.com>
Date: Wed Oct 31 23:53:55 2007 -0700
Merge branch 'sp/mergetool'
* sp/mergetool:
mergetool: avoid misleading message "Resetting to default..."
mergetool: add support for ECMerge
mergetool: use path to mergetool in config var mergetool.<tool>.path
commit Restart from -7
commit 3e4bb087a18435b12eb82116e93af2887578e816
Merge: 5fb1948... 136e631...
Author: Junio C Hamano <gitster@pobox.com>
Date: Thu Nov 1 17:09:08 2007 -0700
Merge branch 'maint'
while
$git log --with-restart --pretty=oneline
would output
6959893b0b65ebc68ce2fb524a8ec15a26ca4972 Merge branch 'sp/mergetool'
Restart from -7
3e4bb087a18435b12eb82116e93af2887578e816 Merge branch 'maint'
5fb19486e6f4b6d31f33f5a1eab970b244fa2d08 Merge branch 'bk/maint-cvsexportcommit'
In this way this side band info became compatible with _any_ git-log
output format as long as the format foreseens the output of the
revision sha.
next prev parent reply other threads:[~2007-11-02 16:51 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-28 1:39 New features in gitk Paul Mackerras
2007-10-28 5:34 ` Linus Torvalds
2007-10-28 7:11 ` Paul Mackerras
2007-10-28 7:36 ` Steffen Prohaska
2007-10-28 16:50 ` Linus Torvalds
2007-11-01 10:00 ` Paul Mackerras
2007-11-01 15:16 ` Linus Torvalds
2007-11-02 10:19 ` Paul Mackerras
2007-11-02 12:44 ` Marco Costalba
2007-11-02 15:42 ` Linus Torvalds
2007-11-02 16:50 ` Marco Costalba [this message]
2007-11-02 18:16 ` Linus Torvalds
2007-11-02 20:31 ` [PATCH 0/2] History replay support Linus Torvalds
2007-11-02 20:32 ` [PATCH 1/2] Simplify topo-sort logic Linus Torvalds
2007-11-02 20:35 ` [PATCH 2/2] Support "history replay" for git log commands Linus Torvalds
2007-11-02 21:05 ` Junio C Hamano
2007-11-02 21:17 ` Linus Torvalds
2007-11-03 1:40 ` [PATCH 0/2] History replay support Linus Torvalds
2007-11-03 7:56 ` Marco Costalba
2007-11-03 18:11 ` [REPLACEMENT PATCH 2/2] Add "--early-output" log flag for interactive GUI use Linus Torvalds
2007-11-03 19:52 ` Marco Costalba
2007-11-04 3:06 ` Paul Mackerras
2007-11-04 5:38 ` Linus Torvalds
2007-11-04 7:10 ` Paul Mackerras
2007-11-04 7:52 ` Marco Costalba
2007-11-04 18:11 ` Linus Torvalds
2007-11-04 20:12 ` [PATCH 3/2] Enhance --early-output format Linus Torvalds
2007-11-05 20:24 ` Junio C Hamano
2007-11-05 20:47 ` Linus Torvalds
2007-11-05 21:22 ` Linus Torvalds
2007-11-05 21:35 ` Linus Torvalds
2007-11-13 4:58 ` [PATCH 4/2] Fix parent rewriting in --early-output Linus Torvalds
2007-11-13 5:43 ` Junio C Hamano
2007-11-13 6:46 ` Linus Torvalds
2007-11-13 7:16 ` Linus Torvalds
2007-11-13 7:53 ` Sven Verdoolaege
2007-11-13 8:48 ` Junio C Hamano
2007-11-13 8:01 ` Shawn O. Pearce
2007-11-13 8:24 ` Junio C Hamano
2007-11-13 9:59 ` Paul Mackerras
2007-11-13 18:53 ` Junio C Hamano
2007-11-13 21:55 ` Paul Mackerras
2007-11-16 7:30 ` Marco Costalba
2007-11-04 0:32 ` [PATCH 0/2] History replay support Paul Mackerras
2007-11-02 18:17 ` New features in gitk Johannes Schindelin
2007-11-02 15:03 ` Linus Torvalds
2007-11-01 11:37 ` Paul Mackerras
2007-11-01 15:47 ` Linus Torvalds
2007-11-01 16:21 ` Linus Torvalds
2007-10-28 18:32 ` Pierre Habouzit
2007-10-28 18:38 ` Mike Hommey
2007-10-28 23:13 ` Paul Mackerras
2007-10-29 6:20 ` Pierre Habouzit
2007-10-29 8:31 ` Jonathan del Strother
2007-10-29 6:24 ` Pierre Habouzit
2007-10-29 13:30 ` Han-Wen Nienhuys
2007-10-29 14:04 ` Michele Ballabio
-- strict thread matches above, loose matches on Subject: below --
2005-06-27 22:22 new " Paul Mackerras
2005-06-27 22:49 ` Luc Van Oostenryck
2005-06-27 23:36 ` Paul Mackerras
2005-06-28 20:24 ` Luc Van Oostenryck
2005-06-28 1:21 ` Linus Torvalds
2005-06-28 23:41 ` Paul Mackerras
2005-06-28 6:22 ` Greg KH
2005-06-30 6:20 ` Junio C Hamano
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=e5bfff550711020950w3b628f24k767127c1ffc54510@mail.gmail.com \
--to=mcostalba@gmail.com \
--cc=git@vger.kernel.org \
--cc=paulus@samba.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).