Re: [PATCH 1/3] Move git_version_string to help.c before diff changes

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

 



Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx> writes:

> git_version_string lives in git.c. When diff.c starts to use functions
> from help.c, which in turn use git_version_string, linking against
> libgit.a will fail. This is because git_version_string is physically
> located in git.o, and this object file is not part of libgit.a.

But what is wrong about that?

If you are making the termio related code reusable and sharable by turning
the static "term_columns()" in help.o into an external symbol, there is no
reason that termio related function, which is now useful outside the
context of giving help, must stay in help.c where its life happened to
have started.  In fact, "tell me how wide the terminal is" does not belong
to something called "help subsystem", no?

Wouldn't a new file, term.c or something, be a lot more suitable home for
the function you will be reusing from diff and other parts of the system?
--
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]