pretty describe: move library functions to the new file describe.c
PATCH 3/5 pretty describe: move library functions to the new file describe.c
load_commit_names(), describe_commit() et. al. are moved out to their own file and properly exported. There are no code changes inside the functions.
Signed-off-by Rene Scharfe <[email protected]>
--- Makefile | 2 +- builtin-describe.c | 202 --------------------------------------------------- cache.h | 5 ++ describe.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+), 203 deletions(-) create mode 100644 describe.c
Makefile +1 -1
@@ -312,7 +312,7 @@ LIB_OBJS = \ alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \ color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \ convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \ - transport.o bundle.o walker.o parse-options.o + transport.o bundle.o walker.o parse-options.o describe.o BUILTIN_OBJS = \ builtin-add.o \
builtin-describe.c +0 -202
217 lines not on this page · raw message
cache.h +5 -0
@@ -602,4 +602,9 @@ extern int diff_auto_refresh_index;/* match-trees.c */ void shift_tree (const unsigned char *,const unsigned char *,unsigned char *,int ); +/* describe.c */ +struct commit ; +extern void load_commit_names (int min_prio); +extern char *describe_commit (struct commit *cmit,int max_candidates,int debug,int *depthp); +#endif /* CACHE_H */
describe.c new file +204 -0
204 lines not on this page · raw message
Signature · 1 line
1.5.3.5.529.ge3d6d
Hi,
Quoted 6 lines · Ren? Scharfe
Makefile | 2 +- builtin-describe.c | 202 --------------------------------------------------- cache.h | 5 ++ describe.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+), 203 deletions(-) create mode 100644 describe.c
Would not "format-patch -C -C" have given a nicer output?
Ciao,
Dscho
Quoted 4 lines · Johannes Schindelin
Hi,
On Sun, 4 Nov 2007, Ren? Scharfe wrote:
Quoted 8 lines
Quoted 6 lines
Makefile | 2 +- builtin-describe.c | 202 --------------------------------------------------- cache.h | 5 ++ describe.c | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 210 insertions(+), 203 deletions(-) create mode 100644 describe.cWould not "format-patch -C -C" have given a nicer output?
Yes, it would have been shorter, but it looks a bit strange, because it's deleting stuff from the new file describe.c (i.e. all the things left in builtin-describe.c):
Makefile | 2 +- builtin-describe.c | 202 -------------------------------------- cache.h | 5 + builtin-describe.c => describe.c | 85 ---------------- 4 files changed, 6 insertions(+), 288 deletions(-) copy builtin-describe.c => describe.c (66%)
That's 367 lines of patch + stat vs. 470 lines for the one I sent. Will use next time.
Thanks,
René