git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@student.ethz.ch>
Cc: git@vger.kernel.org, "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Subject: Re: [PATCH v2] Let --decorate show HEAD position
Date: Mon, 12 Oct 2009 14:05:33 -0700	[thread overview]
Message-ID: <7vk4z0e31e.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <36861d16d0e21c662430882140893ad9a0b2fb25.1255379242.git.trast@student.ethz.ch> (Thomas Rast's message of "Mon\, 12 Oct 2009 22\:34\:12 +0200")

Thomas Rast <trast@student.ethz.ch> writes:

> 'git log --graph --oneline --decorate --all' is a useful way to get a
> general overview of the repository state, similar to 'gitk --all'.
> Let it indicate the position of HEAD by loading that ref too, so that
> the --decorate code can see it.
>
> Signed-off-by: Thomas Rast <trast@student.ethz.ch>
> ---

I think this makes sense.

I see HEAD is given at the front in the sample output, which I think also
makes sense.  Is it because it is pushed the last?  If so, the same commit
at the tip of branch alpha and beta are decorated with beta and then
alpha, I have to wonder...?

>
> I wrote:
>> Damn, this fails tests and I only just noticed while testing another
>> series.  Sorry for the noise, reroll upcoming...
>
>
>  log-tree.c                             |    1 +
>  t/t4013/diff.log_--decorate=full_--all |    2 +-
>  t/t4013/diff.log_--decorate_--all      |    2 +-
>  3 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/log-tree.c b/log-tree.c
> index 1618f3c..f7d54f2 100644
> --- a/log-tree.c
> +++ b/log-tree.c
> @@ -43,6 +43,7 @@ void load_ref_decorations(int flags)
>  	if (!loaded) {
>  		loaded = 1;
>  		for_each_ref(add_ref_decoration, &flags);
> +		head_ref(add_ref_decoration, &flags);
>  	}
>  }
>  
> diff --git a/t/t4013/diff.log_--decorate=full_--all b/t/t4013/diff.log_--decorate=full_--all
> index 903d9d9..d155e0b 100644
> --- a/t/t4013/diff.log_--decorate=full_--all
> +++ b/t/t4013/diff.log_--decorate=full_--all
> @@ -1,5 +1,5 @@
>  $ git log --decorate=full --all
> -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (refs/heads/master)
> +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, refs/heads/master)
>  Merge: 9a6d494 c7a2ab9
>  Author: A U Thor <author@example.com>
>  Date:   Mon Jun 26 00:04:00 2006 +0000
> diff --git a/t/t4013/diff.log_--decorate_--all b/t/t4013/diff.log_--decorate_--all
> index 954210e..fd7c3e6 100644
> --- a/t/t4013/diff.log_--decorate_--all
> +++ b/t/t4013/diff.log_--decorate_--all
> @@ -1,5 +1,5 @@
>  $ git log --decorate --all
> -commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (master)
> +commit 59d314ad6f356dd08601a4cd5e530381da3e3c64 (HEAD, master)
>  Merge: 9a6d494 c7a2ab9
>  Author: A U Thor <author@example.com>
>  Date:   Mon Jun 26 00:04:00 2006 +0000
> -- 
> 1.6.5.62.g4370d.dirty

  reply	other threads:[~2009-10-12 21:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-12  9:01 [PATCH] Let --decorate show HEAD position Thomas Rast
2009-10-12 20:06 ` Thomas Rast
2009-10-12 20:34   ` [PATCH v2] " Thomas Rast
2009-10-12 21:05     ` Junio C Hamano [this message]
2009-10-12 21:11       ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vk4z0e31e.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=trast@student.ethz.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).