Merge branch 'ps/stash-in-c'
"git stash" rewritten in C. * ps/stash-in-c: (28 commits) tests: add a special setup where stash.useBuiltin is off stash: optionally use the scripted version again stash: add back the original, scripted `git stash` stash: convert `stash--helper.c` into `stash.c` stash: replace all `write-tree` child processes with API calls stash: optimize `get_untracked_files()` and `check_changes()` stash: convert save to builtin stash: make push -q quiet stash: convert push to builtin stash: convert create to builtin stash: convert store to builtin stash: convert show to builtin stash: convert list to builtin stash: convert pop to builtin stash: convert branch to builtin stash: convert drop and clear to builtin stash: convert apply to builtin stash: mention options in `show` synopsis stash: add tests for `git stash show` config stash: rename test cases to be more descriptive ...
This commit is contained in:
16
strbuf.h
16
strbuf.h
@ -244,6 +244,15 @@ void strbuf_addchars(struct strbuf *sb, int c, size_t n);
|
||||
*/
|
||||
void strbuf_insert(struct strbuf *sb, size_t pos, const void *, size_t);
|
||||
|
||||
/**
|
||||
* Insert data to the given position of the buffer giving a printf format
|
||||
* string. The contents will be shifted, not overwritten.
|
||||
*/
|
||||
void strbuf_vinsertf(struct strbuf *sb, size_t pos, const char *fmt,
|
||||
va_list ap);
|
||||
|
||||
void strbuf_insertf(struct strbuf *sb, size_t pos, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* Remove given amount of data from a given position of the buffer.
|
||||
*/
|
||||
@ -288,6 +297,13 @@ static inline void strbuf_addstr(struct strbuf *sb, const char *s)
|
||||
*/
|
||||
void strbuf_addbuf(struct strbuf *sb, const struct strbuf *sb2);
|
||||
|
||||
/**
|
||||
* Join the arguments into a buffer. `delim` is put between every
|
||||
* two arguments.
|
||||
*/
|
||||
const char *strbuf_join_argv(struct strbuf *buf, int argc,
|
||||
const char **argv, char delim);
|
||||
|
||||
/**
|
||||
* This function can be used to expand a format string containing
|
||||
* placeholders. To that end, it parses the string and calls the specified
|
||||
|
||||
Reference in New Issue
Block a user