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

[StGIT PATCH 4/4] Port stg-whatchanged improvements to stg-mdiff and have the former use the latter.

From
Yann Dirson <ydirson@altern.org>
Date
Jul 24, 2007, 18:57 UTC
Message-ID
<20070724185746.17180.29218.stgit@gandelf.nowhere.earth>
In-Reply-To
<20070724185535.17180.24577.stgit@gandelf.nowhere.earth>
From: Yann Dirson <yann.dirson@sagem.com>
Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 contrib/stg-mdiff       |    2 ++
 contrib/stg-whatchanged |   10 ++++------
 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/contrib/stg-mdiff b/contrib/stg-mdiff
index 61cba9e..74d7f77 100755
--- a/contrib/stg-mdiff
+++ b/contrib/stg-mdiff
@@ -46,4 +46,6 @@ case "$2" in
 esac
 
 colordiff $diffopts \
+    -I '^index [0-9a-b]*..[0-9a-b]*' \
+    -I '^@@ .* @@' \
     <($cmd1 "$1") <($cmd2 "$2") | less -RFX
diff --git a/contrib/stg-whatchanged b/contrib/stg-whatchanged
index 231f4f5..afeda2c 100755
--- a/contrib/stg-whatchanged
+++ b/contrib/stg-whatchanged
@@ -25,11 +25,9 @@ fi
 # in this case (unlike, eg., "pick --fold")
 patchdir="$(git-rev-parse --git-dir)/patches/$(stg branch)/patches/$(stg top)"
 case $(stg log | head -n1) in
-    *push\(c\)*) current_cmd="stg show //top.old" ;;
-    *) current_cmd="stg show" ;;
+    *push\(c\)*) former="//top.old" ;;
+    *) former="//top" ;;
 esac
 
-colordiff "$@" \
-    -I '^index [0-9a-b]*..[0-9a-b]*' \
-    -I '^@@ .* @@' \
-    <($current_cmd) <(stg diff -r//bottom) | less -RFX
+stg-mdiff -o "$*" \
+    $former //bottom..
Previous: Yann Dirson
Message 5 of 5 in “stg-whatchanged improvements”
  1. 0/4 stg-whatchanged improvementsYann Dirson, Jul 24, 2007
  2. 1/4 Fix stg-whatchanged to deal with conflicts already solved.Yann Dirson, Jul 24, 2007
  3. 2/4 Add range comparison support to stg-mdiff.Yann Dirson, Jul 24, 2007
  4. 3/4 Add to stg-mdiff the ability to pass options to underlying diff opts.Yann Dirson, Jul 24, 2007
  5. 4/4 Port stg-whatchanged improvements to stg-mdiff and have the former use the latter.Yann Dirson, Jul 24, 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.