Re: Import git log into a spreadsheet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Phillip Susi <psusi@xxxxxxxxxx> writes:

> I'm trying to import a git log into a spreadsheet.  I used a simple
> --pretty=format: switch to select the fields I wanted and separate
> them with commas to generate a CSV file that can be imported.  The
> message body, however, is presenting a problem.  The first problem is
> that it contains newlines itself, which normally signal the start of a
> new record.  It turns out that even when quoting the field, MS Excel
> still fails to import it properly ( good grief MS ), but openoffice
> calc does.  The second problem is that the body itself may contain quotes.
>
> I can't figure out a good way to deal with these quotes.  It seems
> that replacing them with a pair of quotes should make the CSV valid,
> but how can I replace only those quotes internal to the field without
> replacing the quotes that actually bracket it?  Is it possible to have
> git log use a NULL terminator between records instead of a new line?
> Or is there a better way of going about this?

I think --pretty=format: (or --format) gives you a way to specify
the literal NUL.  Also perhaps look at the -z option?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]