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

[PATCH QGit RFC] Fix "Save patch..." on a commit range

From
Markus Heidelberg <markus.heidelberg@web.de>
Date
Jun 12, 2009, 23:29 UTC
Message-ID
<1244849357-31166-1-git-send-email-markus.heidelberg@web.de>

Creating a patch series didn't work, because the SHA1 list was interpreted in the wrong order.

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
---

To find out if this problem was caused by a regression, I tested 2e63608 (Format patch: use selected patches as a range, 2008-01-13), which changed the behavior of generating multiple patches and introduced the lines that are now changed in my patch.

But that commit didn't work for me either. Now I don't think that it didn't work for you at that time. Can this be a Qt problem?

 src/git.cpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/git.cpp b/src/git.cpp
index a20bf0d..0f18f61 100644
--- a/src/git.cpp
+++ b/src/git.cpp
@@ -1577,9 +1577,9 @@ bool Git::formatPatch(SCList shaList, SCRef dirPath, SCRef remoteDir) {
 	if (remote)
 		workDir = remoteDir; // run() uses workDir value
 
-	// shaList is ordered by newest to oldest
-	runCmd.append(" " + shaList.last());
-	runCmd.append(QString::fromLatin1("^..") + shaList.first());
+	// shaList is ordered by oldest to newest
+	runCmd.append(" " + shaList.first());
+	runCmd.append(QString::fromLatin1("^..") + shaList.last());
 	bool ret = run(runCmd);
 	workDir = tmp;
 	return ret;
-- 
1.6.3.2.248.g8cb59
Next: Marco Costalba
Message 1 of 15 in “Fix "Save patch..." on a commit range”
  1. Fix "Save patch..." on a commit rangeMarkus Heidelberg, Jun 12, 2009
  2. Marco CostalbaJun 13, 2009
  3. Markus HeidelbergJun 13, 2009
  4. Markus HeidelbergJun 13, 2009
  5. Marco CostalbaJun 13, 2009
  6. Markus HeidelbergJun 13, 2009
  7. Marco CostalbaJun 13, 2009
  8. Markus HeidelbergJun 15, 2009
  9. Marco CostalbaJun 15, 2009
  10. Marco CostalbaJun 15, 2009
  11. Marco CostalbaJun 15, 2009
  12. Markus HeidelbergJun 15, 2009
  13. Marco CostalbaJun 16, 2009
  14. Markus HeidelbergJun 16, 2009
  15. Markus HeidelbergJun 15, 2009

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.