# Git merge-file doesn't account correctly for not being in repo root

1 messages from 2014-11-14 to 2014-11-14. Participants: Aleksander Boruch-Gruszecki.
Thread: https://gitlist.dev/t/37965

## Aleksander Boruch-Gruszecki, 2014-11-14 17:06

Subject: Git merge-file doesn't account correctly for not being in repo root
Message-ID: <CAOiM-0UinUshK83MHbTcTj1VwrN1b-NnAv9NJYkphckZLiSXug@mail.gmail.com>
URL: https://gitlist.dev/e/CAOiM-0UinUshK83MHbTcTj1VwrN1b-NnAv9NJYkphckZLiSXug%40mail.gmail.com

```
Git merge-file works correctly when reading files, but when trying to
write to them, it doesn't prepend current working directory. I've
attached a basic example - running "git merge-file file1 file file2"
from inside sample dir will "fail" silently and write to file1 in repo
root. Running git merge-file from the same dir referencing files
inside deeper-sample will fail with message "error: Could not open
deeper-sample/file1 for writing".

```
