Sync with master
diff --git a/Documentation/RelNotes/2.31.0.txt b/Documentation/RelNotes/2.31.0.txt
index ef8b0d1..04bd5b7 100644
--- a/Documentation/RelNotes/2.31.0.txt
+++ b/Documentation/RelNotes/2.31.0.txt
@@ -197,6 +197,31 @@
* The code to implement "git merge-base --independent" was poorly
done and was kept from the very beginning of the feature.
+ * Preliminary changes to fsmonitor integration.
+
+ * Performance optimization work on the rename detection continues.
+
+ * The common code to deal with "chunked file format" that is shared
+ by the multi-pack-index and commit-graph files have been factored
+ out, to help codepaths for both filetypes to become more robust.
+
+ * The approach to "fsck" the incoming objects in "index-pack" is
+ attractive for performance reasons (we have them already in core,
+ inflated and ready to be inspected), but fundamentally cannot be
+ applied fully when we receive more than one pack stream, as a tree
+ object in one pack may refer to a blob object in another pack as
+ ".gitmodules", when we want to inspect blobs that are used as
+ ".gitmodules" file, for example. Teach "index-pack" to emit
+ objects that must be inspected later and check them in the calling
+ "fetch-pack" process.
+
+ * The logic to handle "trailer" related placeholders in the
+ "--format=" mechanisms in the "log" family and "for-each-ref"
+ family is getting unified.
+
+ * Raise the buffer size used when writing the index file out from
+ (obviously too small) 8kB to (clearly sufficiently large) 128kB.
+
Fixes since v2.30
-----------------
@@ -318,6 +343,12 @@
corrected.
(merge 20e416409f jc/push-delete-nothing later to maint).
+ * Test script modernization.
+ (merge 488acf15df sv/t7001-modernize later to maint).
+
+ * An under-allocation for the untracked cache data has been corrected.
+ (merge 6347d649bc jh/untracked-cache-fix later to maint).
+
* Other code cleanup, docfix, build fix, etc.
(merge e3f5da7e60 sg/t7800-difftool-robustify later to maint).
(merge 9d336655ba js/doc-proto-v2-response-end later to maint).
diff --git a/commit-graph.c b/commit-graph.c
index ee69a8a..a2498c2 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -221,24 +221,16 @@
if (read_replace_refs) {
prepare_replace_object(r);
- if (hashmap_get_size(&r->objects->replace_map->map)) {
- warning(_("repository contains replace objects; "
- "skipping commit-graph"));
+ if (hashmap_get_size(&r->objects->replace_map->map))
return 0;
- }
}
prepare_commit_graft(r);
if (r->parsed_objects &&
- (r->parsed_objects->grafts_nr || r->parsed_objects->substituted_parent)) {
- warning(_("repository contains (deprecated) grafts; "
- "skipping commit-graph"));
+ (r->parsed_objects->grafts_nr || r->parsed_objects->substituted_parent))
return 0;
- }
- if (is_repository_shallow(r)) {
- warning(_("repository is shallow; skipping commit-graph"));
+ if (is_repository_shallow(r))
return 0;
- }
return 1;
}
diff --git a/git-gui/git-gui.sh b/git-gui/git-gui.sh
index 201524c..236bc4e 100755
--- a/git-gui/git-gui.sh
+++ b/git-gui/git-gui.sh
@@ -875,6 +875,7 @@
set default_config(merge.verbosity) 2
set default_config(user.name) {}
set default_config(user.email) {}
+set default_config(core.commentchar) "#"
set default_config(gui.encoding) [encoding system]
set default_config(gui.matchtrackingbranch) false
@@ -3436,6 +3437,10 @@
merge {set txt [mc "Merge Commit Message:"]}
* {set txt [mc "Commit Message:"]}
}
+
+ set comment_char [get_config core.commentchar]
+ set txt [string cat $txt \
+ [mc " (Lines starting with '$comment_char' will be ignored)"]]
$ui_coml conf -text $txt
}
trace add variable commit_type write trace_commit_type
diff --git a/git-gui/lib/commit.tcl b/git-gui/lib/commit.tcl
index 11379f8..23d67d4 100644
--- a/git-gui/lib/commit.tcl
+++ b/git-gui/lib/commit.tcl
@@ -141,6 +141,20 @@
}
}
+proc strip_msg {msg} {
+ set cmd [concat [list | ] [_git_cmd stripspace] --strip-comments]
+ _trace_exec $cmd
+ set fd [open $cmd r+]
+ fconfigure $fd -translation binary -encoding utf-8
+
+ puts -nonewline $fd $msg
+ close $fd w
+ set result [read $fd]
+ close $fd
+
+ return $result
+}
+
proc commit_tree {} {
global HEAD commit_type file_states ui_comm repo_config
global pch_error
@@ -207,8 +221,8 @@
# -- A message is required.
#
- set msg [string trim [$ui_comm get 1.0 end]]
- regsub -all -line {[ \t\r]+$} $msg {} msg
+ set msg [strip_msg [$ui_comm get 1.0 end]]
+
if {$msg eq {}} {
error_popup [mc "Please supply a commit message.
diff --git a/git-gui/po/ru.po b/git-gui/po/ru.po
index 161ee1a..7aebaf8 100644
--- a/git-gui/po/ru.po
+++ b/git-gui/po/ru.po
@@ -331,7 +331,7 @@
#: git-gui.sh:2936
msgid "Unstage From Commit"
-msgstr "Убрать из издекса"
+msgstr "Убрать из индекса"
#: git-gui.sh:2942 lib/index.tcl:521
msgid "Revert Changes"