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

[PATCH 2/2] Fix refresh -es

From
PRPavel Roskin <proski@gnu.org>
Date
Aug 31, 2007, 03:04 UTC
Message-ID
<20070831030455.22554.75625.stgit@dv.roinet.com>
In-Reply-To
<20070831030449.22554.49699.stgit@dv.roinet.com>

Use named arguments to call git.diff() from stack.edit_file(). git.diff() doesn't write to files anymore, do it in the caller.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 stgit/stack.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/stgit/stack.py b/stgit/stack.py
index ea22d76..0253348 100644
--- a/stgit/stack.py
+++ b/stgit/stack.py
@@ -88,7 +88,8 @@ def edit_file(series, line, comment, show_patch = True):
     if show_patch:
        print >> f, __patch_prefix
        # series.get_patch(series.get_current()).get_top()
-       git.diff([], series.get_patch(series.get_current()).get_bottom(), None, f)
+       diff_str = git.diff(rev1 = series.get_patch(series.get_current()).get_bottom())
+       f.write(diff_str)
 
     #Vim modeline must be near the end.
     print >> f, __comment_prefix, 'vi: set textwidth=75 filetype=diff nobackup:'
Previous: Pavel Roskin
Message 2 of 2 in “Use --force to overwrite python files”
  1. 1/2 Use --force to overwrite python filesPavel Roskin, Aug 31, 2007
  2. 2/2 Fix refresh -esPavel Roskin, Aug 31, 2007

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.