Re: [PATCH] Add --show-size to git log to print message size

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

 



On 7/15/07, Sean <seanlkml@xxxxxxxxxxxx> wrote:

characters are guaranteed to appear somewhere else.  Your current
test will fail if a "c" happens to follow NUL in the patch text.


Yes sir, I agree with you 100%

The real issue IMHO is that a 'delimiting character' should not appear
in the content that it is trying to delimit. That's all the point
around this thing. If a real 'delimiting character' does not exist
because the content is free perhaps we should find a way to understand
when we are at revision boundaries. The simplest (and most efficient)
way is to know the size of the message in advance.

Also if git log filters out the '\0' chars in the content it is
suboptimal because we could miss to see we have a '\0' in content. BTW
the above mentioned patch in Linux tree was all around removing that
garbage '\0'. If diff output was filtered out perhaps the author could
have missed that patch opportunity.

Marco

BTW, perhaps I'm retarded, but I fail to see what to search for with ^\0.

As example if I have this output:


   Signed-off-by: Steven Whitehouse <swhiteho@xxxxxxxxxx>

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index fd3fd90..36c523d 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -444,7 +444,6 @@ static int compute_bitstructs(struct gfs2_rgrpd *rgd)
}

/**
-^@
 * gfs2_ri_total - Total up the file system space, according to the rindex.
 *
 */
^@commit 8fb68595d508fd30ec90939572484b263600376c
fad59c1390045b5adb7c7249ec4e77e0f868aca5
tree 218a457675c111e2224fb57998d38e45d5786bd1
parent fad59c1390045b5adb7c7249ec4e77e0f868aca5


What should I search for to find the revision boundary? "\n\0" ? is
this that you mean with ^\0
-
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]

  Powered by Linux