diff options
author | Lucas De Marchi <lucas.demarchi@intel.com> | 2018-05-09 14:28:33 -0700 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2018-05-17 12:13:11 +0300 |
commit | 5979a716a3704271aabba38ad371b746012afad0 (patch) | |
tree | bca87b3b9d5c2d053c56bb3771ed0eea3b54c6c1 | |
parent | 14b1641d3e85e7713297fe8f65f42de2639c3ad0 (diff) |
dim: replace pipe commands with single sed
A single sed can do the job of taking the second line after a match and
it looks simpler.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rwxr-xr-x | dim | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -924,7 +924,7 @@ function dim_apply_pull cat > $file - pull_branch=$(sed -e '0,/[gG]it repository at:$/d' $file | head -n 2 | tail -n 1) + pull_branch=$(sed -ne '/[gG]it repository at:$/{n;n;p}' $file) if [[ -z "$pull_branch" ]] ; then echoerr "no pull request found" |