The strbufs are placed outside read_and_strip_branch as a premature
optimization: when it reads refs/heads/foo to strbuf and wants to
return just foo, it could do so without memory movement. In return
the caller must not use the returned pointer after releasing strbufs,
which own the buffers that
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
---
wt-status.c | 65 -
wt-status.h | 4 ++--
2 files changed, 32 insertions(+), 37 deletions(-)
diff --git a/wt-status.c b/wt-status.c
index ef405d0..6cac27b 100644
---
Nguyễn Thái Ngọc Duy pclo...@gmail.com writes:
Signed-off-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com
You do not have anything to say above the S-o-b line? The primary
effect of this patch is to change the lifespan and ownership rule of
the piece of memory used for state.branch/state.onto and
3 matches
Mail list logo