From: merlyn@stonehenge.com (Randal L. Schwartz)
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: Re: git-log to go forward instead of reverse?
Date: 10 Jul 2006 13:31:14 -0700 [thread overview]
Message-ID: <861wstnqwd.fsf@blue.stonehenge.com> (raw)
In-Reply-To: <7vpsgdb40s.fsf@assigned-by-dhcp.cox.net>
>>>>> "Junio" == Junio C Hamano <junkio@cox.net> writes:
>> ## (code here to cd to the right dir omitted)
>> git-fetch
>> if git-status | grep -v 'nothing to commit'
Junio> git-status exits non-zero for "nothing to commit" case, so do
Junio> not grep its output, but check the status of the command, to see
Junio> if your tree is in a good shape to do a pull.
No, this is deliberate. I want to see nothing if we're up to date, but if
not, I want to see *everything else* that git-status said. This nice "grep
-v" does precisely the right thing.
Junio> Do we not leave ORIG_HEAD when we are already up-to-date? If so
Junio> that would be confusing... No, we do leave ORIG_HEAD no matter
Junio> what, so you do not have to have this inner if to grep
Junio> up-to-date (on the other hand, you might want to do intelligent
Junio> things when git-pull fails). So just drop the if and say
Junio> something like:
Junio> else
Junio> PAGER= ; export PAGER
Junio> git pull . origin &&
Junio> git log --pretty ORIG_HEAD..HEAD |
Junio> git shortlog
Junio> fi
However, this is good to know.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
next prev parent reply other threads:[~2006-07-10 20:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-10 18:42 git-log to go forward instead of reverse? Randal L. Schwartz
2006-07-10 19:01 ` Linus Torvalds
2006-07-10 19:06 ` Randal L. Schwartz
2006-07-10 19:20 ` Linus Torvalds
2006-07-10 19:25 ` Randal L. Schwartz
2006-07-10 20:09 ` Linus Torvalds
2006-07-10 20:16 ` Randal L. Schwartz
2006-07-10 21:45 ` Junio C Hamano
2006-07-10 20:26 ` Junio C Hamano
2006-07-10 20:31 ` Randal L. Schwartz [this message]
2006-07-10 19:26 ` Linus Torvalds
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=861wstnqwd.fsf@blue.stonehenge.com \
--to=merlyn@stonehenge.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.