summaryrefslogtreecommitdiff
path: root/builtin-mailsplit.c
AgeCommit message (Collapse)Author
2008-07-22Rename path_list to string_listJohannes Schindelin
The name path_list was correct for the first usage of that data structure, but it really is a general-purpose string list. $ perl -i -pe 's/path-list/string-list/g' $(git grep -l path-list) $ perl -i -pe 's/path_list/string_list/g' $(git grep -l path_list) $ git mv path-list.h string-list.h $ git mv path-list.c string-list.c $ perl -i -pe 's/has_path/has_string/g' $(git grep -l has_path) $ perl -i -pe 's/path/string/g' string-list.[ch] $ git mv Documentation/technical/api-path-list.txt \ Documentation/technical/api-string-list.txt $ perl -i -pe 's/strdup_paths/strdup_strings/g' $(git grep -l strdup_paths) ... and then fix all users of string-list to access the member "string" instead of "path". Documentation/technical/api-string-list.txt needed some rewrapping, too. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-17Merge branch 'sb/dashless'Junio C Hamano
* sb/dashless: Make usage strings dash-less t/: Use "test_must_fail git" instead of "! git" t/test-lib.sh: exit with small negagive int is ok with test_must_fail Conflicts: builtin-blame.c builtin-mailinfo.c builtin-mailsplit.c builtin-shortlog.c git-am.sh t/t4150-am.sh t/t4200-rerere.sh
2008-07-13git-am/git-mailsplit: correct synopsis for reading from stdinStephan Beyer
Invoking git-am or git-mailsplit without mbox or Maildir results in reading an mbox from stdin. Mention this in the synopsis and usage strings. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-07-13Make usage strings dash-lessStephan Beyer
When you misuse a git command, you are shown the usage string. But this is currently shown in the dashed form. So if you just copy what you see, it will not work, when the dashed form is no longer supported. This patch makes git commands show the dash-less version. For shell scripts that do not specify OPTIONS_SPEC, git-sh-setup.sh generates a dash-less usage string now. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25mailsplit: minor clean-up in read_line_with_nul()Junio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2008-05-25mailsplit and mailinfo: gracefully handle NUL charactersJohannes Schindelin
The function fgets() has a big problem with NUL characters: it reads them, but nobody will know if the NUL comes from the file stream, or was appended at the end of the line. So implement a custom read_line_with_nul() function. Noticed by Tommy Thorn. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-09Merge branch 'maint'Junio C Hamano
* maint: Start preparing for 1.5.3.6 git-send-email: Change the prompt for the subject of the initial message. SubmittingPatches: improve the 'Patch:' section of the checklist instaweb: Minor cleanups and fixes for potential problems stop t1400 hiding errors in tests Makefile: add missing dependency on wt-status.h refresh_index_quietly(): express "optional" nature of index writing better Fix sed string regex escaping in module_name. Avoid a few unportable, needlessly nested "...`...". git-mailsplit: with maildirs not only process cur/, but also new/ Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-08git-mailsplit: with maildirs not only process cur/, but also new/Gerrit Pape
When saving patches to a maildir with e.g. mutt, the files are put into the new/ subdirectory of the maildir, not cur/. This makes git-am state "Nothing to do.". This patch lets git-mailsplit additional check new/ after reading cur/. This was reported by Joey Hess through http://bugs.debian.org/447396 Signed-off-by: Gerrit Pape <pape@smarden.org> Acked-by: Jeff King <peff@peff.net> Acked-by: Alex Riesen <raa.lkml@gmail.com> Acked-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-11-02Make mailsplit and mailinfo strip whitespace from the start of the inputSimon Sasburg
Signed-off-by: Simon Sasburg <Simon.Sasburg@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-06-08More missing staticJunio C Hamano
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2007-05-29mailsplit: fix for more than one input filesJunio C Hamano
Earlier commit d63bd9a broke the case where more than one input files are fed to mailsplit by not incrementing the base counter when splitting second and subsequent input files. This should fix it. Signed-off-by: Junio C Hamano <junkio@cox.net>
2007-05-25Teach mailsplit about Maildir'sFernando J. Pereda
Signed-off-by: Fernando J. Pereda <ferdy@gentoo.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-12-20simplify inclusion of system header files.Junio C Hamano
This is a mechanical clean-up of the way *.c files include system header files. (1) sources under compat/, platform sha-1 implementations, and xdelta code are exempt from the following rules; (2) the first #include must be "git-compat-util.h" or one of our own header file that includes it first (e.g. config.h, builtin.h, pkt-line.h); (3) system headers that are included in "git-compat-util.h" need not be included in individual C source files. (4) "git-compat-util.h" does not have to include subsystem specific header files (e.g. expat.h). Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-07-29Call setup_git_directory() much earlierLinus Torvalds
This changes the calling convention of built-in commands and passes the "prefix" (i.e. pathname of $PWD relative to the project root level) down to them. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-06-19Make git-mailsplit a builtinLukas Sandström
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se> Signed-off-by: Junio C Hamano <junkio@cox.net>