Reputation: 179
I try to run this command:
*1. GIT_TRACE=1 git rebase devel
06:38:56.523607 git.c:600 trace: exec: 'git-rebase' 'devel'
06:38:56.524199 run-command.c:350 trace: run_command: 'git-rebase' 'devel'
06:38:56.589056 git.c:371 trace: built-in: git 'rev-parse' '--parseopt' '--stuck-long' '--' 'devel'
06:38:56.619374 git.c:371 trace: built-in: git 'rev-parse' '--git-dir'
06:38:56.645134 git.c:371 trace: built-in: git 'rev-parse' '--git-path' 'objects'
06:38:56.663010 git.c:371 trace: built-in: git 'rev-parse' '--is-bare-repository'
06:38:56.682832 git.c:371 trace: built-in: git 'rev-parse' '--show-toplevel'
06:38:56.726529 git.c:371 trace: built-in: git 'config' '--bool' 'rebase.stat'
06:38:56.744416 git.c:371 trace: built-in: git 'config' '--bool' 'rebase.autostash'
06:38:56.765932 git.c:371 trace: built-in: git 'config' '--bool' 'rebase.autosquash'
06:38:56.782171 git.c:371 trace: built-in: git 'config' '--bool' 'commit.gpgsign'
06:38:56.808309 git.c:371 trace: built-in: git 'rev-parse' '--verify' 'devel^0'
06:38:56.830865 git.c:371 trace: built-in: git 'rev-parse' '--verify' 'devel^0'
06:38:56.858060 git.c:371 trace: built-in: git 'symbolic-ref' '-q' 'HEAD'
06:38:56.884341 git.c:371 trace: built-in: git 'rev-parse' '--verify' 'HEAD'
06:38:56.920231 git.c:371 trace: built-in: git 'rev-parse' '--verify' 'HEAD'
06:38:56.943794 git.c:371 trace: built-in: git 'update-index' '-q' '--ignore-submodules' '--refresh'
06:38:57.013045 git.c:371 trace: built-in: git 'diff-files' '--quiet' '--ignore-submodules'
06:38:57.081901 git.c:371 trace: built-in: git 'diff-index' '--cached' '--quiet' '--ignore-submodules' 'HEAD' '--'
06:38:57.113575 git.c:371 trace: built-in: git 'merge-base' '65175047adbeb20879af932112ddc75902519846' '658e3871df5427b32403a75049516f80084eaea0'
06:38:57.410044 git.c:371 trace: built-in: git 'rev-parse' '--git-path' 'hooks/pre-rebase' First, rewinding head to replay your work on top of it...
06:38:57.448020 git.c:371 trace: built-in: git 'checkout' '-q' '65175047adbeb20879af932112ddc75902519846^0'
06:39:01.770078 git.c:371 trace: built-in: git 'update-ref' 'ORIG_HEAD' '658e3871df5427b32403a75049516f80084eaea0'
06:39:01.794553 git.c:371 trace: built-in: git 'format-patch' '-k' '--stdout' '--full-index' '--cherry-pick' '--right-only' '--src-prefix=a/' '--dst-prefix=b/' '--no-renames' '--no-cover-letter' '65175047adbeb20879af932112ddc75902519846...658e3871df5427b32403a75049516f80084eaea0'
06:39:08.220488 git.c:371 trace: built-in: git 'am' '--rebasing' '--resolvemsg= When you have resolved this problem, run "git rebase --continue". If you prefer to skip this patch, run "git rebase --skip" instead. To check out the original branch and stop rebasing, run "git rebase --abort". '
06:39:08.238487 run-command.c:350 trace: run_command: 'mailsplit' '-d4' '-o.git/rebase-apply' '-b' '--'
06:39:08.239436 exec_cmd.c:116 trace: exec: 'git' 'mailsplit' '-d4' '-o.git/rebase-apply' '-b' '--'
06:39:08.247412 git.c:371 trace: built-in: git 'mailsplit' '-d4' '-o.git/rebase-apply' '-b' '--'
Applying: Fix for ansible/ansible-modules-core#1568
Applying: Rewrite ansible-pull tests to use local repo. (#22821)
Applying: cloudstack: fix pep8 for loadbalancer modules (#22822)
Applying: Fix get_s3_connection (fixes #22317) (#22318)
Applying: fixes return data structure (#22830)
Applying: fixes exception raised from ansible-connection logging (#22836)
Applying: allow systemd to 'just' reload
Applying: removed deprecated config/env vars
Applying: fixed name to unit
Applying: fixed passwordstore lookup examples
Applying: ported fix from ansible-core #5639 fatal: could not parse .git/rebase-apply/0012
------------------------------------------------------------------------*
and I got
fatal: could not parse .git/rebase-apply/0012
Then I can show this: cat .git/rebase-apply/0012
From 3d09c94faeaa52075055f23744d8b52581c59bb2 Mon Sep 17 00:00:00 2001
Evan Kaufman <[email protected]>
---
lib/ansible/modules/files/replace.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lib/ansible/modules/files/replace.py b/lib/ansible/modules/files/replace.py
index 60d5500cfdc44c53bfc67706181cba732c1ee914..ff82ce5f0abb75745b3738a097c94a7f7fe6e480 100644
--- a/lib/ansible/modules/files/replace.py
+++ b/lib/ansible/modules/files/replace.py
@@ -52,6 +52,10 @@ options:
U(http://docs.python.org/2/library/re.html).
Uses multiline mode, which means C(^) and C($) match the beginning
and end respectively of I(each line) of the file.
+ - Note that, as of ansible 2, short form tasks should have any escape
+ sequences backslash-escaped in order to prevent them being parsed
+ as string literal escapes. See the examples.
+
replace:
required: false
description:
@@ -141,6 +145,15 @@ EXAMPLES = r"""
regexp: '^(NameVirtualHost|Listen)\s+80\s*$'
replace: '\1 127.0.0.1:8080'
validate: '/usr/sbin/apache2ctl -f %s -t'
+
+- name: short form task (in ansible 2+) necessitates backslash-escaped sequences
+ replace: dest=/etc/hosts regexp='\\b(localhost)(\\d*)\\b' replace='\\1\\2.localdomain\\2 \\1\\2'
+
+- name: long form task does not
+ replace:
+ dest: /etc/hosts
+ regexp: '\b(localhost)(\d*)\b'
+ replace: '\1\2.localdomain\2 \1\2'
"""
2.11.0
Not sure how can I handle couldn't parse. git/rebase-apply/0012 ?
Upvotes: 1
Views: 1569
Reputation: 1324308
There was a similar issue recently (Oct. 2017) in this thread
The first thing to test is to check if the issue persists with a Git 2.15.0 (or 2.15.1 released this morning)
The other workaround would be to rebase up to before that commit, then apply that commit manually, and finally rebase from after that commit.
As torek mentions in the comments:
A third alternative is to run any of:
git rebase -m
(uses the merge script, which uses cherry-pick),git rebase --keep-empty
(forcesgit rebase--am
to use cherry-pick), orgit rebase -i
(interactive rebase uses cherry-pick).
Upvotes: 2