forked from git/git
-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The effort to move "git-add--interactive" to C continues. * js/add-p-in-c: built-in add -p: show helpful hint when nothing can be staged built-in add -p: only show the applicable parts of the help text built-in add -p: implement the 'q' ("quit") command built-in add -p: implement the '/' ("search regex") command built-in add -p: implement the 'g' ("goto") command built-in add -p: implement hunk editing strbuf: add a helper function to call the editor "on an strbuf" built-in add -p: coalesce hunks after splitting them built-in add -p: implement the hunk splitting feature built-in add -p: show different prompts for mode changes and deletions built-in app -p: allow selecting a mode change as a "hunk" built-in add -p: handle deleted empty files built-in add -p: support multi-file diffs built-in add -p: offer a helpful error message when hunk navigation failed built-in add -p: color the prompt and the help text built-in add -p: adjust hunk headers as needed built-in add -p: show colored hunks by default built-in add -i: wire up the new C code for the `patch` command built-in add -i: start implementing the `patch` functionality in C
- Loading branch information
Showing
8 changed files
with
1,464 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,27 @@ | ||
#ifndef ADD_INTERACTIVE_H | ||
#define ADD_INTERACTIVE_H | ||
|
||
#include "color.h" | ||
|
||
struct add_i_state { | ||
struct repository *r; | ||
int use_color; | ||
char header_color[COLOR_MAXLEN]; | ||
char help_color[COLOR_MAXLEN]; | ||
char prompt_color[COLOR_MAXLEN]; | ||
char error_color[COLOR_MAXLEN]; | ||
char reset_color[COLOR_MAXLEN]; | ||
char fraginfo_color[COLOR_MAXLEN]; | ||
char context_color[COLOR_MAXLEN]; | ||
char file_old_color[COLOR_MAXLEN]; | ||
char file_new_color[COLOR_MAXLEN]; | ||
}; | ||
|
||
void init_add_i_state(struct add_i_state *s, struct repository *r); | ||
|
||
struct repository; | ||
struct pathspec; | ||
int run_add_i(struct repository *r, const struct pathspec *ps); | ||
int run_add_p(struct repository *r, const struct pathspec *ps); | ||
|
||
#endif |
Oops, something went wrong.