Re: [PATCH v2 6/8] status: print branch info with --porcelain=v2 --branch

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

 



Jeff Hostetler <jeffhost@xxxxxxxxxxxxx> writes:

>  /*
> + * Print branch and tracking header for porcelain v2 output.
> + * This is printed when the '--branch' parameter is given.
> + *
> + *    "## branch: <commit> <head>[ <upstream>[ +<ahead> -<behind>]]<eol>"

Just FYI, the only reason why the original "short" output gives this
information on a single line with ## is because it was added as an
afterthought to then-existing short/porcelain format that used two
letter prefix and one-line-per-path format, and the expectation was
that the existing parsers for the output would ignore unknown status
letters (namely "##").  Because you are inventing a new format that
needs to be parsed by a brand new parser _anyway_, you do not have
to mimic that old convention which was a workaround, and use a
notation that mixes better with the other lines you show under
the --porcelain=v2 option.

Of course if you like "## branch:" output and think it is pleasing
to see, that is fine as well.
--
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]