threads / discuss / 10691

git-rev-list diff options broken

Subject: git-rev-list diff options broken

## tl;dr

5 messages between Nov 6, 2007 and Nov 6, 2007.

replies: 4people: 2as markdown or json

Han-Wen Nienhuys· Nov 6, 2007, 22:14 UTC · lore
Hi,
the git-rev-list manpage says

** Diff Formatting ~~~~~~~~~~~~~~~

Below are listed options that control the formatting of diff output. Some of them are specific to gitlink:git-rev-list[1], however other diff options may be given. See gitlink:git-diff-files[1] for more options. **

however, the source code says
	if ((!list &&
	     (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) &&
	      !revs.pending.nr)) ||
	    revs.diff)
		usage(rev_list_usage);

so any attempt at showing diffs with git-rev-list will fail. What's the deal with this?

-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Han-Wen Nienhuys· Nov 6, 2007, 22:15 UTC · re: Han-Wen Nienhuys · lore

Re: git-rev-list diff options broken

2007/11/6, Han-Wen Nienhuys <hanwenn@gmail.com>:
> so any attempt at showing diffs with git-rev-list will fail. What's
> the deal with this?
this is with
  git version 1.5.3.5.576.gfe6193
-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Johannes Schindelin· Nov 6, 2007, 23:33 UTC · re: Han-Wen Nienhuys · lore

Re: git-rev-list diff options broken

Hi,
On Tue, 6 Nov 2007, Han-Wen Nienhuys wrote:
Show 23 quoted lines
> the git-rev-list manpage says
> 
> 
> **
> Diff Formatting
> ~~~~~~~~~~~~~~~
> 
> Below are listed options that control the formatting of diff output.
> Some of them are specific to gitlink:git-rev-list[1], however other diff
> options may be given. See gitlink:git-diff-files[1] for more options.
> **
> 
> however, the source code says
> 
> 
> 	if ((!list &&
> 	     (!(revs.tag_objects||revs.tree_objects||revs.blob_objects) &&
> 	      !revs.pending.nr)) ||
> 	    revs.diff)
> 		usage(rev_list_usage);
> 
> so any attempt at showing diffs with git-rev-list will fail. What's
> the deal with this?
Probably you want to use "git log".

"git blame -L 585,589 builtin-rev-list.c" indicates that 8c1f0b44(Fix up rev-list option parsing) was responsible, which in turn indicates that it was intentional.

Hth, Dscho

Han-Wen Nienhuys· Nov 6, 2007, 23:38 UTC · re: Johannes Schindelin · lore

Re: git-rev-list diff options broken

2007/11/6, Johannes Schindelin <Johannes.Schindelin@gmx.de>:
Show 6 quoted lines
>
> Probably you want to use "git log".
>
> "git blame -L 585,589 builtin-rev-list.c" indicates that 8c1f0b44(Fix up
> rev-list option parsing) was responsible, which in turn indicates that it
> was intentional.
OK. So the man page needs fixing, right?
-- 
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen
Johannes Schindelin· Nov 6, 2007, 23:55 UTC · re: Han-Wen Nienhuys · lore

Re: git-rev-list diff options broken

Hi,
On Tue, 6 Nov 2007, Han-Wen Nienhuys wrote:
Show 9 quoted lines
> 2007/11/6, Johannes Schindelin <Johannes.Schindelin@gmx.de>:
> 
> > Probably you want to use "git log".
> >
> > "git blame -L 585,589 builtin-rev-list.c" indicates that 8c1f0b44(Fix 
> > up rev-list option parsing) was responsible, which in turn indicates 
> > that it was intentional.
> 
> OK. So the man page needs fixing, right?

I guess. Although it seems a bit involved, since the diff-formats.txt are not included by git-rev-list.txt itself, but by pretty-formats.txt.

Ciao, Dscho

← back to recent threads