git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v5 2/3] gitk: report file saving error

From
Max Kirillov <max@max630.net>
Date
Mar 4, 2015, 03:58 UTC
Message-ID
<1425441498-29416-3-git-send-email-max@max630.net>
In-Reply-To
<1425441498-29416-1-git-send-email-max@max630.net>
Signed-off-by: Max Kirillov <max@max630.net>
---
 gitk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gitk b/gitk
index 5f09756..9404d5d 100755
--- a/gitk
+++ b/gitk
@@ -2811,7 +2811,7 @@ proc savestuff {w} {
 
     if {$stuffsaved} return
     if {![winfo viewable .]} return
-    catch {
+    if {[catch {
 	if {[file exists $config_file_tmp]} {
 	    file delete -force $config_file_tmp
 	}
@@ -2877,6 +2877,8 @@ proc savestuff {w} {
 	puts $f "}"
 	close $f
 	file rename -force $config_file_tmp $config_file
+    } err]} {
+        puts "Error saving config: $err"
     }
     set stuffsaved 1
 }
-- 
2.1.1.391.g7a54a76
Previous: Max KirillovNext: Max Kirillov
Message 3 of 5 in “gitk: save only changed configuration on exit”
  1. 0/3 gitk: save only changed configuration on exitMax Kirillov, Mar 4, 2015
  2. 1/3 gitk: write only changed configuration variablesMax Kirillov, Mar 4, 2015
  3. 2/3 gitk: report file saving errorMax Kirillov, Mar 4, 2015
  4. 3/3 gitk: synchronize config writeMax Kirillov, Mar 4, 2015
  5. Paul MackerrasMar 22, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.