git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cg-seek should not complain if run twice
@ 2005-12-20  4:55 Pavel Roskin
  2006-01-14 23:30 ` Petr Baudis
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Roskin @ 2005-12-20  4:55 UTC (permalink / raw)
  To: Petr Baudis; +Cc: git

cg-seek complains if run without arguments in a non-seeked repository:

rm: cannot remove `.git/refs/heads/cg-seek-point': No such file or directory
rm: cannot remove `.git/head-name': No such file or directory

In fact, it's OK for those files not to exist, so they should be removed
silently.

Signed-off-by: Pavel Roskin <proski@gnu.org>

diff --git a/cg-seek b/cg-seek
index 942267f..8356593 100755
--- a/cg-seek
+++ b/cg-seek
@@ -60,7 +60,7 @@ if [ "$seek_mode" = "away" ]; then
 	git-symbolic-ref HEAD "refs/heads/cg-seek-point"
 else
 	git-symbolic-ref HEAD "refs/heads/$_git_head"
-	rm "$_git/refs/heads/cg-seek-point" "$_git/head-name"
+	rm -f "$_git/refs/heads/cg-seek-point" "$_git/head-name"
 	rm -f "$_git/blocked"
 fi
 


-- 
Regards,
Pavel Roskin

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-15 23:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-20  4:55 [PATCH] cg-seek should not complain if run twice Pavel Roskin
2006-01-14 23:30 ` Petr Baudis
2006-01-15  6:03   ` Pavel Roskin
2006-01-15 23:59     ` Petr Baudis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).