From: William Chargin <firstname.lastname@example.org> To: Christian Couder <email@example.com> Cc: Git Mailing List <firstname.lastname@example.org> Subject: Re: Parsing trailers Date: Wed, 26 Dec 2018 13:30:36 -0800 [thread overview] Message-ID: <CAFW+GMCP4_gce32Mhwn2Zf8DbH2YrJG4HhnLwV73+LcpQGWBPg@mail.gmail.com> (raw) In-Reply-To: <CAP8UFD2A1tX9qPZXr8ibPhy0B1zc5OtsWzP_XHoRJJF6hmkxRQ@mail.gmail.com> > Yeah, but you can perhaps check that the input doesn't contain '|' > before doing the above. If it does contain '|' then you can probably > find another char that it doesn't contain and use that char instead of > '|'. This sounds true in the usual case, though of course there are pathological cases of commit messages that use the entire character set. But it is starting to sound more complicated than the slightly-tricky whitespace indexing logic from my original message. > Another solution would be to develop a trailer.outputseparator config > option, which should not be very difficult. Yes, something like this would be a nice addition for future versions of Git. Perhaps simpler would be to add a `-z` option to interpret-trailers that would change the output format to <tok>NUL<val>NUL or similar. Maybe I’ll send out a patch if I find some free time. :-) Best, WC On Tue, Dec 25, 2018 at 8:33 PM Christian Couder <email@example.com> wrote: > > Hi William, > > On Mon, Dec 24, 2018 at 7:52 PM William Chargin <firstname.lastname@example.org> wrote: > > > > Hi Christian: thanks for your reply. > > > > > Changing the default separator as shown above, should make it easier > > > to parse the result. > > > > But this actually also changes which lines are considered trailers, > > right? > > Yes. > > > If the commit message ends with > > > > Signed-off-by: one > > Signed-off-by| two > > > > and the user’s `trailer.separators` is set to `:`, then the correct > > result should be only `Signed-off-by: one`. But when adding `|` as a > > separator, we also see `Signed-off-by: two` in the result. > > Yeah, but you can perhaps check that the input doesn't contain '|' > before doing the above. If it does contain '|' then you can probably > find another char that it doesn't contain and use that char instead of > '|'. > > Another solution would be to develop a trailer.outputseparator config > option, which should not be very difficult. > > Best, > Christian.
next prev parent reply other threads:[~2018-12-26 21:31 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-12-23 22:41 William Chargin 2018-12-24 10:58 ` Christian Couder 2018-12-24 18:52 ` William Chargin 2018-12-26 4:33 ` Christian Couder 2018-12-26 21:30 ` William Chargin [this message] 2019-01-03 7:07 ` Jeff King 2019-01-03 7:43 ` William Chargin 2019-01-03 7:50 ` Jeff King
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAFW+GMCP4_gce32Mhwn2Zf8DbH2YrJG4HhnLwV73+LcpQGWBPg@mail.gmail.com \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: Parsing trailers' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
firstname.lastname@example.org list mirror (unofficial, one of many) This inbox may be cloned and mirrored by anyone: git clone --mirror https://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V1 git git/ https://public-inbox.org/git \ email@example.com public-inbox-index git Example config snippet for mirrors. Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git nntp://news.gmane.io/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git AGPL code for this site: git clone https://public-inbox.org/public-inbox.git