@matheusbsbs / matheus-bagliano / commits / 83aa18eade
Fork 0

Fix "git help -a" terminal autosizing

When I split out the builtin commands into their own files, I left the include of <sys/ioctl.h> in git.c rather than moving it to the file that needed it (builtin-help.c). Nobody seems to have noticed, because everything still worked, but because the TIOCGWINSZ macro was now no longer defined when compiling the "term_columns()" function, it would no longer automatically notice the terminal size unless your system used the ancient "COLUMNS" environment variable approach. Trivially fixed by just moving the header include to the file that actually needs it. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Linus Torvalds committed Apr 27, 2006 at 09:02 UTC 83aa18eade572679319406d6dc12a81599a4d57e
2 files changed +1 -1
builtin-help.c
+1
@@ -3,6 +3,7 @@
3 *
4 * Builtin help-related commands (help, usage, version)
5 */
6 +#include <sys/ioctl.h>
7 #include "cache.h"
8 #include "builtin.h"
9 #include "exec_cmd.h"
git.c
-1
@@ -8,7 +8,6 @@
8 #include <errno.h>
9 #include <limits.h>
10 #include <stdarg.h>
11 -#include <sys/ioctl.h>
11 #include "git-compat-util.h"
12 #include "exec_cmd.h"
13