Merge branch 'tr/notes-display'
* tr/notes-display: git-notes(1): add a section about the meaning of history notes: track whether notes_trees were changed at all notes: add shorthand --ref to override GIT_NOTES_REF commit --amend: copy notes to the new commit rebase: support automatic notes copying notes: implement helpers needed for note copying during rewrite notes: implement 'git notes copy --stdin' rebase -i: invoke post-rewrite hook rebase: invoke post-rewrite hook commit --amend: invoke post-rewrite hook Documentation: document post-rewrite hook Support showing notes from more than one notes tree test-lib: unset GIT_NOTES_REF to stop it from influencing tests Conflicts: git-am.sh refs.c
This commit is contained in:
13
git-am.sh
13
git-am.sh
@ -593,6 +593,7 @@ do
|
||||
echo "Patch is empty. Was it split wrong?"
|
||||
stop_here $this
|
||||
}
|
||||
rm -f "$dotest/original-commit"
|
||||
if test -f "$dotest/rebasing" &&
|
||||
commit=$(sed -e 's/^From \([0-9a-f]*\) .*/\1/' \
|
||||
-e q "$dotest/$msgnum") &&
|
||||
@ -600,6 +601,7 @@ do
|
||||
then
|
||||
git cat-file commit "$commit" |
|
||||
sed -e '1,/^$/d' >"$dotest/msg-clean"
|
||||
echo "$commit" > "$dotest/original-commit"
|
||||
else
|
||||
{
|
||||
sed -n '/^Subject/ s/Subject: //p' "$dotest/info"
|
||||
@ -783,6 +785,10 @@ do
|
||||
git update-ref -m "$GIT_REFLOG_ACTION: $FIRSTLINE" HEAD $commit $parent ||
|
||||
stop_here $this
|
||||
|
||||
if test -f "$dotest/original-commit"; then
|
||||
echo "$(cat "$dotest/original-commit") $commit" >> "$dotest/rewritten"
|
||||
fi
|
||||
|
||||
if test -x "$GIT_DIR"/hooks/post-applypatch
|
||||
then
|
||||
"$GIT_DIR"/hooks/post-applypatch
|
||||
@ -791,5 +797,12 @@ do
|
||||
go_next
|
||||
done
|
||||
|
||||
if test -s "$dotest"/rewritten; then
|
||||
git notes copy --for-rewrite=rebase < "$dotest"/rewritten
|
||||
if test -x "$GIT_DIR"/hooks/post-rewrite; then
|
||||
"$GIT_DIR"/hooks/post-rewrite rebase < "$dotest"/rewritten
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -fr "$dotest"
|
||||
git gc --auto
|
||||
|
Reference in New Issue
Block a user