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

[PATCH v2 4/4] add--interactive: use add-interactive--helper for status_cmd

From
Daniel Ferreira <bnmvco@gmail.com>
Date
May 16, 2017, 04:00 UTC
Message-ID
<1494907234-28903-5-git-send-email-bnmvco@gmail.com>
In-Reply-To
<1494907234-28903-1-git-send-email-bnmvco@gmail.com>

Call the newly introduced git-add-interactive--helper builtin on status_cmd() instead of relying on git-add--interactive's Perl functions to build print the numstat.

Signed-off-by: Daniel Ferreira <bnmvco@gmail.com>
---
 git-add--interactive.perl | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/git-add--interactive.perl b/git-add--interactive.perl
index 709a5f6..8c192bf 100755
--- a/git-add--interactive.perl
+++ b/git-add--interactive.perl
@@ -632,9 +632,7 @@ EOF
 }
 
 sub status_cmd {
-	list_and_choose({ LIST_ONLY => 1, HEADER => $status_head },
-			list_modified());
-	print "\n";
+	system(qw(git add--helper --status));
 }
 
 sub say_n_paths {
-- 
2.7.4 (Apple Git-66)
Previous: Junio C HamanoNext: Slavica Djukic
Message 6 of 7 in “Port git-add--interactive.perl:status_cmd to C”
  1. 0/4 Port git-add--interactive.perl:status_cmd to CDaniel Ferreira, May 16, 2017
  2. 1/4 diff: export diffstat interfaceDaniel Ferreira, May 16, 2017
  3. 2/4 add--helper: create builtin helper for interactive addDaniel Ferreira, May 16, 2017
  4. 3/4 add--helper: implement interactive status commandDaniel Ferreira, May 16, 2017
  5. Junio C HamanoMay 16, 2017
  6. 4/4 add--interactive: use add-interactive--helper for status_cmdDaniel Ferreira, May 16, 2017
  7. Slavica DjukicNov 26, 2018

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.