git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] log: document the --decorate=auto option
@ 2016-05-27 15:56 Ramsay Jones
  2016-05-27 18:35 ` Marc Branchaud
  0 siblings, 1 reply; 3+ messages in thread
From: Ramsay Jones @ 2016-05-27 15:56 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: GIT Mailing-list


Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---

Hi Junio,

While reading an email from Linus earlier (RFC: dynamic "auto" date formats),
I noticed that log.decorate was being set to 'auto'. Since I didn't recall
that setting (even if it's easy to guess), I went looking for the documentation ...

This should probably be marked RFC, since I haven't checked that the formatting
is OK (I don't have the documentation toolchain installed these days).

ATB,
Ramsay Jones

 Documentation/config.txt  | 5 ++++-
 Documentation/git-log.txt | 8 +++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 53f00db..0707b3b 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1956,7 +1956,10 @@ log.decorate::
 	command. If 'short' is specified, the ref name prefixes 'refs/heads/',
 	'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
 	specified, the full ref name (including prefix) will be printed.
-	This is the same as the log commands '--decorate' option.
+	If 'auto' is specified, then if the output is going to a terminal,
+	the ref names are shown as if 'short' were given, otherwise no ref
+	names are shown. This is the same as the log commands '--decorate'
+	option.
 
 log.follow::
 	If `true`, `git log` will act as if the `--follow` option was used when
diff --git a/Documentation/git-log.txt b/Documentation/git-log.txt
index 03f9580..dec379b 100644
--- a/Documentation/git-log.txt
+++ b/Documentation/git-log.txt
@@ -29,12 +29,14 @@ OPTIONS
 	(works only for a single file).
 
 --no-decorate::
---decorate[=short|full|no]::
+--decorate[=short|full|auto|no]::
 	Print out the ref names of any commits that are shown. If 'short' is
 	specified, the ref name prefixes 'refs/heads/', 'refs/tags/' and
 	'refs/remotes/' will not be printed. If 'full' is specified, the
-	full ref name (including prefix) will be printed. The default option
-	is 'short'.
+	full ref name (including prefix) will be printed. If 'auto' is
+	specified, then if the output is going to a terminal, the ref names
+	are shown as if 'short' were given, otherwise no ref names are
+	shown. The default option is 'short'.
 
 --source::
 	Print out the ref name given on the command line by which each
-- 
2.8.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] log: document the --decorate=auto option
  2016-05-27 15:56 [PATCH] log: document the --decorate=auto option Ramsay Jones
@ 2016-05-27 18:35 ` Marc Branchaud
  2016-05-27 20:17   ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Branchaud @ 2016-05-27 18:35 UTC (permalink / raw)
  To: Ramsay Jones, Junio C Hamano; +Cc: GIT Mailing-list

On 2016-05-27 11:56 AM, Ramsay Jones wrote:
>
> Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
> ---
>
> Hi Junio,
>
> While reading an email from Linus earlier (RFC: dynamic "auto" date formats),
> I noticed that log.decorate was being set to 'auto'. Since I didn't recall
> that setting (even if it's easy to guess), I went looking for the documentation ...
>
> This should probably be marked RFC, since I haven't checked that the formatting
> is OK (I don't have the documentation toolchain installed these days).
>
> ATB,
> Ramsay Jones
>
>   Documentation/config.txt  | 5 ++++-
>   Documentation/git-log.txt | 8 +++++---
>   2 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/config.txt b/Documentation/config.txt
> index 53f00db..0707b3b 100644
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -1956,7 +1956,10 @@ log.decorate::
>   	command. If 'short' is specified, the ref name prefixes 'refs/heads/',
>   	'refs/tags/' and 'refs/remotes/' will not be printed. If 'full' is
>   	specified, the full ref name (including prefix) will be printed.
> -	This is the same as the log commands '--decorate' option.
> +	If 'auto' is specified, then if the output is going to a terminal,
> +	the ref names are shown as if 'short' were given, otherwise no ref
> +	names are shown. This is the same as the log commands '--decorate'

s/commands/command's/

		M.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] log: document the --decorate=auto option
  2016-05-27 18:35 ` Marc Branchaud
@ 2016-05-27 20:17   ` Junio C Hamano
  0 siblings, 0 replies; 3+ messages in thread
From: Junio C Hamano @ 2016-05-27 20:17 UTC (permalink / raw)
  To: Marc Branchaud; +Cc: Ramsay Jones, GIT Mailing-list

Thanks, both.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-05-27 20:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-27 15:56 [PATCH] log: document the --decorate=auto option Ramsay Jones
2016-05-27 18:35 ` Marc Branchaud
2016-05-27 20:17   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).