Skip to content

Commit

Permalink
Fix "git help -a" terminal autosizing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Linus Torvalds authored and Junio C Hamano committed Apr 27, 2006
1 parent 61678d8 commit 83aa18e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions builtin-help.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* Builtin help-related commands (help, usage, version)
*/
#include <sys/ioctl.h>
#include "cache.h"
#include "builtin.h"
#include "exec_cmd.h"
Expand Down
1 change: 0 additions & 1 deletion git.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <errno.h>
#include <limits.h>
#include <stdarg.h>
#include <sys/ioctl.h>
#include "git-compat-util.h"
#include "exec_cmd.h"

Expand Down

0 comments on commit 83aa18e

Please sign in to comment.