On Friday, September 7, 2018 8:15:43 AM MST Kevin Daudt wrote:
> On Wed, Sep 05, 2018 at 09:17:29PM -0700, Stephen & Linda Smith wrote:
>
> This is the mailsplit command, and should be executed when running `git
> mailsplit`. What does git --exec-dir return?
>
The other ni
On Wed, Sep 05, 2018 at 09:17:29PM -0700, Stephen & Linda Smith wrote:
> I thought I would use "git mailsplit" to split a mbox file (which downloaded
> from public inbox) so that I could attemp to resurrect a patch series for
> from
> a year ago.
>
> The mot
On Wednesday, September 5, 2018 9:17:29 PM MST Stephen & Linda Smith wrote:
> So two questions:
> 1) why would git version 2.18.0 not appear to continue applying the
> patches.
>
> 2) where do I find the command "git mailsplit". The onlything in my
> ins
I thought I would use "git mailsplit" to split a mbox file (which downloaded
from public inbox) so that I could attemp to resurrect a patch series for from
a year ago.
The motivation is that I downloaded the series [1] and applied to a tag from
about the time period that the patc
While POSIX states that it is okay to pass EOF to isspace() (and it seems
to be implied that EOF should *not* be treated as whitespace), and also to
pass EOF to ungetc() (which seems to be intended to fail without buffering
the character), it is much better to handle these cases explicitly. Not
onl
While POSIX states that it is okay to pass EOF to isspace() (and it seems
to be implied that EOF should *not* be treated as whitespace), and also to
pass EOF to ungetc() (which seems to be intended to fail without buffering
the character), it is much better to handle these cases explicitly. Not
onl
Hi Junio,
On Mon, 1 May 2017, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
> > diff --git a/builtin/mailsplit.c b/builtin/mailsplit.c
> > index 30681681c13..9b3efc8e987 100644
> > --- a/builtin/mailsplit.c
> > +++ b/builtin/mailsplit.c
> > @@ -233,7 +233,8 @@ static int split_mbox(cons
Johannes Schindelin writes:
> While POSIX states that it is okay to pass EOF to isspace() (and it seems
> to be implied that EOF should *not* be treated as whitespace), and also to
> pass EOF to ungetc() (which seems to be intended to fail without buffering
> the character), it is much better to
While POSIX states that it is okay to pass EOF to isspace() (and it seems
to be implied that EOF should *not* be treated as whitespace), and also to
pass EOF to ungetc() (which seems to be intended to fail without buffering
the character), it is much better to handle these cases explicitly. Not
onl
, as it only reads from the
> mbox "From " line to learn the
> original commit and extract the log message directly from there.
OK.
> But a third-party script that wants to read format-patch output
> would be forced to upgrade, which is a pain if we make this change
> unco
Andreas Schwab writes:
>> +colon = line + len - 2;
>> +line += 5;
>> +for (;;) {
>> +if (colon < line)
>> +return 0;
>> +if (*--colon == ':')
>> +break;
>> +}
>> +
>> +if (!isdigit(colon[-4]) ||
>> +!isdig
Eric Wong writes:
>> Also, doesn't it break "git rebase" (non-interactive), or anything
>> that internally runs format-patch to individual files and then runs
>> am on each of them, anything that knows that each output file from
>> format-patch corresponds to a single change and there is no need
ne uses mboxrd, yet, we should at least
> >> prevent miss-split mails by always escaping "From " lines based
> >> on the check used by mailsplit.
> >>
> >> mailsplit will not perform unescaping by default, yet, as it
> >> could cause furth
vent miss-split mails by always escaping "From " lines based
>> on the check used by mailsplit.
>>
>> mailsplit will not perform unescaping by default, yet, as it
>> could cause further invocations of format-patch from old
>> versions of git to generate ba
On Sun, Jul 24, 2016 at 09:37:57AM +0200, Johannes Schindelin wrote:
> On Sun, 24 Jul 2016, Eric Wong wrote:
>
> > @@ -1745,9 +1746,18 @@ void pp_remainder(struct pretty_print_context *pp,
> > strbuf_add_tabexpand(sb, pp->expand_tabs_in_log,
> >
Junio C Hamano wrote:
> As a tool to produce mbox file, quoting like this in format-patch
> output may make sense, I would think, but shouldn't send-email undo
> this when sending individual patches?
Yes, that sounds like a good idea. Thanks.
Will followup in a day or two.
--
To unsubscribe from
Johannes Schindelin writes:
> Hi Andreas,
>
> On Sun, 24 Jul 2016, Andreas Schwab wrote:
>
>> Eric Wong writes:
>>
>> > diff --git a/mailinfo.c b/mailinfo.c
>> > index 9f19ca1..0ebd953 100644
>> > --- a/mailinfo.c
>> > +++ b/mailinfo.c
>> > @@ -1035,3 +1035,34 @@ void clear_mailinfo(struct mail
Hi Andreas,
On Sun, 24 Jul 2016, Andreas Schwab wrote:
> Eric Wong writes:
>
> > diff --git a/mailinfo.c b/mailinfo.c
> > index 9f19ca1..0ebd953 100644
> > --- a/mailinfo.c
> > +++ b/mailinfo.c
> > @@ -1035,3 +1035,34 @@ void clear_mailinfo(struct mailinfo *mi)
> >
> > strbuf_release(&mi-
Hi Eric,
On Sun, 24 Jul 2016, Eric Wong wrote:
> @@ -1745,9 +1746,18 @@ void pp_remainder(struct pretty_print_context *pp,
> strbuf_add_tabexpand(sb, pp->expand_tabs_in_log,
>line, linelen);
> else {
> -
Eric Wong writes:
> diff --git a/mailinfo.c b/mailinfo.c
> index 9f19ca1..0ebd953 100644
> --- a/mailinfo.c
> +++ b/mailinfo.c
> @@ -1035,3 +1035,34 @@ void clear_mailinfo(struct mailinfo *mi)
>
> strbuf_release(&mi->log_message);
> }
> +
> +int is_from_line(const char *line, int len)
>
quot; lines based
> on the check used by mailsplit.
>
> mailsplit will not perform unescaping by default, yet, as it
> could cause further invocations of format-patch from old
> versions of git to generate bad output. Propagating the mboxo
> escaping is preferable to miss-split
.h"
+#include "mailinfo.h"
static const char git_mailsplit_usage[] =
"git mailsplit [-d] [-f] [-b] [--keep-cr] -o
[(|)...]";
-static int is_from_line(const char *line, int len)
-{
- const char *colon;
-
- if (len < 20 || memcmp("From ", line,
Users have mistakenly copied "From " lines into commit messages
in the past, and will certainly make the same mistakes in the
future. Since not everyone uses mboxrd, yet, we should at least
prevent miss-split mails by always escaping "From " lines based
on the check used by m
Johannes Schindelin wrote:
> I think that this change:
> deserves to live in a separate patch... It would make the real change
> stick out better.
Good point, I actually wrote a looser check based on
is_mboxrd_from before realizing the stricter check from
mailsplit would probabl
;
> #include "string-list.h"
> #include "strbuf.h"
> +#include "mailinfo.h"
>
> static const char git_mailsplit_usage[] =
> "git mailsplit [-d] [-f] [-b] [--keep-cr] -o
> [(|)...]";
>
> -static int is_from_line(const char *lin
Users have mistakenly copied "From " lines into commit messages
in the past, and will certainly make the same mistakes in the
future. Since not everyone uses mboxrd, yet, we should at least
prevent miss-split mails by always escaping "From " lines based
on the check used by m
Junio C Hamano wrote:
> This just makes me wonder if there is a practical reason why people
> would not want this always enabled. I just looked at output from
>
> $ git log --grep='>>*From '
Missing '^' ?
Auto-unescaping in mailsplit might throw
00644 t/t5100/0001mboxrd
> create mode 100644 t/t5100/0002mboxrd
> create mode 100644 t/t5100/sample.mboxrd
>
> diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
> index 4d1b871..e3b2a88 100644
> --- a/Documentation/git-mailsplit.txt
> +++ b/Doc
t/t5100/sample.mboxrd
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index 4d1b871..e3b2a88 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -8,7 +8,8 @@ git-mailsplit - Simple UNIX mbox splitter program
SYNOPSIS
/sample.mboxrd
diff --git a/Documentation/git-mailsplit.txt b/Documentation/git-mailsplit.txt
index 4d1b871..e3b2a88 100644
--- a/Documentation/git-mailsplit.txt
+++ b/Documentation/git-mailsplit.txt
@@ -8,7 +8,8 @@ git-mailsplit - Simple UNIX mbox splitter program
SYNOPSIS
[verse]
-
There are several PATH_MAX-sized buffers in mailsplit, along
with some questionable uses of sprintf. These are not
really of security interest, as local mailsplit pathnames
are not typically under control of an attacker, and you
could generally only overflow a few numbers at the end of a
path
If we encounter an error while splitting a maildir, we exit
the function early, leaking the open filehandle. This isn't
a big deal, since we exit the program soon after, but it's
easy enough to be careful.
Signed-off-by: Jeff King
---
builtin/mailsplit.c | 5 -
1 file changed, 4 insertions(+
On Wed, Sep 16, 2015 at 11:13:37AM -0700, Junio C Hamano wrote:
> Jeff King writes:
>
> > + free(file);
> > + file = xstrfmt("%s/%s", maildir, list.items[i].string);
>
> Repeated pattern makes one wonder if a thin wrapper
>
> xstrfmt_to(&file, "%s/%s", maildir, list.i
Jeff King writes:
> + free(file);
> + file = xstrfmt("%s/%s", maildir, list.items[i].string);
Repeated pattern makes one wonder if a thin wrapper
xstrfmt_to(&file, "%s/%s", maildir, list.items[i].string);
that first frees the existing value and then overwrites i
is not too complicated, but it is not an idiom we use elsewhere
(whereas recycled strbufs are). I can switch the whole thing to strbufs
if that's the direction we want to go.
-- >8 --
Subject: [PATCH] mailsplit: make PATH_MAX buffers dynamic
There are several static PATH_MAX-sized bu
On Tue, Sep 15, 2015 at 08:51:26PM -0400, Eric Sunshine wrote:
> > if (strbuf_getwholeline(&buf, f, '\n')) {
> > - error("cannot read mail %s (%s)", file,
> > strerror(errno));
> > + error("cannot read mail %s (%s)", file.buf,
> > strer
On Tue, Sep 15, 2015 at 11:28 AM, Jeff King wrote:
> There are several static PATH_MAX-sized buffers in
> mailsplit, along with some questionable uses of sprintf.
> These are not really of security interest, as local
> mailsplit pathnames are not typically under control of an
> at
There are several static PATH_MAX-sized buffers in
mailsplit, along with some questionable uses of sprintf.
These are not really of security interest, as local
mailsplit pathnames are not typically under control of an
attacker. But it does not hurt to be careful, and as a
bonus we lift some
If we encounter an error while splitting a maildir, we exit
the function early, leaking the open filehandle. This isn't
a big deal, since we exit the program soon after, but it's
easy enough to be careful.
Signed-off-by: Jeff King
---
builtin/mailsplit.c | 5 -
1 file changed, 4 insertions(+
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
Paul Tan writes:
> @@ -111,13 +122,69 @@ static void am_destroy(const struct am_state *state)
> }
>
> /**
> + * Splits out individual patches from `paths`, where each path is either a
> mbox
> + * file or a Maildir. Return 0 on success, -1 on failure.
> + */
"Splits" and then "Return"? Be
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
On Fri, Jun 12, 2015 at 1:45 AM, Stefan Beller wrote:
> On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan wrote:
>> @@ -138,13 +202,33 @@ static void am_next(struct am_state *state)
>> */
>> static void am_run(struct am_state *state)
>> {
>> - while (state->cur <= state->last)
>> + while
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan wrote:
> git-am.sh supports mbox, stgit and mercurial patches. Re-implement
> support for splitting out mbox/maildirs using git-mailsplit, while also
> implementing the framework required to support other patch formats in
> the future.
>
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
On Fri, May 29, 2015 at 7:05 AM, Eric Sunshine wrote:
> On Wed, May 27, 2015 at 9:33 AM, Paul Tan wrote:
>> @@ -128,13 +190,32 @@ static void am_next(struct am_state *state)
>> */
>> +/**
>> + * parse_options() callback that validates and sets opt->value to the
>> + * PATCH_FORMAT_* enum value
On Wed, May 27, 2015 at 9:33 AM, Paul Tan wrote:
> git-am.sh supports mbox, stgit and mercurial patches. Re-implement
> support for splitting out mbox/maildirs using git-mailsplit, while also
> implementing the framework required to support other patch formats in
> the future.
>
git-am.sh supports mbox, stgit and mercurial patches. Re-implement
support for splitting out mbox/maildirs using git-mailsplit, while also
implementing the framework required to support other patch formats in
the future.
Re-implement support for the --patch-format option (since a5a6755
(git-am
The output file hasn't been created at this point, yet, so there is no
need to delete it when exiting early.
Suggested-by: Jeff King
Signed-off-by: Rene Scharfe
---
Original thread: http://thread.gmane.org/gmane.comp.version-control.git/255140
builtin/mailsplit.c | 1 -
1 file changed, 1 delet
52 matches
Mail list logo