@matheusbsbs / matheus-bagliano / commits / 81b50f3ce4
Fork 0

Move 'builtin-*' into a 'builtin/' subdirectory

This shrinks the top-level directory a bit, and makes it much more pleasant to use auto-completion on the thing. Instead of [torvalds@nehalem git]$ em buil<tab> Display all 180 possibilities? (y or n) [torvalds@nehalem git]$ em builtin-sh builtin-shortlog.c builtin-show-branch.c builtin-show-ref.c builtin-shortlog.o builtin-show-branch.o builtin-show-ref.o [torvalds@nehalem git]$ em builtin-shor<tab> builtin-shortlog.c builtin-shortlog.o [torvalds@nehalem git]$ em builtin-shortlog.c you get [torvalds@nehalem git]$ em buil<tab> [type] builtin/ builtin.h [torvalds@nehalem git]$ em builtin [auto-completes to] [torvalds@nehalem git]$ em builtin/sh<tab> [type] shortlog.c shortlog.o show-branch.c show-branch.o show-ref.c show-ref.o [torvalds@nehalem git]$ em builtin/sho [auto-completes to] [torvalds@nehalem git]$ em builtin/shor<tab> [type] shortlog.c shortlog.o [torvalds@nehalem git]$ em builtin/shortlog.c which doesn't seem all that different, but not having that annoying break in "Display all 180 possibilities?" is quite a relief. NOTE! If you do this in a clean tree (no object files etc), or using an editor that has auto-completion rules that ignores '*.o' files, you won't see that annoying 'Display all 180 possibilities?' message - it will just show the choices instead. I think bash has some cut-off around 100 choices or something. So the reason I see this is that I'm using an odd editory, and thus don't have the rules to cut down on auto-completion. But you can simulate that by using 'ls' instead, or something similar. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Linus Torvalds committed Feb 22, 2010 at 08:42 UTC 81b50f3ce40bfdd66e5d967bf82be001039a9a98
90 files changed +97 -97
Makefile
+97 -97
@@ -301,7 +301,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
301 # Those must not be GNU-specific; they are shared with perl/ which may
302 # be built by a different compiler. (Note that this is an artifact now
303 # but it still might be nice to keep that distinction.)
304 -BASIC_CFLAGS =
304 +BASIC_CFLAGS = -I.
305 BASIC_LDFLAGS =
306
307 # Guard against environment variables
@@ -370,8 +370,8 @@ PROGRAMS += git-upload-pack$X
370 PROGRAMS += git-http-backend$X
371
372 # List built-in command $C whose implementation cmd_$C() is not in
373 -# builtin-$C.o but is linked in as part of some other command.
374 -BUILT_INS += $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
373 +# builtin/$C.o but is linked in as part of some other command.
374 +BUILT_INS += $(patsubst builtin/%.o,git-%$X,$(BUILTIN_OBJS))
375
376 BUILT_INS += git-cherry$X
377 BUILT_INS += git-cherry-pick$X
@@ -594,95 +594,95 @@ LIB_OBJS += ws.o
594 LIB_OBJS += wt-status.o
595 LIB_OBJS += xdiff-interface.o
596
597 -BUILTIN_OBJS += builtin-add.o
598 -BUILTIN_OBJS += builtin-annotate.o
599 -BUILTIN_OBJS += builtin-apply.o
600 -BUILTIN_OBJS += builtin-archive.o
601 -BUILTIN_OBJS += builtin-bisect--helper.o
602 -BUILTIN_OBJS += builtin-blame.o
603 -BUILTIN_OBJS += builtin-branch.o
604 -BUILTIN_OBJS += builtin-bundle.o
605 -BUILTIN_OBJS += builtin-cat-file.o
606 -BUILTIN_OBJS += builtin-check-attr.o
607 -BUILTIN_OBJS += builtin-check-ref-format.o
608 -BUILTIN_OBJS += builtin-checkout-index.o
609 -BUILTIN_OBJS += builtin-checkout.o
610 -BUILTIN_OBJS += builtin-clean.o
611 -BUILTIN_OBJS += builtin-clone.o
612 -BUILTIN_OBJS += builtin-commit-tree.o
613 -BUILTIN_OBJS += builtin-commit.o
614 -BUILTIN_OBJS += builtin-config.o
615 -BUILTIN_OBJS += builtin-count-objects.o
616 -BUILTIN_OBJS += builtin-describe.o
617 -BUILTIN_OBJS += builtin-diff-files.o
618 -BUILTIN_OBJS += builtin-diff-index.o
619 -BUILTIN_OBJS += builtin-diff-tree.o
620 -BUILTIN_OBJS += builtin-diff.o
621 -BUILTIN_OBJS += builtin-fast-export.o
622 -BUILTIN_OBJS += builtin-fetch-pack.o
623 -BUILTIN_OBJS += builtin-fetch.o
624 -BUILTIN_OBJS += builtin-fmt-merge-msg.o
625 -BUILTIN_OBJS += builtin-for-each-ref.o
626 -BUILTIN_OBJS += builtin-fsck.o
627 -BUILTIN_OBJS += builtin-gc.o
628 -BUILTIN_OBJS += builtin-grep.o
629 -BUILTIN_OBJS += builtin-hash-object.o
630 -BUILTIN_OBJS += builtin-help.o
631 -BUILTIN_OBJS += builtin-index-pack.o
632 -BUILTIN_OBJS += builtin-init-db.o
633 -BUILTIN_OBJS += builtin-log.o
634 -BUILTIN_OBJS += builtin-ls-files.o
635 -BUILTIN_OBJS += builtin-ls-remote.o
636 -BUILTIN_OBJS += builtin-ls-tree.o
637 -BUILTIN_OBJS += builtin-mailinfo.o
638 -BUILTIN_OBJS += builtin-mailsplit.o
639 -BUILTIN_OBJS += builtin-merge.o
640 -BUILTIN_OBJS += builtin-merge-base.o
641 -BUILTIN_OBJS += builtin-merge-file.o
642 -BUILTIN_OBJS += builtin-merge-index.o
643 -BUILTIN_OBJS += builtin-merge-ours.o
644 -BUILTIN_OBJS += builtin-merge-recursive.o
645 -BUILTIN_OBJS += builtin-merge-tree.o
646 -BUILTIN_OBJS += builtin-mktag.o
647 -BUILTIN_OBJS += builtin-mktree.o
648 -BUILTIN_OBJS += builtin-mv.o
649 -BUILTIN_OBJS += builtin-name-rev.o
650 -BUILTIN_OBJS += builtin-pack-objects.o
651 -BUILTIN_OBJS += builtin-pack-redundant.o
652 -BUILTIN_OBJS += builtin-pack-refs.o
653 -BUILTIN_OBJS += builtin-patch-id.o
654 -BUILTIN_OBJS += builtin-prune-packed.o
655 -BUILTIN_OBJS += builtin-prune.o
656 -BUILTIN_OBJS += builtin-push.o
657 -BUILTIN_OBJS += builtin-read-tree.o
658 -BUILTIN_OBJS += builtin-receive-pack.o
659 -BUILTIN_OBJS += builtin-reflog.o
660 -BUILTIN_OBJS += builtin-remote.o
661 -BUILTIN_OBJS += builtin-replace.o
662 -BUILTIN_OBJS += builtin-rerere.o
663 -BUILTIN_OBJS += builtin-reset.o
664 -BUILTIN_OBJS += builtin-rev-list.o
665 -BUILTIN_OBJS += builtin-rev-parse.o
666 -BUILTIN_OBJS += builtin-revert.o
667 -BUILTIN_OBJS += builtin-rm.o
668 -BUILTIN_OBJS += builtin-send-pack.o
669 -BUILTIN_OBJS += builtin-shortlog.o
670 -BUILTIN_OBJS += builtin-show-branch.o
671 -BUILTIN_OBJS += builtin-show-ref.o
672 -BUILTIN_OBJS += builtin-stripspace.o
673 -BUILTIN_OBJS += builtin-symbolic-ref.o
674 -BUILTIN_OBJS += builtin-tag.o
675 -BUILTIN_OBJS += builtin-tar-tree.o
676 -BUILTIN_OBJS += builtin-unpack-file.o
677 -BUILTIN_OBJS += builtin-unpack-objects.o
678 -BUILTIN_OBJS += builtin-update-index.o
679 -BUILTIN_OBJS += builtin-update-ref.o
680 -BUILTIN_OBJS += builtin-update-server-info.o
681 -BUILTIN_OBJS += builtin-upload-archive.o
682 -BUILTIN_OBJS += builtin-var.o
683 -BUILTIN_OBJS += builtin-verify-pack.o
684 -BUILTIN_OBJS += builtin-verify-tag.o
685 -BUILTIN_OBJS += builtin-write-tree.o
597 +BUILTIN_OBJS += builtin/add.o
598 +BUILTIN_OBJS += builtin/annotate.o
599 +BUILTIN_OBJS += builtin/apply.o
600 +BUILTIN_OBJS += builtin/archive.o
601 +BUILTIN_OBJS += builtin/bisect--helper.o
602 +BUILTIN_OBJS += builtin/blame.o
603 +BUILTIN_OBJS += builtin/branch.o
604 +BUILTIN_OBJS += builtin/bundle.o
605 +BUILTIN_OBJS += builtin/cat-file.o
606 +BUILTIN_OBJS += builtin/check-attr.o
607 +BUILTIN_OBJS += builtin/check-ref-format.o
608 +BUILTIN_OBJS += builtin/checkout-index.o
609 +BUILTIN_OBJS += builtin/checkout.o
610 +BUILTIN_OBJS += builtin/clean.o
611 +BUILTIN_OBJS += builtin/clone.o
612 +BUILTIN_OBJS += builtin/commit-tree.o
613 +BUILTIN_OBJS += builtin/commit.o
614 +BUILTIN_OBJS += builtin/config.o
615 +BUILTIN_OBJS += builtin/count-objects.o
616 +BUILTIN_OBJS += builtin/describe.o
617 +BUILTIN_OBJS += builtin/diff-files.o
618 +BUILTIN_OBJS += builtin/diff-index.o
619 +BUILTIN_OBJS += builtin/diff-tree.o
620 +BUILTIN_OBJS += builtin/diff.o
621 +BUILTIN_OBJS += builtin/fast-export.o
622 +BUILTIN_OBJS += builtin/fetch-pack.o
623 +BUILTIN_OBJS += builtin/fetch.o
624 +BUILTIN_OBJS += builtin/fmt-merge-msg.o
625 +BUILTIN_OBJS += builtin/for-each-ref.o
626 +BUILTIN_OBJS += builtin/fsck.o
627 +BUILTIN_OBJS += builtin/gc.o
628 +BUILTIN_OBJS += builtin/grep.o
629 +BUILTIN_OBJS += builtin/hash-object.o
630 +BUILTIN_OBJS += builtin/help.o
631 +BUILTIN_OBJS += builtin/index-pack.o
632 +BUILTIN_OBJS += builtin/init-db.o
633 +BUILTIN_OBJS += builtin/log.o
634 +BUILTIN_OBJS += builtin/ls-files.o
635 +BUILTIN_OBJS += builtin/ls-remote.o
636 +BUILTIN_OBJS += builtin/ls-tree.o
637 +BUILTIN_OBJS += builtin/mailinfo.o
638 +BUILTIN_OBJS += builtin/mailsplit.o
639 +BUILTIN_OBJS += builtin/merge.o
640 +BUILTIN_OBJS += builtin/merge-base.o
641 +BUILTIN_OBJS += builtin/merge-file.o
642 +BUILTIN_OBJS += builtin/merge-index.o
643 +BUILTIN_OBJS += builtin/merge-ours.o
644 +BUILTIN_OBJS += builtin/merge-recursive.o
645 +BUILTIN_OBJS += builtin/merge-tree.o
646 +BUILTIN_OBJS += builtin/mktag.o
647 +BUILTIN_OBJS += builtin/mktree.o
648 +BUILTIN_OBJS += builtin/mv.o
649 +BUILTIN_OBJS += builtin/name-rev.o
650 +BUILTIN_OBJS += builtin/pack-objects.o
651 +BUILTIN_OBJS += builtin/pack-redundant.o
652 +BUILTIN_OBJS += builtin/pack-refs.o
653 +BUILTIN_OBJS += builtin/patch-id.o
654 +BUILTIN_OBJS += builtin/prune-packed.o
655 +BUILTIN_OBJS += builtin/prune.o
656 +BUILTIN_OBJS += builtin/push.o
657 +BUILTIN_OBJS += builtin/read-tree.o
658 +BUILTIN_OBJS += builtin/receive-pack.o
659 +BUILTIN_OBJS += builtin/reflog.o
660 +BUILTIN_OBJS += builtin/remote.o
661 +BUILTIN_OBJS += builtin/replace.o
662 +BUILTIN_OBJS += builtin/rerere.o
663 +BUILTIN_OBJS += builtin/reset.o
664 +BUILTIN_OBJS += builtin/rev-list.o
665 +BUILTIN_OBJS += builtin/rev-parse.o
666 +BUILTIN_OBJS += builtin/revert.o
667 +BUILTIN_OBJS += builtin/rm.o
668 +BUILTIN_OBJS += builtin/send-pack.o
669 +BUILTIN_OBJS += builtin/shortlog.o
670 +BUILTIN_OBJS += builtin/show-branch.o
671 +BUILTIN_OBJS += builtin/show-ref.o
672 +BUILTIN_OBJS += builtin/stripspace.o
673 +BUILTIN_OBJS += builtin/symbolic-ref.o
674 +BUILTIN_OBJS += builtin/tag.o
675 +BUILTIN_OBJS += builtin/tar-tree.o
676 +BUILTIN_OBJS += builtin/unpack-file.o
677 +BUILTIN_OBJS += builtin/unpack-objects.o
678 +BUILTIN_OBJS += builtin/update-index.o
679 +BUILTIN_OBJS += builtin/update-ref.o
680 +BUILTIN_OBJS += builtin/update-server-info.o
681 +BUILTIN_OBJS += builtin/upload-archive.o
682 +BUILTIN_OBJS += builtin/var.o
683 +BUILTIN_OBJS += builtin/verify-pack.o
684 +BUILTIN_OBJS += builtin/verify-tag.o
685 +BUILTIN_OBJS += builtin/write-tree.o
686
687 GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
688 EXTLIBS =
@@ -1447,8 +1447,8 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
1447 $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
1448 $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
1449
1450 -builtin-help.o: common-cmds.h
1451 -builtin-help.s builtin-help.o: ALL_CFLAGS += \
1450 +builtin/help.o: common-cmds.h
1451 +builtin/help.s builtin/help.o: ALL_CFLAGS += \
1452 '-DGIT_HTML_PATH="$(htmldir_SQ)"' \
1453 '-DGIT_MAN_PATH="$(mandir_SQ)"' \
1454 '-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1604,7 +1604,7 @@ exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
1604 '-DBINDIR="$(bindir_relative_SQ)"' \
1605 '-DPREFIX="$(prefix_SQ)"'
1606
1607 -builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
1607 +builtin/init-db.s builtin/init-db.o: ALL_CFLAGS += \
1608 -DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
1609
1610 config.s config.o: ALL_CFLAGS += -DETC_GITCONFIG='"$(ETC_GITCONFIG_SQ)"'
@@ -1646,7 +1646,7 @@ $(REMOTE_CURL_PRIMARY): remote-curl.o http.o http-walker.o $(GITLIBS)
1646
1647 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
1648 $(patsubst git-%$X,%.o,$(PROGRAMS)) git.o: $(LIB_H) $(wildcard */*.h)
1649 -builtin-revert.o wt-status.o: wt-status.h
1649 +builtin/revert.o wt-status.o: wt-status.h
1650
1651 $(LIB_FILE): $(LIB_OBJS)
1652 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
@@ -1934,7 +1934,7 @@ distclean: clean
1934
1935 clean:
1936 $(RM) *.o block-sha1/*.o ppc/*.o compat/*.o compat/*/*.o xdiff/*.o \
1937 - $(LIB_FILE) $(XDIFF_LIB)
1937 + builtin/*.o $(LIB_FILE) $(XDIFF_LIB)
1938 $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
1939 $(RM) $(TEST_PROGRAMS)
1940 $(RM) -r bin-wrappers
builtin/add.c renamed
builtin/annotate.c renamed
builtin/apply.c renamed
builtin/archive.c renamed
builtin/bisect--helper.c renamed
builtin/blame.c renamed
builtin/branch.c renamed
builtin/bundle.c renamed
builtin/cat-file.c renamed
builtin/check-attr.c renamed
builtin/check-ref-format.c renamed
builtin/checkout-index.c renamed
builtin/checkout.c renamed
builtin/clean.c renamed
builtin/clone.c renamed
builtin/commit-tree.c renamed
builtin/commit.c renamed
builtin/config.c renamed
builtin/count-objects.c renamed
builtin/describe.c renamed
builtin/diff-files.c renamed
builtin/diff-index.c renamed
builtin/diff-tree.c renamed
builtin/diff.c renamed
builtin/fast-export.c renamed
builtin/fetch-pack.c renamed
builtin/fetch.c renamed
builtin/fmt-merge-msg.c renamed
builtin/for-each-ref.c renamed
builtin/fsck.c renamed
builtin/gc.c renamed
builtin/grep.c renamed
builtin/hash-object.c renamed
builtin/help.c renamed
builtin/index-pack.c renamed
builtin/init-db.c renamed
builtin/log.c renamed
builtin/ls-files.c renamed
builtin/ls-remote.c renamed
builtin/ls-tree.c renamed
builtin/mailinfo.c renamed
builtin/mailsplit.c renamed
builtin/merge-base.c renamed
builtin/merge-file.c renamed
builtin/merge-index.c renamed
builtin/merge-ours.c renamed
builtin/merge-recursive.c renamed
builtin/merge-tree.c renamed
builtin/merge.c renamed
builtin/mktag.c renamed
builtin/mktree.c renamed
builtin/mv.c renamed
builtin/name-rev.c renamed
builtin/pack-objects.c renamed
builtin/pack-redundant.c renamed
builtin/pack-refs.c renamed
builtin/patch-id.c renamed
builtin/prune-packed.c renamed
builtin/prune.c renamed
builtin/push.c renamed
builtin/read-tree.c renamed
builtin/receive-pack.c renamed
builtin/reflog.c renamed
builtin/remote.c renamed
builtin/replace.c renamed
builtin/rerere.c renamed
builtin/reset.c renamed
builtin/rev-list.c renamed
builtin/rev-parse.c renamed
builtin/revert.c renamed
builtin/rm.c renamed
builtin/send-pack.c renamed
builtin/shortlog.c renamed
builtin/show-branch.c renamed
builtin/show-ref.c renamed
builtin/stripspace.c renamed
builtin/symbolic-ref.c renamed
builtin/tag.c renamed
builtin/tar-tree.c renamed
builtin/unpack-file.c renamed
builtin/unpack-objects.c renamed
builtin/update-index.c renamed
builtin/update-ref.c renamed
builtin/update-server-info.c renamed
builtin/upload-archive.c renamed
builtin/var.c renamed
builtin/verify-pack.c renamed
builtin/verify-tag.c renamed
builtin/write-tree.c renamed