From: Junio C Hamano Date: Wed, 25 Apr 2018 04:29:05 +0000 (+0900) Subject: Merge branch 'sb/filenames-with-dashes' X-Git-Tag: v2.18.0-rc0~109 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/89e5aa3dff7c83de2c21253d32ed8399f56ab430?ds=inline;hp=-c Merge branch 'sb/filenames-with-dashes' Rename bunch of source files to more consistently use dashes instead of underscores to connect words. * sb/filenames-with-dashes: replace_object.c: rename to use dash in file name sha1_file.c: rename to use dash in file name sha1_name.c: rename to use dash in file name exec_cmd: rename to use dash in file name unicode_width.h: rename to use dash in file name write_or_die.c: rename to use dashes in file name --- 89e5aa3dff7c83de2c21253d32ed8399f56ab430 diff --combined Makefile index 2e198c41dc,7262b7c942..e7191a7e60 --- a/Makefile +++ b/Makefile @@@ -783,7 -783,6 +783,7 @@@ LIB_OBJS += branch. LIB_OBJS += bulk-checkin.o LIB_OBJS += bundle.o LIB_OBJS += cache-tree.o +LIB_OBJS += chdir-notify.o LIB_OBJS += checkout.o LIB_OBJS += color.o LIB_OBJS += column.o @@@ -819,7 -818,7 +819,7 @@@ LIB_OBJS += ewah/bitmap. LIB_OBJS += ewah/ewah_bitmap.o LIB_OBJS += ewah/ewah_io.o LIB_OBJS += ewah/ewah_rlw.o - LIB_OBJS += exec_cmd.o + LIB_OBJS += exec-cmd.o LIB_OBJS += fetch-object.o LIB_OBJS += fetch-pack.o LIB_OBJS += fsck.o @@@ -889,7 -888,7 +889,7 @@@ LIB_OBJS += refs/packed-backend. LIB_OBJS += refs/ref-cache.o LIB_OBJS += ref-filter.o LIB_OBJS += remote.o - LIB_OBJS += replace_object.o + LIB_OBJS += replace-object.o LIB_OBJS += repository.o LIB_OBJS += rerere.o LIB_OBJS += resolve-undo.o @@@ -901,8 -900,8 +901,8 @@@ LIB_OBJS += server-info. LIB_OBJS += setup.o LIB_OBJS += sha1-array.o LIB_OBJS += sha1-lookup.o - LIB_OBJS += sha1_file.o - LIB_OBJS += sha1_name.o + LIB_OBJS += sha1-file.o + LIB_OBJS += sha1-name.o LIB_OBJS += shallow.o LIB_OBJS += sideband.o LIB_OBJS += sigchain.o @@@ -937,7 -936,7 +937,7 @@@ LIB_OBJS += walker. LIB_OBJS += wildmatch.o LIB_OBJS += worktree.o LIB_OBJS += wrapper.o - LIB_OBJS += write_or_die.o + LIB_OBJS += write-or-die.o LIB_OBJS += ws.o LIB_OBJS += wt-status.o LIB_OBJS += xdiff-interface.o @@@ -2156,8 -2155,8 +2156,8 @@@ els $(OBJECTS): $(LIB_H) endif - exec_cmd.sp exec_cmd.s exec_cmd.o: GIT-PREFIX - exec_cmd.sp exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \ + exec-cmd.sp exec-cmd.s exec-cmd.o: GIT-PREFIX + exec-cmd.sp exec-cmd.s exec-cmd.o: EXTRA_CPPFLAGS = \ '-DGIT_EXEC_PATH="$(gitexecdir_SQ)"' \ '-DBINDIR="$(bindir_relative_SQ)"' \ '-DPREFIX="$(prefix_SQ)"' diff --combined config.c index 563853c4be,e2b87b4764..62c56099bf --- a/config.c +++ b/config.c @@@ -9,7 -9,7 +9,7 @@@ #include "config.h" #include "repository.h" #include "lockfile.h" - #include "exec_cmd.h" + #include "exec-cmd.h" #include "strbuf.h" #include "quote.h" #include "hashmap.h" @@@ -1426,7 -1426,6 +1426,7 @@@ static int do_config_from_file(config_f void *data) { struct config_source top; + int ret; top.u.file = f; top.origin_type = origin_type; @@@ -1437,10 -1436,7 +1437,10 @@@ top.do_ungetc = config_file_ungetc; top.do_ftell = config_file_ftell; - return do_config_from(&top, fn, data); + flockfile(f); + ret = do_config_from(&top, fn, data); + funlockfile(f); + return ret; } static int git_config_from_stdin(config_fn_t fn, void *data) @@@ -1455,7 -1451,9 +1455,7 @@@ int git_config_from_file(config_fn_t fn f = fopen_or_warn(filename, "r"); if (f) { - flockfile(f); ret = do_config_from_file(fn, CONFIG_ORIGIN_FILE, filename, filename, f, data); - funlockfile(f); fclose(f); } return ret; diff --combined sequencer.c index a7d31e0525,6d631d25c6..5e3a50fafc --- a/sequencer.c +++ b/sequencer.c @@@ -7,7 -7,7 +7,7 @@@ #include "sequencer.h" #include "tag.h" #include "run-command.h" - #include "exec_cmd.h" + #include "exec-cmd.h" #include "utf8.h" #include "cache-tree.h" #include "diff.h" @@@ -127,7 -127,6 +127,7 @@@ static GIT_PATH_FUNC(rebase_path_rewrit static GIT_PATH_FUNC(rebase_path_gpg_sign_opt, "rebase-merge/gpg_sign_opt") static GIT_PATH_FUNC(rebase_path_orig_head, "rebase-merge/orig-head") static GIT_PATH_FUNC(rebase_path_verbose, "rebase-merge/verbose") +static GIT_PATH_FUNC(rebase_path_signoff, "rebase-merge/signoff") static GIT_PATH_FUNC(rebase_path_head_name, "rebase-merge/head-name") static GIT_PATH_FUNC(rebase_path_onto, "rebase-merge/onto") static GIT_PATH_FUNC(rebase_path_autostash, "rebase-merge/autostash") @@@ -1605,7 -1604,7 +1605,7 @@@ static int do_pick_commit(enum todo_com } } - if (opts->signoff) + if (opts->signoff && !is_fixup(command)) append_signoff(&msgbuf, 0, 0); if (is_rebase_i(opts) && write_author_script(msg.message) < 0) @@@ -2044,11 -2043,6 +2044,11 @@@ static int read_populate_opts(struct re if (file_exists(rebase_path_verbose())) opts->verbose = 1; + if (file_exists(rebase_path_signoff())) { + opts->allow_ff = 0; + opts->signoff = 1; + } + read_strategy_opts(opts, &buf); strbuf_release(&buf); @@@ -3007,7 -3001,7 +3007,7 @@@ int sequencer_make_script(FILE *out, in init_revisions(&revs, NULL); revs.verbose_header = 1; revs.max_parents = 1; - revs.cherry_pick = 1; + revs.cherry_mark = 1; revs.limited = 1; revs.reverse = 1; revs.right_only = 1; @@@ -3032,12 -3026,8 +3032,12 @@@ return error(_("make_script: error preparing revisions")); while ((commit = get_revision(&revs))) { + int is_empty = is_original_commit_empty(commit); + + if (!is_empty && (commit->object.flags & PATCHSAME)) + continue; strbuf_reset(&buf); - if (!keep_empty && is_original_commit_empty(commit)) + if (!keep_empty && is_empty) strbuf_addf(&buf, "%c ", comment_line_char); strbuf_addf(&buf, "%s %s ", insn, oid_to_hex(&commit->object.oid));