From: Junio C Hamano <hidden> Date: 2016-06-15 22:43:29
"Bahadir Balban" [off-list ref] writes:
This might sound like a novice question but anyway: I sometimes have a
need to quickly recover an old revision of a file just to check
something or copy some code from it.
This might sound like a novice question but anyway: I sometimes have a
need to quickly recover an old revision of a file just to check
something or copy some code from it.
$ git show -p $commit:$path >$path.old-version
Is "-p" a short version of "--pretty" ?
(I do not see it documented in the man-page and assume it is not the
"-p" applicable to git-diff-tree, is it ?)
Thanks,
Jérôme
@@ -33,6 +33,10 @@ This manual page describes only the most frequently used options. OPTIONS -------++-p::+ For commits, show the change the commit introduces in a patch form.+ <object>:: The name of the object to show. For a more complete list of ways to spell object names, see
From: Johannes Sixt <hidden> Date: 2016-06-15 22:43:30
Miklos Vajna wrote:
+-p::
+ For commits, show the change the commit introduces in a patch form.
This is already documented by referencing git-diff-tree a few lines
above:
The command takes options applicable to the git-diff-tree[1]
command to control how the changes the commit introduces are
shown.
The man page of git-diff-tree talks about -p, and a lot more options.
Side note: -p is the default for git-show (of commits). Nevertheless, it
makes sense to specify it in combination with other options:
git show -p --stat
will show both the patch and the statistics.
-- Hannes
Hello,
Na Tue, Aug 21, 2007 at 03:09:48PM +0200, Johannes Sixt [off-list ref] pisal(a):
This is already documented by referencing git-diff-tree a few lines
above:
The command takes options applicable to the git-diff-tree[1]
command to control how the changes the commit introduces are
shown.
(..)
Side note: -p is the default for git-show (of commits). Nevertheless, it
makes sense to specify it in combination with other options:
git show -p --stat
will show both the patch and the statistics.
Hm, but -p is used by default for git show, right? And this is not
documented anywhere IMHO. (Maybe other options are used by default,
too?)
- VMiklos
From: David Kastrup <hidden> Date: 2016-06-15 22:43:30
Johannes Sixt [off-list ref] writes:
Miklos Vajna wrote:
quoted
+-p::
+ For commits, show the change the commit introduces in a patch form.
This is already documented by referencing git-diff-tree a few lines
above:
The command takes options applicable to the git-diff-tree[1]
command to control how the changes the commit introduces are
shown.
The man page of git-diff-tree talks about -p, and a lot more
options.
I am not really convinced this is a good idea: at the current point of
time, man-pages are not pulled into they user manual or any other
complete reference tome. So they are basically standalone. Even if
they weren't, I think it does not make all too much sense for a
porcelain command to point to the documentation of a plumbing command
for much of its functionality.
--
David Kastrup
@@ -33,6 +33,10 @@ This manual page describes only the most frequently used options. OPTIONS -------++-p::+ For commits, show the change the commit introduces in a patch form.+ <object>:: The name of the object to show. For a more complete list of ways to spell object names, see
How about this instead:
-- robin
Include diff options into git-show command manual
--
Documentation/git-show.txt | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)