# [PATCH Cogito] Prevent '.git/merging: No such file or directory' error message

1 messages from 2005-06-20 to 2005-06-20. Participants: Marcel Holtmann.
Thread: https://gitlist.dev/t/995

## Marcel Holtmann, 2005-06-20 22:15

Subject: [PATCH Cogito] Prevent '.git/merging: No such file or directory' error message
Message-ID: <1119305714.26772.75.camel@pegasus>
URL: https://gitlist.dev/e/1119305714.26772.75.camel%40pegasus

```
Hi Petr,

the attached patch prevent the '.git/merging: No such file or directory'
error message.

Regards

Marcel


Signed-off-by: Marcel Holtmann <marcel@holtmann.org>



diff --git a/cg-merge b/cg-merge
--- a/cg-merge
+++ b/cg-merge
@@ -48,7 +48,7 @@ branch=$(commit-id "$branchname") || exi
 
 [ -s $_git/blocked ] && die "merge blocked: $(cat $_git/blocked)"
 
-if grep -q "$branch" $_git/merging; then
+if grep -sq "$branch" $_git/merging; then
 	echo "Branch already merged in the working tree." >&2
 	echo 0
 fi

```
