From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [maintainer-tools PATCH] dim: print branches containing commit-ish if no tag contains it
Date: Thu, 22 Oct 2015 11:44:09 +0200 [thread overview]
Message-ID: <20151022094409.GQ16848@phenom.ffwll.local> (raw)
In-Reply-To: <1445506617-12111-1-git-send-email-jani.nikula@intel.com>
On Thu, Oct 22, 2015 at 12:36:57PM +0300, Jani Nikula wrote:
> dim tc is useful for checking when and where a commit has landed, so one
> can decide where, for example, a fix to that commit should be queued.
>
> If the commit is not in a tagged upstream Linux release, fall back to
> printing the i915 upstream development branches that contain it.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> dim | 8 +++++++-
> dim.rst | 3 ++-
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/dim b/dim
> index bd7cae828ee7..3bd5b759f8a7 100755
> --- a/dim
> +++ b/dim
> @@ -808,7 +808,13 @@ case "$subcommand" in
> ;;
> tc)
> cd $DIM_PREFIX/$DIM_DRM_INTEL
> - git tag --contains $1 | grep ^v | sort -V | head -n 1
> + tag=$(git tag --contains $1 | grep ^v | sort -V | head -n 1)
> + if [[ -n "$tag" ]]; then
> + echo "$tag"
> + else
> + # not in a tagged release, show branches
> + git branch --contains $1 drm-intel-* master topic/* | sed 's/^[ \*]*//'
Shouldn't we check the remote branches instead? Since at least for me the
local -fixes branches are usually rather old ... We could sed the remote
prefix away again I guess. lgtm otherwise.
-Daniel
> + fi
> ;;
> check-patch|cp)
> dim_checkrange $@
> diff --git a/dim.rst b/dim.rst
> index ebbc04bc3604..a1da6e0b4621 100644
> --- a/dim.rst
> +++ b/dim.rst
> @@ -174,7 +174,8 @@ Apply a patch to the i-g-t repository.
>
> tc *commit-ish*
> ---------------
> -Prints the linux kernel tag which contains the supplied commit-ish
> +Print the oldest Linux kernel release or -rc tag that contains the supplied
> +*commit-ish*, or, if none do, print the branches that contain it.
>
> check-patch|cp [*commit-ish* [.. *commit-ish*]]
> -----------------------------------------------
> --
> 2.1.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-22 9:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-22 9:36 [maintainer-tools PATCH] dim: print branches containing commit-ish if no tag contains it Jani Nikula
2015-10-22 9:44 ` Daniel Vetter [this message]
2015-10-22 10:14 ` Jani Nikula
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=20151022094409.GQ16848@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/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