threads / patch / 35631

patch, 6 partsMake 'git help everyday' work

Subject: [PATCH 0/6] Make 'git help everyday' work

## tl;dr

21 messages between Jan 9, 2014 and Jan 22, 2014. Diffs are folded; open one to read it.

replies: 20people: 4as markdown or json

Philip Oakley· Jan 9, 2014, 23:13 UTC · lore
The "Everyday GIT With 20 Commands Or So" guide is not accessible via the git help system. Fix that.
The git everyday file does not use the appropriate filenaming convention for help files, and is not suitably formatted for display as a man page.

First copy everyday.txt to giteveryday.txt Second modify giteveryday to fit man page formatting. Include the standard Git footer. Third add giteveryday to the manpages make list. Fourth add deprecation note to older everday.txt. Include link to new man page. Fifth add 'everyday' to the help --guides list. Finally, update the git(1) link.

The series could be squashed together once any foible have been eliminated.
Philip Oakley (6):
  copy everyday.txt to giteveryday.txt
  Update giteveryday.txt to fit man page formatting
  add giteveryday to the manpages make list
  Add deprecation note to old everyday.txt
  add 'everyday' to the help --guides list
  Update git(1) link to giteveryday
 Documentation/Makefile        |   1 +
 Documentation/everyday.txt    |   4 +
 Documentation/git.txt         |   2 +-
 Documentation/giteveryday.txt | 428 ++++++++++++++++++++++++++++++++++++++++++
 builtin/help.c                |   1 +
 5 files changed, 435 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/giteveryday.txt
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 1/6] copy everyday.txt to giteveryday.txt

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/giteveryday.txt | 413 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 413 insertions(+)
 create mode 100644 Documentation/giteveryday.txt
