git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 3/4] Documentation: format full commands in typewriter font

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Jan 10, 2010, 03:31 UTC
Message-ID
<20100110033133.GE1083@progeny.tock>
In-Reply-To
<9d10ee6a8526dc9f9c220cc6bb4b509c8cc73b0a.1263081032.git.trast@student.ethz.ch>
Thomas Rast wrote:
> * If the intent is that the user type the command exactly as given, it
>   is `code`.
>   If the user is only loosely referred to a command and/or option, it
>   remains 'emphasised'.

Okay. I think I was guilty of pushing this convention (in commits like 2fd02c92). If the distinction is too hazy to be useful, I think it would be fine to always use `code`, though that would be a bigger patch.

Show 19 quoted lines
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 23a965e..6bfd9e1 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -741,15 +741,15 @@ diff.mnemonicprefix::
>  	standard "a/" and "b/" depending on what is being compared.  When
>  	this configuration is in effect, reverse diff output also swaps
>  	the order of the prefixes:
> -'git-diff';;
> +`git diff`;;
>  	compares the (i)ndex and the (w)ork tree;
> -'git-diff HEAD';;
> +`git diff HEAD`;;
>  	 compares a (c)ommit and the (w)ork tree;
> -'git diff --cached';;
> +`git diff --cached`;;
>  	compares a (c)ommit and the (i)ndex;
> -'git-diff HEAD:file1 file2';;
> +`git-diff HEAD:file1 file2`;;

Shouldn't this use ‘git diff’ (no hyphen)? Alternatively, if you are leaving this for the next commit, should the other 'git-diff' lines keep their dash until then, too?

Show 10 quoted lines
> diff --git a/Documentation/git-bisect.txt b/Documentation/git-bisect.txt
> index c39d957..f91c7ac 100644
> --- a/Documentation/git-bisect.txt
> +++ b/Documentation/git-bisect.txt
> @@ -26,7 +26,7 @@ on the subcommand:
>   git bisect log
>   git bisect run <cmd>...
>  
> -This command uses 'git rev-list --bisect' to help drive the
> +This command uses `git rev-list --bisect` to help drive the

Does rev-list --bisect take more arguments (i.e., isn’t the command being only loosely referred to here)?

Show 13 quoted lines
> diff --git a/Documentation/git-filter-branch.txt b/Documentation/git-filter-branch.txt
> index 394a77a..544836a 100644
> --- a/Documentation/git-filter-branch.txt
> +++ b/Documentation/git-filter-branch.txt
> @@ -129,8 +129,8 @@ convenience functions, too.  For example, calling 'skip_commit "$@"'
>  will leave out the current commit (but not its changes! If you want
>  that, use 'git-rebase' instead).
>  +
> -You can also use the 'git_commit_non_empty_tree "$@"' instead of
> -'git commit-tree "$@"' if you don't wish to keep commits with a single parent
> +You can also use the `git_commit_non_empty_tree "$@"` instead of
> +`git commit-tree "$@"` if you don't wish to keep commits with a single parent
>  and that makes no change to the tree.

Not this commit’s topic, but perhaps ‘use the ...’ should be ‘use ...’ or ‘use the ... idiom’...

Show 8 quoted lines
>  --tag-name-filter <command>::
> @@ -179,7 +179,7 @@ the nearest ancestor that was not excluded.
>  	and only one parent, it will hence keep merges points. Also, this
>  	option is not compatible with the use of '--commit-filter'. Though you
>  	just need to use the function 'git_commit_non_empty_tree "$@"' instead
> -	of the 'git commit-tree "$@"' idiom in your commit filter to make that
> +	of the `git commit-tree "$@"` idiom in your commit filter to make that
>  	happen.
... to match this.
Show 10 quoted lines
> diff --git a/Documentation/git-merge.txt b/Documentation/git-merge.txt
> index 3277f4e..04c21d3 100644
> --- a/Documentation/git-merge.txt
> +++ b/Documentation/git-merge.txt
> @@ -193,7 +193,7 @@ After seeing a conflict, you can do two things:
>  
>   * Decide not to merge.  The only clean-ups you need are to reset
>     the index file to the `HEAD` commit to reverse 2. and to clean
> -   up working tree changes made by 2. and 3.; 'git-reset --hard' can
> +   up working tree changes made by 2. and 3.; `git-reset --hard` can
Probably `git reset --hard` (I won’t mention any more of these).
Except for the bisect-change above,
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
The rest looks good, and really does seem clearer in some places.

