From: "Marco Costalba" <mcostalba@gmail.com>
To: git@vger.kernel.org
Cc: junkio@cox.net
Subject: [RFC] revision limiter in git-rev-list
Date: Tue, 6 Jun 2006 10:36:31 +0200 [thread overview]
Message-ID: <e5bfff550606060136l59143ef2mdb9dc68ab78e9ff1@mail.gmail.com> (raw)
We currently can run something like
git-rev-list --topo-order --parents HEAD -- foo1.c foo2.c foo3.c
And have in output a list of revisions that modify paths foo1.c,
foo2.c and foo.3
For each revision we have also the corresponding pseudo-parents,
i.e. the proper parents chosen among the revisions in output list.
The idea is to extend this behaviour to also commit objects sha.
As example, given the following revisions history:
a
b-
| c
| d
e
f
We could add a new option --filtered so that
git-rev-list --topo-order --filtered HEAD -- a d e
Gives the following
a
b-
| d
e
Note that the merge point b has been added implicitly as in path limiter case.
This is a powerful and quite general option that can be use for a large
and interesting number of cases.
1) Get the branch a given <sha> belongs
git-rev-list --topo-order --parents --filtered
HEAD -- <sha> branchList[0] branchList[1]... branchList[k-1]
where branchList[] is the vector of branches of lenght k
Searched branch is the one where sha appears as one of his parents.
2) Get nearest previous tag of a given <sha>
git-rev-list --topo-order --parents -n1 --filtered
<sha> -- <sha> tagList[0] tagList[1]... tagList[n-1]
where tagList[] is the vector of tags of lenght n
In output we have only one revision (see option -n1) that is <sha>,
his parent(s) are the nearest tag(s).
3) Get tag/branch history with a sensible graph (using a GUI frontend)
git-rev-list --topo-order --parents --filtered HEAD -- tagList[0] ...
branchList[n-1]
git-rev-list --topo-order --parents --filtered HEAD -- branchList[0]
... branchList[n-1]
4) Filter/find revisions according to a given search criteria (using a
GUI frontend)
git-rev-list --topo-order --parents --filtered HEAD -- matchList[0]
... matchList[n-1]
where matchList[] is the vector of sha's matching a filter criteria and could
be provided by a GUI frontend that already normally have filter capabilities.
The plus here is to let frontend to draw a sensible graph of the
resulting revisions.
Probably there are other uses of this option that is very powerful
because essentially
it adds topological information to a given set of revisions.
Of course I really ignore any implementation difficult/feasibility issues ;-)
Marco
next reply other threads:[~2006-06-06 8:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-06 8:36 Marco Costalba [this message]
2006-06-06 10:29 ` [RFC] revision limiter in git-rev-list Junio C Hamano
2006-06-06 11:14 ` Marco Costalba
2006-06-06 11:46 ` Marco Costalba
2006-06-06 18:29 ` 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=e5bfff550606060136l59143ef2mdb9dc68ab78e9ff1@mail.gmail.com \
--to=mcostalba@gmail.com \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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).