Re: git rebase: unexpected conflict

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: git rebase: unexpected conflict

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:53

"Michael S. Tsirkin" [off-list ref] writes:
quoted
Since git-rebase currently ignores merge commits
Ugh. This is the bit I did not know about.

So the following script is kind of equivalent to rebase -
it applies commits in range $1..$2 that touch files in list on top of current tree:

from=$1
shift
to=$1
shift
git-show --pretty=email `git-rev-list --no-merges $from..$to -- $* | tac` > box
../git-am box

And here I was hoping rebase will be smarter and help me out.

OK.

Questions about the above line now:

1. What is annoying in the above is that
git-show can not limit its output to just the part of patch
that affects the list of files I give, the way git-diff can.
Would such an extension be a good idea?
It is a good idea and I think it is implemented.

	$ git-show <commit>... --- <paths>

would probably give what you want (although I am not absolutely
sure I understand what you want).
2. It's unfortunate that I need a temp file here.
Can git-am get stdin somehow?
See "git-rebase.sh" around ll.325.

Re: git rebase: unexpected conflict

From: Michael S. Tsirkin <hidden>
Date: 2016-06-15 22:42:53

quoted
git-show can not limit its output to just the part of patch
that affects the list of files I give, the way git-diff can.
Would such an extension be a good idea?
It is a good idea and I think it is implemented.

	$ git-show <commit>... --- <paths>
Yes, this works. But this seems undocumented. Right?

-- 
MST

Re: git rebase: unexpected conflict

From: Michael S. Tsirkin <hidden>
Date: 2016-06-15 22:42:53

quoted
2. It's unfortunate that I need a temp file here.
Can git-am get stdin somehow?
See "git-rebase.sh" around ll.325.
git-am can read standard input. Document this.

Signed-off-by: Michael S. Tsirkin <redacted>

--
diff --git a/Documentation/git-am.txt b/Documentation/git-am.txt
index f7d551e..77ef103 100644
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
@@ -21,6 +21,10 @@ current branch.
 
 OPTIONS
 -------
+<mbox>...::
+	The list of mailbox files to read patches from. If you do not
+	supply this argument, reads from the standard input.
+
 --signoff::
 	Add `Signed-off-by:` line to the commit message, using
 	the committer identity of yourself.
-- 
MST
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help