From: Henning Moll <newsScott@gmx.de>
To: git@vger.kernel.org
Subject: [RFC] git-log should use the same diff-options as git-show
Date: Fri, 18 Mar 2016 21:47:03 +0000 (UTC) [thread overview]
Message-ID: <loom.20160318T222303-528@post.gmane.org> (raw)
Hi
Recently i stumbled upon an old stash entry. It was clear to me that the
stash only contained non-indexed worktree changes. So i assumed to get
insight by doing
$ git log -1 -p stash@{0}
But surprisingly the result was "no patch" (The problem which i was not
aware at that time was the fact that a stash commit is a merge). So i asked
a question on stackoverflow (1) an learned that there are different default
options used depending on the git command used:
$ git show stash@{0}
$ git diff stash@{0}^..stash@{0}
work with default, but for git-log i need to
$ git log -1 -p --cc stash@{0}
to make it behave the same. This does not seem reasonable to me, though i
read about commit 1aec791 (2) in git's own repository. What do you think?
Maybe - as a compromise - just show any kind of hint instead of nothing?
Best regards
Henning
(1) -
http://stackoverflow.com/questions/36089674/git-log-1-p-stash0-shows-empty-patch
(2) -
https://git.kaarsemaker.net/git/commit/1aec7917dc52901c6df301ddc8fea70f5ce0db09/
next reply other threads:[~2016-03-18 21:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-18 21:47 Henning Moll [this message]
2016-03-18 21:54 ` [RFC] git-log should use the same diff-options as git-show Stefan Beller
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=loom.20160318T222303-528@post.gmane.org \
--to=newsscott@gmx.de \
--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