All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH] dim: add error reporting for rerere cache pulling
Date: Wed, 16 Aug 2017 14:51:20 +0200	[thread overview]
Message-ID: <20170816125120.17971-1-daniel.vetter@ffwll.ch> (raw)

This silently failed for me, and I had no idea what's happening.

v2: Use git pull -q (Jani).

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 dim | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/dim b/dim
index 85866488e0e0..124f9b374d4c 100755
--- a/dim
+++ b/dim
@@ -503,7 +503,14 @@ function update_rerere_cache
 	echo -n "Updating rerere cache... "
 
 	cd $DIM_PREFIX/drm-rerere/
-	git pull &> /dev/null
+	if ! git pull -q ; then
+		echo "Failed to update the rerere cache."
+		echo "Please manually run"
+		echo "	$ cd $DIM_PREFIX/drm-rerere ; git pull"
+		echo "and fixup any issues."
+
+		return 1
+	fi
 	if [ ! -L $(rr_cache_dir) ] ; then
 		if [ -d $(rr_cache_dir) ] ; then
 			rm -Rf $(rr_cache_dir)
@@ -524,7 +531,14 @@ function commit_rerere_cache
 	if git_is_current_branch rerere-cache ; then
 		remote=$(branch_to_remote rerere-cache)
 
-		git pull >& /dev/null
+		if ! git pull -q ; then
+			echo "Failed to update the rerere cache."
+			echo "Please manually run"
+			echo "	$ cd $DIM_PREFIX/drm-rerere ; git pull"
+			echo "and fixup any issues."
+
+			return 1
+		fi
 		git add ./*.patch >& /dev/null || true
 		for file  in $(git ls-files); do
 			if ! git log --since="60 days ago" --name-only -- $file | grep $file &> /dev/null; then
-- 
2.13.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2017-08-16 12:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 12:51 Daniel Vetter [this message]
2017-08-16 13:17 ` [PATCH] dim: add error reporting for rerere cache pulling 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=20170816125120.17971-1-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.