Show changes to Documentation/giteveryday.txt +413 −0
diff --git a/Documentation/giteveryday.txt b/Documentation/giteveryday.txt
new file mode 100644
index 0000000..2a18c1f
--- /dev/null
+++ b/Documentation/giteveryday.txt
@@ -0,0 +1,413 @@
+Everyday Git With 20 Commands Or So
+===================================
+
+<<Individual Developer (Standalone)>> commands are essential for
+anybody who makes a commit, even for somebody who works alone.
+
+If you work with other people, you will need commands listed in
+the <<Individual Developer (Participant)>> section as well.
+
+People who play the <<Integrator>> role need to learn some more
+commands in addition to the above.
+
+<<Repository Administration>> commands are for system
+administrators who are responsible for the care and feeding
+of Git repositories.
+
+
+Individual Developer (Standalone)[[Individual Developer (Standalone)]]
+----------------------------------------------------------------------
+
+A standalone individual developer does not exchange patches with
+other people, and works alone in a single repository, using the
+following commands.
+
+  * linkgit:git-init[1] to create a new repository.
+
+  * linkgit:git-show-branch[1] to see where you are.
+
+  * linkgit:git-log[1] to see what happened.
+
+  * linkgit:git-checkout[1] and linkgit:git-branch[1] to switch
+    branches.
+
+  * linkgit:git-add[1] to manage the index file.
+
+  * linkgit:git-diff[1] and linkgit:git-status[1] to see what
+    you are in the middle of doing.
+
+  * linkgit:git-commit[1] to advance the current branch.
+
+  * linkgit:git-reset[1] and linkgit:git-checkout[1] (with
+    pathname parameters) to undo changes.
+
+  * linkgit:git-merge[1] to merge between local branches.
+
+  * linkgit:git-rebase[1] to maintain topic branches.
+
+  * linkgit:git-tag[1] to mark known point.
+
+Examples
+~~~~~~~~
+
+Use a tarball as a starting point for a new repository.::
++
+------------
+$ tar zxf frotz.tar.gz
+$ cd frotz
+$ git init
+$ git add . <1>
+$ git commit -m "import of frotz source tree."
+$ git tag v2.43 <2>
+------------
++
+<1> add everything under the current directory.
+<2> make a lightweight, unannotated tag.
+
+Create a topic branch and develop.::
++
+------------
+$ git checkout -b alsa-audio <1>
+$ edit/compile/test
+$ git checkout -- curses/ux_audio_oss.c <2>
+$ git add curses/ux_audio_alsa.c <3>
+$ edit/compile/test
+$ git diff HEAD <4>
+$ git commit -a -s <5>
+$ edit/compile/test
+$ git reset --soft HEAD^ <6>
+$ edit/compile/test
+$ git diff ORIG_HEAD <7>
+$ git commit -a -c ORIG_HEAD <8>
+$ git checkout master <9>
+$ git merge alsa-audio <10>
+$ git log --since='3 days ago' <11>
+$ git log v2.43.. curses/ <12>
+------------
++
+<1> create a new topic branch.
+<2> revert your botched changes in `curses/ux_audio_oss.c`.
+<3> you need to tell Git if you added a new file; removal and
+modification will be caught if you do `git commit -a` later.
+<4> to see what changes you are committing.
+<5> commit everything as you have tested, with your sign-off.
+<6> take the last commit back, keeping what is in the working tree.
+<7> look at the changes since the premature commit we took back.
+<8> redo the commit undone in the previous step, using the message
+you originally wrote.
+<9> switch to the master branch.
+<10> merge a topic branch into your master branch.
+<11> review commit logs; other forms to limit output can be
+combined and include `--max-count=10` (show 10 commits),
+`--until=2005-12-10`, etc.
+<12> view only the changes that touch what's in `curses/`
+directory, since `v2.43` tag.
+
+
+Individual Developer (Participant)[[Individual Developer (Participant)]]
+------------------------------------------------------------------------
+
+A developer working as a participant in a group project needs to
+learn how to communicate with others, and uses these commands in
+addition to the ones needed by a standalone developer.
+
+  * linkgit:git-clone[1] from the upstream to prime your local
+    repository.
+
+  * linkgit:git-pull[1] and linkgit:git-fetch[1] from "origin"
+    to keep up-to-date with the upstream.
+
+  * linkgit:git-push[1] to shared repository, if you adopt CVS
+    style shared repository workflow.
+
+  * linkgit:git-format-patch[1] to prepare e-mail submission, if
+    you adopt Linux kernel-style public forum workflow.
+
+Examples
+~~~~~~~~
+
+Clone the upstream and work on it.  Feed changes to upstream.::
++
+------------
+$ git clone git://git.kernel.org/pub/scm/.../torvalds/linux-2.6 my2.6
+$ cd my2.6
+$ edit/compile/test; git commit -a -s <1>
+$ git format-patch origin <2>
+$ git pull <3>
+$ git log -p ORIG_HEAD.. arch/i386 include/asm-i386 <4>
+$ git pull git://git.kernel.org/pub/.../jgarzik/libata-dev.git ALL <5>
+$ git reset --hard ORIG_HEAD <6>
+$ git gc <7>
+$ git fetch --tags <8>
+------------
++
+<1> repeat as needed.
+<2> extract patches from your branch for e-mail submission.
+<3> `git pull` fetches from `origin` by default and merges into the
+current branch.
+<4> immediately after pulling, look at the changes done upstream
+since last time we checked, only in the
+area we are interested in.
+<5> fetch from a specific branch from a specific repository and merge.
+<6> revert the pull.
+<7> garbage collect leftover objects from reverted pull.
+<8> from time to time, obtain official tags from the `origin`
+and store them under `.git/refs/tags/`.
+
+
+Push into another repository.::
++
+------------
+satellite$ git clone mothership:frotz frotz <1>
+satellite$ cd frotz
+satellite$ git config --get-regexp '^(remote|branch)\.' <2>
+remote.origin.url mothership:frotz
+remote.origin.fetch refs/heads/*:refs/remotes/origin/*
+branch.master.remote origin
+branch.master.merge refs/heads/master
+satellite$ git config remote.origin.push \
+           master:refs/remotes/satellite/master <3>
+satellite$ edit/compile/test/commit
+satellite$ git push origin <4>
+
+mothership$ cd frotz
+mothership$ git checkout master
+mothership$ git merge satellite/master <5>
+------------
++
+<1> mothership machine has a frotz repository under your home
+directory; clone from it to start a repository on the satellite
+machine.
+<2> clone sets these configuration variables by default.
+It arranges `git pull` to fetch and store the branches of mothership
+machine to local `remotes/origin/*` remote-tracking branches.
+<3> arrange `git push` to push local `master` branch to
+`remotes/satellite/master` branch of the mothership machine.
+<4> push will stash our work away on `remotes/satellite/master`
+remote-tracking branch on the mothership machine.  You could use this
+as a back-up method.
+<5> on mothership machine, merge the work done on the satellite
+machine into the master branch.
+
+Branch off of a specific tag.::
++
+------------
+$ git checkout -b private2.6.14 v2.6.14 <1>
+$ edit/compile/test; git commit -a
+$ git checkout master
+$ git format-patch -k -m --stdout v2.6.14..private2.6.14 |
+  git am -3 -k <2>
+------------
++
+<1> create a private branch based on a well known (but somewhat behind)
+tag.
+<2> forward port all changes in `private2.6.14` branch to `master` branch
+without a formal "merging".
+
+
+Integrator[[Integrator]]
+------------------------
+
+A fairly central person acting as the integrator in a group
+project receives changes made by others, reviews and integrates
+them and publishes the result for others to use, using these
+commands in addition to the ones needed by participants.
+
+  * linkgit:git-am[1] to apply patches e-mailed in from your
+    contributors.
+
+  * linkgit:git-pull[1] to merge from your trusted lieutenants.
+
+  * linkgit:git-format-patch[1] to prepare and send suggested
+    alternative to contributors.
+
+  * linkgit:git-revert[1] to undo botched commits.
+
+  * linkgit:git-push[1] to publish the bleeding edge.
+
+
+Examples
+~~~~~~~~
+
+My typical Git day.::
++
+------------
+$ git status <1>
+$ git show-branch <2>
+$ mailx <3>
+& s 2 3 4 5 ./+to-apply
+& s 7 8 ./+hold-linus
+& q
+$ git checkout -b topic/one master
+$ git am -3 -i -s -u ./+to-apply <4>
+$ compile/test
+$ git checkout -b hold/linus && git am -3 -i -s -u ./+hold-linus <5>
+$ git checkout topic/one && git rebase master <6>
+$ git checkout pu && git reset --hard next <7>
+$ git merge topic/one topic/two && git merge hold/linus <8>
+$ git checkout maint
+$ git cherry-pick master~4 <9>
+$ compile/test
+$ git tag -s -m "GIT 0.99.9x" v0.99.9x <10>
+$ git fetch ko && git show-branch master maint 'tags/ko-*' <11>
+$ git push ko <12>
+$ git push ko v0.99.9x <13>
+------------
++
+<1> see what I was in the middle of doing, if any.
+<2> see what topic branches I have and think about how ready
+they are.
+<3> read mails, save ones that are applicable, and save others
+that are not quite ready.
+<4> apply them, interactively, with my sign-offs.
+<5> create topic branch as needed and apply, again with my
+sign-offs.
+<6> rebase internal topic branch that has not been merged to the
+master, nor exposed as a part of a stable branch.
+<7> restart `pu` every time from the next.
+<8> and bundle topic branches still cooking.
+<9> backport a critical fix.
+<10> create a signed tag.
+<11> make sure I did not accidentally rewind master beyond what I
+already pushed out.  `ko` shorthand points at the repository I have
+at kernel.org, and looks like this:
++
+------------
+$ cat .git/remotes/ko
+URL: kernel.org:/pub/scm/git/git.git
+Pull: master:refs/tags/ko-master
+Pull: next:refs/tags/ko-next
+Pull: maint:refs/tags/ko-maint
+Push: master
+Push: next
+Push: +pu
+Push: maint
+------------
++
+In the output from `git show-branch`, `master` should have
+everything `ko-master` has, and `next` should have
+everything `ko-next` has.
+
+<12> push out the bleeding edge.
+<13> push the tag out, too.
+
+
+Repository Administration[[Repository Administration]]
+------------------------------------------------------
+
+A repository administrator uses the following tools to set up
+and maintain access to the repository by developers.
+
+  * linkgit:git-daemon[1] to allow anonymous download from
+    repository.
+
+  * linkgit:git-shell[1] can be used as a 'restricted login shell'
+    for shared central repository users.
+
+link:howto/update-hook-example.html[update hook howto] has a good
+example of managing a shared central repository.
+
+
+Examples
+~~~~~~~~
+We assume the following in /etc/services::
++
+------------
+$ grep 9418 /etc/services
+git		9418/tcp		# Git Version Control System
+------------
+
+Run git-daemon to serve /pub/scm from inetd.::
++
+------------
+$ grep git /etc/inetd.conf
+git	stream	tcp	nowait	nobody \
+  /usr/bin/git-daemon git-daemon --inetd --export-all /pub/scm
+------------
++
+The actual configuration line should be on one line.
+
+Run git-daemon to serve /pub/scm from xinetd.::
++
+------------
+$ cat /etc/xinetd.d/git-daemon
+# default: off
+# description: The Git server offers access to Git repositories
+service git
+{
+        disable = no
+        type            = UNLISTED
+        port            = 9418
+        socket_type     = stream
+        wait            = no
+        user            = nobody
+        server          = /usr/bin/git-daemon
+        server_args     = --inetd --export-all --base-path=/pub/scm
+        log_on_failure  += USERID
+}
+------------
++
+Check your xinetd(8) documentation and setup, this is from a Fedora system.
+Others might be different.
+
+Give push/pull only access to developers.::
++
+------------
+$ grep git /etc/passwd <1>
+alice:x:1000:1000::/home/alice:/usr/bin/git-shell
+bob:x:1001:1001::/home/bob:/usr/bin/git-shell
+cindy:x:1002:1002::/home/cindy:/usr/bin/git-shell
+david:x:1003:1003::/home/david:/usr/bin/git-shell
+$ grep git /etc/shells <2>
+/usr/bin/git-shell
+------------
++
+<1> log-in shell is set to /usr/bin/git-shell, which does not
+allow anything but `git push` and `git pull`.  The users should
+get an ssh access to the machine.
+<2> in many distributions /etc/shells needs to list what is used
+as the login shell.
+
+CVS-style shared repository.::
++
+------------
+$ grep git /etc/group <1>
+git:x:9418:alice,bob,cindy,david
+$ cd /home/devo.git
+$ ls -l <2>
+  lrwxrwxrwx   1 david git    17 Dec  4 22:40 HEAD -> refs/heads/master
+  drwxrwsr-x   2 david git  4096 Dec  4 22:40 branches
+  -rw-rw-r--   1 david git    84 Dec  4 22:40 config
+  -rw-rw-r--   1 david git    58 Dec  4 22:40 description
+  drwxrwsr-x   2 david git  4096 Dec  4 22:40 hooks
+  -rw-rw-r--   1 david git 37504 Dec  4 22:40 index
+  drwxrwsr-x   2 david git  4096 Dec  4 22:40 info
+  drwxrwsr-x   4 david git  4096 Dec  4 22:40 objects
+  drwxrwsr-x   4 david git  4096 Nov  7 14:58 refs
+  drwxrwsr-x   2 david git  4096 Dec  4 22:40 remotes
+$ ls -l hooks/update <3>
+  -r-xr-xr-x   1 david git  3536 Dec  4 22:40 update
+$ cat info/allowed-users <4>
+refs/heads/master	alice\|cindy
+refs/heads/doc-update	bob
+refs/tags/v[0-9]*	david
+------------
++
+<1> place the developers into the same git group.
+<2> and make the shared repository writable by the group.
+<3> use update-hook example by Carl from Documentation/howto/
+for branch policy control.
+<4> alice and cindy can push into master, only bob can push into doc-update.
+david is the release manager and is the only person who can
+create and push version tags.
+
+HTTP server to support dumb protocol transfer.::
++
+------------
+dev$ git update-server-info <1>
+dev$ ftp user@isp.example.com <2>
+ftp> cp -r .git /home/user/myproject.git
+------------
++
+<1> make sure your info/refs and objects/info/packs are up-to-date
+<2> upload to public HTTP server hosted by your ISP.
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 2/6] Update giteveryday.txt to fit man page formatting

Add standard man page section titles. Also adjust anchor text markup for man page format.

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/giteveryday.txt | 39 +++++++++++++++++++++++++++------------
 1 file changed, 27 insertions(+), 12 deletions(-)
Show changes to Documentation/giteveryday.txt +27 −9
diff --git a/Documentation/giteveryday.txt b/Documentation/giteveryday.txt
index 2a18c1f..2939458 100644
--- a/Documentation/giteveryday.txt
+++ b/Documentation/giteveryday.txt
@@ -1,22 +1,33 @@
+giteveryday(7)
+===============
+
+NAME
+----
+giteveryday - A useful minimum set of commands for Everyday Git 
+
+SYNOPSIS
+--------
+
 Everyday Git With 20 Commands Or So
-===================================
 
-<<Individual Developer (Standalone)>> commands are essential for
+DESCRIPTION
+-----------
+<<STANDALONE,Individual Developer (Standalone)>> commands are essential for
 anybody who makes a commit, even for somebody who works alone.
 
 If you work with other people, you will need commands listed in
-the <<Individual Developer (Participant)>> section as well.
+the <<PARTICIPANT,Individual Developer (Participant)>> section as well.
 
-People who play the <<Integrator>> role need to learn some more
+People who play the <<INTEGRATOR,Integrator>> role need to learn some more
 commands in addition to the above.
 
-<<Repository Administration>> commands are for system
+<<ADMINISTRATION,Repository Administration>> commands are for system
 administrators who are responsible for the care and feeding
 of Git repositories.
 
 
-Individual Developer (Standalone)[[Individual Developer (Standalone)]]
-----------------------------------------------------------------------
+Individual Developer (Standalone)[[STANDALONE]]
+-----------------------------------------------
 
 A standalone individual developer does not exchange patches with
 other people, and works alone in a single repository, using the
@@ -104,8 +115,8 @@ combined and include `--max-count=10` (show 10 commits),
 directory, since `v2.43` tag.
 
 
-Individual Developer (Participant)[[Individual Developer (Participant)]]
-------------------------------------------------------------------------
+Individual Developer (Participant)[[PARTICIPANT]]
+-------------------------------------------------
 
 A developer working as a participant in a group project needs to
 learn how to communicate with others, and uses these commands in
@@ -205,7 +216,7 @@ tag.
 without a formal "merging".
 
 
-Integrator[[Integrator]]
+Integrator[[INTEGRATOR]]
 ------------------------
 
 A fairly central person acting as the integrator in a group
@@ -292,8 +303,8 @@ everything `ko-next` has.
 <13> push the tag out, too.
 
 
-Repository Administration[[Repository Administration]]
-------------------------------------------------------
+Repository Administration[[ADMINISTRATION]]
+-------------------------------------------
 
 A repository administrator uses the following tools to set up
 and maintain access to the repository by developers.
@@ -411,3 +422,7 @@ ftp> cp -r .git /home/user/myproject.git
 +
 <1> make sure your info/refs and objects/info/packs are up-to-date
 <2> upload to public HTTP server hosted by your ISP.
+
+GIT
+---
+Part of the linkgit:git[1] suite
\ No newline at end of file
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 3/6] add giteveryday to the manpages make list

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/Makefile | 1 +
 1 file changed, 1 insertion(+)
Show changes to Documentation/Makefile +1 −0
diff --git a/Documentation/Makefile b/Documentation/Makefile
index 91a12c7..7b745d0 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -23,6 +23,7 @@ MAN7_TXT += gitcore-tutorial.txt
 MAN7_TXT += gitcredentials.txt
 MAN7_TXT += gitcvs-migration.txt
 MAN7_TXT += gitdiffcore.txt
+MAN7_TXT += giteveryday.txt
 MAN7_TXT += gitglossary.txt
 MAN7_TXT += gitnamespaces.txt
 MAN7_TXT += gitrevisions.txt
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 4/6] Add deprecation note to old everyday.txt

Also include link to new man page.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/everyday.txt | 4 ++++
 1 file changed, 4 insertions(+)
Show changes to Documentation/everyday.txt +4 −0
diff --git a/Documentation/everyday.txt b/Documentation/everyday.txt
index 2a18c1f..9de6347 100644
--- a/Documentation/everyday.txt
+++ b/Documentation/everyday.txt
@@ -1,6 +1,10 @@
 Everyday Git With 20 Commands Or So
 ===================================
 
+Note, the Everyday Git guidance is now available via `git help everyday`
+linkgit:giteveryday[7].
+This version is deprecated and may be removed in later releases.
+
 <<Individual Developer (Standalone)>> commands are essential for
 anybody who makes a commit, even for somebody who works alone.
 
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 5/6] add 'everyday' to the help --guides list

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 builtin/help.c | 1 +
 1 file changed, 1 insertion(+)
Show changes to builtin/help.c +1 −0
diff --git a/builtin/help.c b/builtin/help.c
index cc17e67..45509ce 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -418,6 +418,7 @@ static struct {
 	const char *help;
 } common_guides[] = {
 	{ "attributes", N_("Defining attributes per path") },
+	{ "everyday", N_("Everyday Git With 20 Commands Or So") },
 	{ "glossary", N_("A Git glossary") },
 	{ "ignore", N_("Specifies intentionally untracked files to ignore") },
 	{ "modules", N_("Defining submodule properties") },
-- 
1.8.3.msysgit.0
Philip Oakley· Jan 9, 2014, 23:13 UTC · re: Philip Oakley · lore

[PATCH 6/6] Update git(1) link to giteveryday

Signed-off-by: Philip Oakley <philipoakley@iee.org>
---
 Documentation/git.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Show changes to Documentation/git.txt +1 −1
diff --git a/Documentation/git.txt b/Documentation/git.txt
index aec3726..0e4875d 100644
--- a/Documentation/git.txt
+++ b/Documentation/git.txt
@@ -22,7 +22,7 @@ unusually rich command set that provides both high-level operations
 and full access to internals.
 
 See linkgit:gittutorial[7] to get started, then see
-link:everyday.html[Everyday Git] for a useful minimum set of
+linkgit:giteveryday[7] for a useful minimum set of
 commands.  The link:user-manual.html[Git User's Manual] has a more
 in-depth introduction.
 
-- 
1.8.3.msysgit.0
Junio C Hamano· Jan 9, 2014, 23:49 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work

I think we already use a nicer way to set up a page alias to keep old links working than making a copy in Documentation/; please mimic that if possible.

It may be overdue to refresh the suggested set of "top 20" commands, as things have vastly changed over the past 8 years. Perhaps we should do that after reorganizing with something like this series.

Philip Oakley· Jan 10, 2014, 03:03 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work

From: "Junio C Hamano" <gitster@pobox.com>
>I think we already use a nicer way to set up a page alias to keep
> old links working than making a copy in Documentation/; please mimic
> that if possible.

This was mainly about ensuring that the 'git help' command could access these extra extra guides that it currently misses. (Tt also misses the 'user-manual', which isn't a man page, but could have a link page to guide the seeker of truth between 'git help' and the actual user-manual)

The only method I can see for that (via help.c) is to get the filename format correct. Where you thinking of something else?

>
> It may be overdue to refresh the suggested set of "top 20" commands,
> as things have vastly changed over the past 8 years.  Perhaps we
> should do that after reorganizing with something like this series.
Agreed.
> --
Junio C Hamano· Jan 10, 2014, 18:09 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work

"Philip Oakley" <philipoakley@iee.org> writes:
Show 13 quoted lines
> From: "Junio C Hamano" <gitster@pobox.com>
>>I think we already use a nicer way to set up a page alias to keep
>> old links working than making a copy in Documentation/; please mimic
>> that if possible.
>
> This was mainly about ensuring that the 'git help' command could
> access these extra extra guides that it currently misses. (Tt also
> misses the 'user-manual', which isn't a man page, but could have a
> link page to guide the seeker of truth between 'git help' and the
> actual user-manual)
>
> The only method I can see for that (via help.c) is to get the filename
> format correct.  Where you thinking of something else?

I do not have an objection against the creation of giteveryday.txt; I was questioning the way the original everyday.txt was left behind to bit-rot. It is good to keep _something_ there, because there may be old URLs floating around that point at Documentation/everyday.txt, but the contents of that file does not have to be a stale copy.

Cf. bd4a3d61 (Rename {git- => git}remote-helpers.txt, 2013-01-31) for how we renamed git-remote-helpers.txt to gitremote-helpers.txt

Philip Oakley· Jan 10, 2014, 20:36 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work

From: "Junio C Hamano" <gitster@pobox.com>
Show 22 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> From: "Junio C Hamano" <gitster@pobox.com>
>>>I think we already use a nicer way to set up a page alias to keep
>>> old links working than making a copy in Documentation/; please mimic
>>> that if possible.
>>
>> This was mainly about ensuring that the 'git help' command could
>> access these extra extra guides that it currently misses. (Tt also
>> misses the 'user-manual', which isn't a man page, but could have a
>> link page to guide the seeker of truth between 'git help' and the
>> actual user-manual)
>>
>> The only method I can see for that (via help.c) is to get the 
>> filename
>> format correct.  Where you thinking of something else?
>
> I do not have an objection against the creation of giteveryday.txt;
> I was questioning the way the original everyday.txt was left behind
> to bit-rot.  It is good to keep _something_ there, because there may
> be old URLs floating around that point at Documentation/everyday.txt,
> but the contents of that file does not have to be a stale copy.

Ah, OK. I had indicated it would be deprecated, but had resisted stating a date for deletion (e.g. git 2.0).

I was thinking of a moderate two step deprecation period with the next step being a severely cut down residual stub, before it's removal.

>
> Cf. bd4a3d61 (Rename {git- => git}remote-helpers.txt, 2013-01-31)
> for how we renamed git-remote-helpers.txt to gitremote-helpers.txt
I'll have a look at re-using that approach.
Anything else needed before a re-roll?
Philip
Philip Oakley· Jan 11, 2014, 17:34 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work

From: "Junio C Hamano" <gitster@pobox.com>
Show 26 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> From: "Junio C Hamano" <gitster@pobox.com>
>>>I think we already use a nicer way to set up a page alias to keep
>>> old links working than making a copy in Documentation/; please mimic
>>> that if possible.
>>
>> This was mainly about ensuring that the 'git help' command could
>> access these extra extra guides that it currently misses. (Tt also
>> misses the 'user-manual', which isn't a man page, but could have a
>> link page to guide the seeker of truth between 'git help' and the
>> actual user-manual)
>>
>> The only method I can see for that (via help.c) is to get the 
>> filename
>> format correct.  Where you thinking of something else?
>
> I do not have an objection against the creation of giteveryday.txt;
> I was questioning the way the original everyday.txt was left behind
> to bit-rot.  It is good to keep _something_ there, because there may
> be old URLs floating around that point at Documentation/everyday.txt,
> but the contents of that file does not have to be a stale copy.
>
> Cf. bd4a3d61 (Rename {git- => git}remote-helpers.txt, 2013-01-31)
> for how we renamed git-remote-helpers.txt to gitremote-helpers.txt
>
The commit also highlighted a couple of other places I needed to update

What's the right set of options for format-patch to avoid the bulk deletions and bulk insertions between the old an new versions? That commit was amended in situ, so never had the three way delete/move/create problem.

We have: everyday.txt (old) -> delete everyday.txt (new) ->create (<5% similarity) everyday.txt (old) -> giteveryday.txt (>95% similarity)

It just feels that 400+ lines of complete deletion doesn't need to be in the summary patch. I have it in my mind that we always end up with the deletions being listed.

Philip 
Stefan Näwe· Jan 10, 2014, 08:18 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work

Am 10.01.2014 00:49, schrieb Junio C Hamano:
Show 7 quoted lines
> I think we already use a nicer way to set up a page alias to keep
> old links working than making a copy in Documentation/; please mimic
> that if possible.
> 
> It may be overdue to refresh the suggested set of "top 20" commands,
> as things have vastly changed over the past 8 years.  Perhaps we
> should do that after reorganizing with something like this series.
I'd really like to see 'git help relnotes' working as well...
Stefan
-- 
----------------------------------------------------------------
/dev/random says: Despite the high cost of living, it remains popular.
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
Philip Oakley· Jan 16, 2014, 21:12 UTC · re: Stefan Näwe · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

From: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>
[...]
>
> I'd really like to see 'git help relnotes' working as well...
>
> Stefan
Stefan,

Were you thinking that all the release notes would be quoted verbatim in the one long man page?

Or that it would be a set of links to each of the individual text files (see the ifdef::stalenotes[] in git/Documentation/git.txt)?

The latter allows individual release notes to be checked, but still leaves folks with a difficult search problem if they want to find when some command was 'tweaked'.

Obviously, any method would need to be easy to maintain. And the RelNotes symlink would need handling.

Philip
--
Stefan Näwe· Jan 17, 2014, 11:59 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

Am 16.01.2014 22:14, schrieb Philip Oakley:
Show 21 quoted lines
> From: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>
> [...]
>>
>> I'd really like to see 'git help relnotes' working as well...
>>
>> Stefan
> 
> Stefan,
> 
> Were you thinking that all the release notes would be quoted verbatim in 
> the one long man page?
> 
> Or that it would be a set of links to each of the individual text files 
> (see the ifdef::stalenotes[] in git/Documentation/git.txt)?
> 
> The latter allows individual release notes to be checked, but still 
> leaves folks with a difficult search problem if they want to find when 
> some command was 'tweaked'.
> 
> Obviously, any method would need to be easy to maintain. And the 
> RelNotes symlink would need handling.

'git help relnotes' should show the current release note with a link to the previous.

And 'git help git' should link to the current release note.
Stefan
-- 
----------------------------------------------------------------
/dev/random says: We now return you to your regularly scheduled flame-throwing
python -c "print '73746566616e2e6e616577654061746c61732d656c656b74726f6e696b2e636f6d'.decode('hex')"
Philip Oakley· Jan 21, 2014, 22:14 UTC · re: Stefan Näwe · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

From: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>
Show 28 quoted lines
> Am 16.01.2014 22:14, schrieb Philip Oakley:
>> From: "Stefan Näwe" <stefan.naewe@atlas-elektronik.com>
>> [...]
>>>
>>> I'd really like to see 'git help relnotes' working as well...
>>>
>>> Stefan
>>
>> Stefan,
>>
>> Were you thinking that all the release notes would be quoted verbatim 
>> in
>> the one long man page?
>>
>> Or that it would be a set of links to each of the individual text 
>> files
>> (see the ifdef::stalenotes[] in git/Documentation/git.txt)?
>>
>> The latter allows individual release notes to be checked, but still
>> leaves folks with a difficult search problem if they want to find 
>> when
>> some command was 'tweaked'.
>>
>> Obviously, any method would need to be easy to maintain. And the
>> RelNotes symlink would need handling.
>
> 'git help relnotes' should show the current release note with
> a link to the previous.

OK, that seems very sensible, as the concatenated release notes run to 15k lines!

Determining which is the current release note is possibly more problematic, which should be when making the documentation.

>
> And 'git help git' should link to the current release note.
>

In some sense that 'current' should be the same as the 'git --version', but through an assumption of a common distribution of git and the documentation, rather than any run time determination.

At the moment the Documenation/git.txt 'stalenotes' section could be separated into its own file to act as the basis for the links, but as yet I don't have a good view as to how the current release notes (with / without maint notes?) would be embedded without a maintenance burden for Junio.

Philip 
Junio C Hamano· Jan 21, 2014, 23:28 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

"Philip Oakley" <philipoakley@iee.org> writes:
> Determining which is the current release note is possibly more 
> problematic, which should be when making the documentation.
Hmmm.... Why?

You are already aware of the stale-notes section, no? Isn't the top one the latest?

Philip Oakley· Jan 22, 2014, 00:20 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

From: "Junio C Hamano" <gitster@pobox.com>
Show 9 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> Determining which is the current release note is possibly more
>> problematic, which should be when making the documentation.
>
> Hmmm.... Why?
>
> You are already aware of the stale-notes section, no?  Isn't the top
> one the latest?

It's that the 'git help release-notes' would _include_ the latest release notes, not just link to them (which is what the stalenotes currently does). Or at least that was the idea.

Trying to determine the latest version, and then include those release notes, and the subsequent maint notes, into the putative "release-notes(7)" man page, without causing you any maintenance hassle, was the conceptual problem.

I already have a local patch that creates a stalenote.txt file, and includes that in a "release-notes(7)" man page, but it still leaves the actual release notes in a separate plain text file, linked from the man page, rather than being right at hand, which is what I think readers would expect.

My other question would be to ask how you normally manage the up-issue of the stalenotes, and when you would normally create that section in git(1) as I didn't see any ifdef::stalenotes[] being defined anywhere else.

Philip
Junio C Hamano· Jan 22, 2014, 00:40 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

"Philip Oakley" <philipoakley@iee.org> writes:
Show 5 quoted lines
> I already have a local patch that creates a stalenote.txt file, and
> includes that in a "release-notes(7)" man page, but it still leaves
> the actual release notes in a separate plain text file, linked from
> the man page, rather than being right at hand, which is what I think
> readers would expect.

Sorry, but I still do not get it. If you have a script that reads git.txt and extracts its stale-notes section to generate the source to be processed into release-notes(7), why can't that script also include the contents of the latest release notes inline into its output?

My release notes are _not_ written to be compatible with/processable by AsciiDoc (they are meant to be mere plain text)---perhaps you are wondering if that would make it harder to maintain your script that produces release-notes.txt?

Confused...
Show 5 quoted lines
>
> My other question would be to ask how you normally manage the up-issue
> of the stalenotes, and when you would normally create that section in
> git(1) as I didn't see any ifdef::stalenotes[] being defined anywhere
> else.

I'm not sure if I am understanding the question right (up-issue?), but it used to be that the preformatted and web-reachable manual pages at k.org were processed with stalenotes defined (which by the way was disabled with adaa3caf "Meta/dodoc.sh: adjust to the new layout, 2011-11-15" on the todo branch), and 26cfcfbf "Add release notes to the distribution., 2007-02-13" used that facility to prepare something like this:

    docs/git.html
        /git-cat-file.html
        ...
    docs/vX.Y.Z/git.html
    docs/vX.Y.Z/git-cat-file.html
                ...

where the "latest" one lived immediately underneath docs/*, while older ones were in versioned subdirectories.

Philip Oakley· Jan 22, 2014, 08:08 UTC · re: Junio C Hamano · lore

Re: [PATCH 0/6] Make 'git help everyday' work -> relnotes

From: "Junio C Hamano" <gitster@pobox.com>
Show 9 quoted lines
> "Philip Oakley" <philipoakley@iee.org> writes:
>
>> I already have a local patch that creates a stalenote.txt file, and
>> includes that in a "release-notes(7)" man page, but it still leaves
>> the actual release notes in a separate plain text file, linked from
>> the man page, rather than being right at hand, which is what I think
>> readers would expect.
>
> Sorry, but I still do not get it.  If you have a script
Ah, no, it's not a script.

I had simply moved the content of the stalenotes section into its own file 'stalenotes.txt' which could then be included both within the git(1) section it came from, and a new release-notes(7) man page.

With that set up the Documentation/Makefile would generate the man pages, with their appropriate links, which can be accessed via the 'git help' command.

The big 'however' was that this would not actually include the latest release notes as literal text for immediate reading into the release-notes(7) man page, which would be my aim, and I think what Stefan had suggested as a preferred style.

Show 12 quoted lines
>                      that reads
> git.txt and extracts its stale-notes section to generate the source
> to be processed into release-notes(7), why can't that script also
> include the contents of the latest release notes inline into its
> output?
>
> My release notes are _not_ written to be compatible with/processable
> by AsciiDoc (they are meant to be mere plain text)---perhaps you are
> wondering if that would make it harder to maintain your script that
> produces release-notes.txt?
>
> Confused...

My thought was that the latest release note would be included as literal text, as noted above. Like you say, it may need to be a script, but I was being cautious about what extra work that would entail for each release.

Show 16 quoted lines
>
>>
>> My other question would be to ask how you normally manage the 
>> up-issue
>> of the stalenotes, and when you would normally create that section in
>> git(1) as I didn't see any ifdef::stalenotes[] being defined anywhere
>> else.
>
> I'm not sure if I am understanding the question right (up-issue?),
> but it used to be that the preformatted and web-reachable manual
> pages at k.org were processed with stalenotes defined (which by the
> way was disabled with adaa3caf "Meta/dodoc.sh: adjust to the new
> layout, 2011-11-15" on the todo branch), and 26cfcfbf "Add release
> notes to the distribution., 2007-02-13" used that facility to
> prepare something like this:
>

I hadn't looked back into that part of history. I was somehow expecting to see 'stalenotes' being defined somewhere in the current documenation preparation options, hence my question about when you would set 'stalenotes'.

I'll have a look back at that to see how it was used back then.
Show 10 quoted lines
>    docs/git.html
>        /git-cat-file.html
>        ...
>    docs/vX.Y.Z/git.html
>    docs/vX.Y.Z/git-cat-file.html
>                ...
>
> where the "latest" one lived immediately underneath docs/*, while
> older ones were in versioned subdirectories.
> 
Jonathan Nieder· Jan 10, 2014, 20:19 UTC · re: Philip Oakley · lore

Re: [PATCH 0/6] Make 'git help everyday' work

Hi,
Philip Oakley wrote:
> The "Everyday GIT With 20 Commands Or So" guide is not accessible
> via the git help system. Fix that.
Neat. :)
Junio covered everything I'd want to say about patch 1/6.

After fixing that, I'd suggest squashing all 6 patches into a single patch. They all are part of accomplishing the same task, they are not too hard to read together, and the intermediate state after applying a few but not the rest doesn't make much sense. The details of patches 2-6/6 look good to me.

Alternatively, this could be two patches:
 1 - modify everyday.txt in place to be a suitable manpage
 2 - rename it, add a placeholder for the old name, and modify the
     build rules to treat it as an actual manpage

Hope that helps, Jonathan

← back to recent threads