git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [patch] fork optional branch point normazilation

From
BRBrad Roberts <braddr@puremagic.com>
Date
Apr 18, 2005, 02:01 UTC
Message-ID
<Pine.LNX.4.44.0504171859410.2625-100000@bellevue.puremagic.com>
In-Reply-To
<Pine.LNX.4.58.0504171806230.7211@ppc970.osdl.org>
The patch needed some tweaking, but not in the way you thought. :)

commit a6aa192641e9ea242332fee4916abf5ad2640d75 tree c69878b009ec2f505d75aa7d99e9ee30cd21ab02 parent 60e1274460f50bcecdc3f162b4fced9e5ebf2dfb author Brad Roberts <braddr@puremagic.com> 1113789519 -0700 committer Brad Roberts <braddr@gameboy2> 1113789519 -0700

Fix remove_specials for real. The second half logic needs the original head of the string.

Signed-off-by: Brad Roberts <braddr@puremagic.com>
Index: commit-tree.c
===================================================================
--- 02cf6917da6297ff4f9172f7af174ba329f01b3d/commit-tree.c  (mode:100644 sha1:ec53a4565ec0033aaf6df2a48d233ccf4823e8b0)
+++ c69878b009ec2f505d75aa7d99e9ee30cd21ab02/commit-tree.c  (mode:100644 sha1:f41cda6f9496b9e33cb95305ef1093f846c663ae)
@@ -83,11 +83,11 @@
 static void remove_special(char *p)
 {
        char c;
-       char *dst = p;
+       char *dst = p, *src = p;

        for (;;) {
-               c = *p;
-               p++;
+               c = *src;
+               src++;
                switch(c) {
                case '\n': case '<': case '>':
                        continue;


Later,
Brad
Previous: Junio C HamanoNext: Martin Schlemmer
Message 11 of 12 in “fork optional branch point normazilation”
  1. fork optional branch point normazilationBrad Roberts, Apr 17, 2005
  2. Petr BaudisApr 17, 2005
  3. Brad RobertsApr 17, 2005
  4. Linus TorvaldsApr 17, 2005
  5. Daniel BarkalowApr 17, 2005
  6. Brad RobertsApr 17, 2005
  7. Linus TorvaldsApr 17, 2005
  8. Petr BaudisApr 18, 2005
  9. Linus TorvaldsApr 18, 2005
  10. remove_special() tentative fix.Junio C Hamano, Apr 18, 2005
  11. Brad RobertsApr 18, 2005
  12. Martin SchlemmerApr 18, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.