Thanks, Jonathan

Previous: Thomas RastNext: Thomas Rast
Message 31 of 46 in “Documentation/git-merge: reword references to "remote" and "pull"”
  1. 1/2 Documentation/git-merge: reword references to "remote" and "pull"Thomas Rast, Jan 7, 2010
  2. 2/2 Documentation: warn prominently against merging with dirty treesThomas Rast, Jan 7, 2010
  3. 3/2 Documentation/git-merge: format full commands in typewriter fontThomas Rast, Jan 7, 2010
  4. Jonathan NiederJan 7, 2010
  5. Junio C HamanoJan 7, 2010
  6. Junio C HamanoJan 7, 2010
  7. 0/4 Documentation style fixesThomas Rast, Jan 10, 2010
  8. 1/4 Documentation/git-merge: reword references to "remote" and "pull"Thomas Rast, Jan 10, 2010
  9. Jonathan NiederJan 10, 2010
  10. Thomas RastJan 10, 2010
  11. Documentation: merge: use MERGE_HEAD to refer to the remote branchJonathan Nieder, Jan 23, 2010
  12. 2/4 Documentation: warn prominently against merging with dirty treesThomas Rast, Jan 10, 2010
  13. Jonathan NiederJan 10, 2010
  14. Junio C HamanoJan 10, 2010
  15. Thomas RastJan 10, 2010
  16. Jonathan NiederJan 11, 2010
  17. Junio C HamanoJan 11, 2010
  18. Jonathan NiederJan 11, 2010
  19. 0/6 Re: Documentation: warn prominently against merging with dirty treesJonathan Nieder, Jan 11, 2010
  20. 1/6 Documentation: clarify one-line description for mergeJonathan Nieder, Jan 11, 2010
  21. 2/6 Documentation: merge: add an overviewJonathan Nieder, Jan 11, 2010
  22. Junio C HamanoJan 11, 2010
  23. 4/6 Documentation: emphasize when git merge terminates earlyJonathan Nieder, Jan 11, 2010
  24. Thomas RastJan 11, 2010
  25. 5/6 Documentation: merge: add a section about fast-forwardJonathan Nieder, Jan 11, 2010
  26. 6/6 Documentation: tweak How Merge WorksJonathan Nieder, Jan 11, 2010
  27. Thomas RastJan 11, 2010
  28. Petr BaudisJan 13, 2010
  29. Junio C HamanoJan 13, 2010
  30. 3/4 Documentation: format full commands in typewriter fontThomas Rast, Jan 10, 2010
  31. Jonathan NiederJan 10, 2010
  32. Thomas RastJan 10, 2010
  33. Thomas RastJan 10, 2010
  34. Junio C HamanoJan 10, 2010
  35. Thomas RastJan 10, 2010
  36. 1/2 More missed dashed 'git-cmd' formsThomas Rast, Jan 10, 2010
  37. 2/2 More missed `code snippets`Thomas Rast, Jan 10, 2010
  38. Documentation: show-files is now called git-ls-filesThomas Rast, Jan 10, 2010
  39. Junio C HamanoJan 18, 2010
  40. Thomas RastJan 19, 2010
  41. Jonathan NiederJan 19, 2010
  42. Junio C HamanoJan 10, 2010
  43. Jonathan NiederJan 10, 2010
  44. 1/2 Documentation: git gc packs refs by default nowJonathan Nieder, Jan 10, 2010
  45. 2/2 Documentation: tiny git config manual tweaksJonathan Nieder, Jan 10, 2010
  46. Thomas RastJan 10, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.