Skip to content

Commit 81b50f3

Browse files
torvaldsgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 241b925 commit 81b50f3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+97
-97
lines changed

Makefile

Lines changed: 97 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
301301
# Those must not be GNU-specific; they are shared with perl/ which may
302302
# be built by a different compiler. (Note that this is an artifact now
303303
# but it still might be nice to keep that distinction.)
304-
BASIC_CFLAGS =
304+
BASIC_CFLAGS = -I.
305305
BASIC_LDFLAGS =
306306

307307
# Guard against environment variables
@@ -370,8 +370,8 @@ PROGRAMS += git-upload-pack$X
370370
PROGRAMS += git-http-backend$X
371371

372372
# 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))
375375

376376
BUILT_INS += git-cherry$X
377377
BUILT_INS += git-cherry-pick$X
@@ -594,95 +594,95 @@ LIB_OBJS += ws.o
594594
LIB_OBJS += wt-status.o
595595
LIB_OBJS += xdiff-interface.o
596596

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
686686

687687
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
688688
EXTLIBS =
@@ -1447,8 +1447,8 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
14471447
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
14481448
$(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
14491449

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 += \
14521452
'-DGIT_HTML_PATH="$(htmldir_SQ)"' \
14531453
'-DGIT_MAN_PATH="$(mandir_SQ)"' \
14541454
'-DGIT_INFO_PATH="$(infodir_SQ)"'
@@ -1604,7 +1604,7 @@ exec_cmd.s exec_cmd.o: ALL_CFLAGS += \
16041604
'-DBINDIR="$(bindir_relative_SQ)"' \
16051605
'-DPREFIX="$(prefix_SQ)"'
16061606

1607-
builtin-init-db.s builtin-init-db.o: ALL_CFLAGS += \
1607+
builtin/init-db.s builtin/init-db.o: ALL_CFLAGS += \
16081608
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"'
16091609

16101610
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)
16461646

16471647
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
16481648
$(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
16501650

16511651
$(LIB_FILE): $(LIB_OBJS)
16521652
$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
@@ -1934,7 +1934,7 @@ distclean: clean
19341934

19351935
clean:
19361936
$(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)
19381938
$(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X
19391939
$(RM) $(TEST_PROGRAMS)
19401940
$(RM) -r bin-wrappers
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)