From patchwork Mon Jul 31 17:15:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 9872589 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 255C960365 for ; Mon, 31 Jul 2017 17:16:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F7E7285CC for ; Mon, 31 Jul 2017 17:16:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 247FB285D1; Mon, 31 Jul 2017 17:16:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E2BF4285CC for ; Mon, 31 Jul 2017 17:16:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B264A6E813; Mon, 31 Jul 2017 17:15:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D9556E812; Mon, 31 Jul 2017 17:15:58 +0000 (UTC) Received: by mail-wr0-x243.google.com with SMTP id g32so14844100wrd.5; Mon, 31 Jul 2017 10:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SrkK/uOu8jEe6RUvIEuhR3WS5b7iryb+SpmXVKo1frs=; b=ExJELGVRb+haWp9Azt+H0pMpME8LhWNiboE0kDwzWrTvQpuVCE6ZPNDnB6IPUb/7wm N2vKjDHHKinHRptQJMlQa2A6JA4u+GeuzZfWGlqWmXU5/WnKVM6b4GP87an/MeIcDuSp j/mqR47rO+LLqzpQ+4bHcVAKbwX+u2REKra3BqTUMEYtzwfsoKAlmg71eEUCjT3TCHNG +bB8MWy3eTYva81QZjPWe8k/0iVS99Eb1wrzI7biXIJbEf0sP3V6vPHKi4dkIBHJnjrn CGGavqK7u0PUjhdJKlQqwsVkbRlF6sp62VG4bszeD2IzCXN5aLy8arbuxY2Gk7c4YeWN kAtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SrkK/uOu8jEe6RUvIEuhR3WS5b7iryb+SpmXVKo1frs=; b=dGsTehjBrybrxGJkh9JGpB8cfZNtkhg9MK5x4CHufJLCRAfHdONL6GCZGbf/Dj1vr8 kLV5v85SOgjII1rk2XNPeVP0oEjFW58ucUYtcd6u7zVfqvTUtTpOSMblxbe16EQEz0A9 iq7bPGajOmfBxg6X8PqZJyx9gqag9VXvSl8RgUVq+ZhUITtcmYIlTTxn/LWUoxwNfyqE OP/O1/+5/SnIFtlI2IHhraueEd6wZF8DMj4ivpU1vgZCRvHS/BQb2AWV32h6x7KriVl+ IlzgEBAgpUjj347Az0dMxAavrFqLI2IUTeSxQubGcfv1ss/TTSSKIH1sJBlClAwwgTTa 6AtA== X-Gm-Message-State: AIVw111qLloEfxgC8wFVGIyyt+bO2KlJQh3MU7JGRbdybjZS5XZC8YXP 6XBdCRuUc5RtT3lQ X-Received: by 10.223.179.216 with SMTP id x24mr12928069wrd.7.1501521356380; Mon, 31 Jul 2017 10:15:56 -0700 (PDT) Received: from localhost (p200300E41BDFF20076D02BFFFE273F51.dip0.t-ipconnect.de. [2003:e4:1bdf:f200:76d0:2bff:fe27:3f51]) by smtp.gmail.com with ESMTPSA id m125sm1163139wmb.30.2017.07.31.10.15.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 31 Jul 2017 10:15:55 -0700 (PDT) From: Thierry Reding To: intel-gfx@lists.freedesktop.org Date: Mon, 31 Jul 2017 19:15:52 +0200 Message-Id: <20170731171553.30586-1-thierry.reding@gmail.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20170731141756.26745-1-thierry.reding@gmail.com> References: <20170731141756.26745-1-thierry.reding@gmail.com> Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [maintainer-tools PATCH v2 1/2] dim: Add apply and push shorthands for current branch X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Thierry Reding The new apply and push commands are shorthands for applying patches to and pushing the current branch, respectively. v2: use git symbolic-ref to find current branch (Daniel Vetter) Signed-off-by: Thierry Reding --- dim | 18 ++++++++++++++++++ dim.rst | 8 ++++++++ 2 files changed, 26 insertions(+) diff --git a/dim b/dim index c0cbe352b165..1422b35e2471 100755 --- a/dim +++ b/dim @@ -326,6 +326,11 @@ function git_fetch_helper # remote fi } +function git_current_branch +{ + git symbolic-ref -q --short HEAD +} + function git_is_current_branch # branch { git branch --list $1 | grep -q '\*' @@ -739,6 +744,11 @@ function dim_push_fixes dim_push_branch drm-intel-fixes "$@" } +function dim_push +{ + dim_push_branch $(git_current_branch) "$@" +} + # ensure we're on branch $1, and apply patches. the rest of the arguments are # passed to git am. dim_alias_ab=apply-branch @@ -930,6 +940,14 @@ function dim_apply_next_fixes dim_apply_branch drm-intel-next-fixes "$@" } +# apply patch to current branch, the rest of the arguments are passed to +# git am +dim_alias_am=apply +function dim_apply +{ + dim_apply_branch $(git_current_branch) "$@" +} + function commit_list_references { local commit remote log diff --git a/dim.rst b/dim.rst index c004c30ada17..fa9b587d73bb 100644 --- a/dim.rst +++ b/dim.rst @@ -198,6 +198,10 @@ apply-queued [*git am arguments*] **apply-branch** shorthands for *drm-intel-fixes*, *drm-intel-next-fixes*, and *drm-intel-next-queued* branches respectively. +apply [*git am arguments*] +-------------------------- +**apply-branch** shorthand for the current branch. + extract-tags *branch* [*git-rangeish*] -------------------------------------- This extracts various tags (e.g. Reviewed-by:) from emails and applies them to the @@ -232,6 +236,10 @@ push-queued [*git push arguments*] **push-branch** shorthands for *drm-intel-fixes*, *drm-intel-next-fixes*, and *drm-intel-next-queued* branches respectively. +push [*git push arguments*] +--------------------------- +**push** shorthand for the current branch. + rebuild-tip ----------- Rebuild and push the integration tree.