From: jpaugh@gmx.us
To: git@vger.kernel.org
Subject: Specifying revisions in the future
Date: Sat, 04 Feb 2012 10:58:55 -0500 [thread overview]
Message-ID: <jgjkk0$qrg$1@dough.gmane.org> (raw)
Hello.
Is it possible to specify revisions in the future? The gitrevisions man
page implies otherwise. Alternatively, is there a way to find out the
number of commits between two revs---assuming one is an ancestor of the
other?
I want to do a certain arbitrary operation for each revision between
where I am now and the tip of the branch.
v1.0-a master
\ \
o---o---o---o---o---o---o
|
I am here
I've been using the following to do what I want:
ref=master; \
for i in {5..1}; do \
echo; \
git log --stat $ref~$i^\!; \
read -p 'Full diff? '; \
echo; \
if [[ $REPLY == 'y' ]]; then \
git diff $ref~$i^\!; \
fi; \
done;
which lists the log and diffstat for last 5 commits between master and
where I am (e.g. an older tag/branch) with an optional full diff. I know
implementing revision specifiers to the future is nontrivial. (I
realized that when I considered non-linear histories.) In this case,
I've distilled it to the point that all I need is the number of commits
between two revs. Can this be had without manually inspecting git log?
Or, is there a better way to get detailed diffs like this?
Thanks.
Jonathan Paugh
next reply other threads:[~2012-02-05 0:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-04 15:58 jpaugh [this message]
2012-02-05 2:44 ` Specifying revisions in the future Jakub Narebski
[not found] ` <4F2DEF89.4030302@gmx.us>
2012-02-05 3:07 ` Jakub Narebski
2012-02-05 20:18 ` Matthieu Moy
2012-02-05 21:37 ` Andreas Schwab
2012-02-05 21:57 ` Jakub Narebski
2012-02-05 22:15 ` Andreas Schwab
2012-02-05 22:24 ` Jakub Narebski
2012-02-05 22:58 ` Andreas Schwab
2012-02-05 22:58 ` Philip Oakley
2012-02-05 23:08 ` Andreas Schwab
2012-02-06 4:28 ` Miles Bader
2012-02-07 21:25 ` Jonathan Paugh
2012-02-06 11:43 ` Matthieu Moy
2012-02-06 12:27 ` Andreas Schwab
2012-02-05 21:59 ` 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='jgjkk0$qrg$1@dough.gmane.org' \
--to=jpaugh@gmx.us \
--cc=git@vger.kernel.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).