[PATCH QGit] Fix "Save as..." for a file changed in the working dir
- From
Markus Heidelberg <markus.heidelberg@web.de>
- Date
- Jun 13, 2009, 11:04 UTC
- Message-ID
- <1244891044-10582-2-git-send-email-markus.heidelberg@web.de>
The second argument of Git::saveFile() is the filename, but the commit SHA1 has been used, leading to the following error message:
An error occurred while executing command:
cat 0000000000000000000000000000000000000000
Git says:
/bin/cat: 0000000000000000000000000000000000000000: No such file or directory
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de> ---
Is there a difference between rv->st.fileName() and f.filename()? They seem to be equal, I chose the former for the function call.
src/mainimpl.cpp | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mainimpl.cpp b/src/mainimpl.cpp index bd19ea1..382dc5d 100644 --- a/src/mainimpl.cpp +++ b/src/mainimpl.cpp @@ -1353,7 +1353,7 @@ void MainImpl::ActSaveFile_activated() { QApplication::setOverrideCursor(QCursor(Qt::WaitCursor)); QString fileSha(git->getFileSha(rv->st.fileName(), rv->st.sha())); - if (!git->saveFile(fileSha, rv->st.sha(), fileName)) + if (!git->saveFile(fileSha, rv->st.fileName(), fileName)) statusBar()->showMessage("Unable to save " + fileName); QApplication::restoreOverrideCursor();
-- 1.6.3.2.248.g8cb59