@matheusbsbs / matheus-bagliano / commits / bd66361195
Fork 0

Add examples for git-log documentation and others.

I don't think people really follow the links or think very abstractly at all in the first place. So I was thinking more of some explicit examples. I actually think every command should have an example in the man-page, and hey, here's a patch to start things off. Of course, I'm not exactly "Mr Documentation", and I don't know that this is the prettiest way to do this, but I checked that the resulting html and man-page seems at least reasonable. And hey, if the examples look like each other, that's just because I'm also not "Mr Imagination". Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Linus Torvalds committed Oct 30, 2005 at 20:05 UTC bd66361195c5503261a2d1eef6aa685deb058ffb
3 files changed +45
Documentation/git-log.txt
+18
@@ -30,6 +30,24 @@ OPTIONS
30 Show only commits between the named two commits.
31
32
33 +Examples
34 +--------
35 +git log --no-merges::
36 +
37 + Show the whole commit history, but skip any merges
38 +
39 +git log v2.6.12.. include/scsi drivers/scsi::
40 +
41 + Show all commits since version 'v2.6.12' that changed any file
42 + in the include/scsi or drivers/scsi subdirectories
43 +
44 +git log --since="2 weeks ago" -- gitk::
45 +
46 + Show the changes during the last two weeks to the file 'gitk'.
47 + The "--" is necessary to avoid confusion with the *branch* named
48 + 'gitk'
49 +
50 +
51 Author
52 ------
53 Written by Linus Torvalds <torvalds@osdl.org>
Documentation/git-whatchanged.txt
+14
@@ -51,6 +51,20 @@ OPTIONS
51 However, it is not very useful in general, although it
52 *is* useful on a file-by-file basis.
53
54 +Examples
55 +--------
56 +git-whatchanged -p v2.6.12.. include/scsi drivers/scsi::
57 +
58 + Show as patches the commits since version 'v2.6.12' that changed
59 + any file in the include/scsi or drivers/scsi subdirectories
60 +
61 +git-whatchanged --since="2 weeks ago" -- gitk::
62 +
63 + Show the changes during the last two weeks to the file 'gitk'.
64 + The "--" is necessary to avoid confusion with the *branch* named
65 + 'gitk'
66 +
67 +
68 Author
69 ------
70 Written by Linus Torvalds <torvalds@osdl.org> and
Documentation/gitk.txt
+13
@@ -24,6 +24,19 @@ OPTIONS
24 Some argument not yet documented.
25
26
27 +Examples
28 +--------
29 +gitk v2.6.12.. include/scsi drivers/scsi::
30 +
31 + Show as the changes since version 'v2.6.12' that changed any
32 + file in the include/scsi or drivers/scsi subdirectories
33 +
34 +gitk --since="2 weeks ago" -- gitk::
35 +
36 + Show the changes during the last two weeks to the file 'gitk'.
37 + The "--" is necessary to avoid confusion with the *branch* named
38 + 'gitk'
39 +
40 Author
41 ------
42 Written by Paul Mackerras <paulus@samba.org>