Thread (16 messages) flat view 16 messages, 3 authors, 2016-06-15
STALE3726d

[PATCH 1/7] Make "stg export" save the base commit in the output directory

From: Chuck Lever <hidden>
Date: 2016-06-15 22:42:13
Subsystem: the rest · Maintainer: Linus Torvalds

When trying to apply a series of diffs that was exported from an StGIT
series, it can be convenient to know exactly which base commit the
patches apply to.  Save that commit in a file patchdir/base.

Signed-off-by: Chuck Lever <redacted>
---

 stgit/commands/export.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/export.py b/stgit/commands/export.py
index 0ef7d07..167a8d3 100644
--- a/stgit/commands/export.py
+++ b/stgit/commands/export.py
@@ -141,6 +141,10 @@ def func(parser, options, args):
             tmpl = file(patch_tmpl).read()
             break
 
+    # note the base commit for this series
+    write_string(os.path.join(dirname, 'base'), \
+                 crt_series.get_patch(patches[0]).get_bottom())
+
     patch_no = 1;
     for p in patches:
         pname = p
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help