[PATCH 5/6] stash: tweak error message in store_stash ()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the update-ref invocation fails, store_stash currently prints:

    Cannot save the current status

This is not very useful for diagnosing the problem.  Instead, print:

    Cannot store 688268c4254ca5dc6e2effa83bae4f0dbbe75e5b

so we can inspect the object and analyze why the update-ref failed.

Signed-off-by: Ramkumar Ramachandra <artagnon@xxxxxxxxx>
---
 git-stash.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-stash.sh b/git-stash.sh
index 1d483f5..24d72fc 100755
--- a/git-stash.sh
+++ b/git-stash.sh
@@ -167,7 +167,7 @@ store_stash () {
 	# Make sure the reflog for stash is kept.
 	: >>"$GIT_DIR/logs/$ref_stash"
 	git update-ref -m "$stash_msg" $ref_stash $w_commit ||
-	die "$(gettext "Cannot save the current status")"
+	die "$(gettext "Cannot store $w_commit")"
 }
 
 save_stash () {
-- 
1.8.3.rc1.57.g4ac1522

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]