Re: squashing patches

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Paolo Bonzini <bonzini@...>
Cc: <git@...>, Junio C Hamano <gitster@...>, Johannes Schindelin <Johannes.Schindelin@...>, Joerg Sommer <joerg@...>, Daniel Barkalow <barkalow@...>, Christian Couder <chriscool@...>
Date: Monday, June 9, 2008 - 12:29 pm

Hi,


Well, I've noticed and read it, but haven't knowm what I wanted to 
reply. :)


If somebody adds a --strategy option to cherry-pick and it gets
into "next", I have no problem to let sequencer pass the option to
cherry-pick ;)

Btw, I like the idea of cherry-pick --strategy=theirs (though I don't
know if I'd ever use it), but this is currently beyond my task ;-)


I like the idea.  And the others?

--- a/Documentation/git-sequencer.txt
+++ b/Documentation/git-sequencer.txt
@@ -212,6 +216,12 @@ squash [<options>] <commit>::
 +
 See 'GENERAL OPTIONS' for values of `<option>`.
 
+squash [<options>] --up-to <mark>::
+	Squash all commits up to the given mark into one commit.
+	There must not be any merge commits in between.
++
+See 'GENERAL OPTIONS' for values of `<option>`.
+
 
 tag <tag>::
 	Set tag `<tag>` to the current HEAD,


Reusing the commit message may be useful, too, agreed.
I think that this is something that can be put to the 
"GENERAL OPTIONS" section:

--- a/Documentation/git-sequencer.txt
+++ b/Documentation/git-sequencer.txt
@@ -240,6 +250,12 @@ when finished.
 	Override the author name and e-mail address used in the commit.
 	Use `A U Thor <author@example.com>` format.
 
+-C <commit-ish>::
+--reuse-message=<commit-ish>::
+	Reuse message from specified commit.
+	Note, that only the commit message is reused
+	and not the authorship information.
+
 -F <file>::
 --file=<file>::
 	Take the commit message from the given file.
--

Ok?


If you want also the authorship information, there's the --reference
which is atm only available for the "merge" insn.
Currently I also wonder, why only merge has this option ;-)

Should this be a General Option, too?

--- a/Documentation/git-sequencer.txt
+++ b/Documentation/git-sequencer.txt
@@ -182,9 +189,6 @@ or `--standard`), an editor will be invoked.
 +
 See the following list and 'GENERAL OPTIONS' for values of `<option>`:
 
-	--reference=<commit-ish>;;
-		Take author and commit message of <commit-ish>.
-	
 	--standard;;
 		Generates a commit message like 'Merge ... into HEAD'.
 		See also linkgit:git-fmt-merge-msg[1].
@@ -247,6 +263,10 @@ when finished.
 -m <msg>::
 --message=<msg>::
 	Use the given `<msg>` as the commit message.
+	
+--reference=<commit-ish>::
+	Take author and commit message of <commit-ish>.
+	
 
 -s::
 --signoff::
--


Hm, this is a bit too specific I think.
Do I interpret your example right, that you want to 
squash "a" and "b", reuse the commit message of the
newly commited patch "a", but also add the signoff of
"b"? (And perhaps, if not set, the own signoff?)

If I put this into sequencer, I'd like to name
that --squash-signoffs (or --merge-signoffs) or something,
because -s/--signoff is a general option atm, that adds
your signoff.

What do the others think? (Sorry for my questions to "the others", 
but I need some input. *grin*)


The git-squash approach looks clean to me.


I notice that you indirectly changed the synopsis, intuitively.
This shows me, that we should change it ;-)
According to the current SYNOPSIS you have to do "git-sequencer -"
to read from stdin.


I like the idea.

--- a/Documentation/git-sequencer.txt
+++ b/Documentation/git-sequencer.txt
@@ -8,7 +8,7 @@ git-sequencer - Execute a sequence of git instructions
 SYNOPSIS
 --------
 [verse]
-'git-sequencer' [-v | --verbose] <file> [<branch>]
+'git-sequencer' [--batch] [-v | --verbose] <file> [<branch>]
 'git-sequencer' --continue | --skip | --abort | --edit

@@ -59,6 +59,13 @@ OPTIONS
 <branch>::
 	Working branch; defaults to HEAD.
 
+--batch::
+	Run in batch mode. If unexpected user intervention is needed
+	(e.g. a conflict or the need to run an editor), git-sequencer fails.
++
+Note that the sanity check fails, if you use this option
+and an instruction like `edit` or the `--edit` option.
+
 --continue::
 	Restart the sequencing process after having resolved a merge conflict.
 
--

Ok?


I don't understand ;-)


Hmmmmm, basically I like this approach.
Let's for example take the "merge --reference=<commit>" option.
It fetches the information from a former commit, and then does
git merge with different authorship information and -m "message bla".
So the basics are there, they just have to be put together.
Do you think it's useful to add something like --reference (or -C,
or however it is called) to git-merge?

Thanks and regards,
  Stephan

-- 
Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] git-sequencer.txt, Stephan Beyer, (Sat Jun 7, 6:01 pm)
[RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Wed Jun 11, 8:22 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Jakub Narebski, (Thu Jun 12, 10:10 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 1:20 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Junio C Hamano, (Thu Jun 12, 1:16 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 1:07 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Olivier Marin, (Fri Jun 13, 3:24 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Fri Jun 13, 1:04 am)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Fri Jun 13, 8:16 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Fri Jun 13, 10:42 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Wed Jun 11, 9:31 pm)
Re: [RFCv2/FYI] git-sequencer.txt, Stephan Beyer, (Thu Jun 12, 11:29 am)
Re: [RFCv2/FYI] git-sequencer.txt, Paolo Bonzini, (Thu Jun 12, 11:56 am)
Re: [RFC] git-sequencer.txt, Jakub Narebski, (Mon Jun 9, 12:49 pm)
Re: [RFC] git-sequencer.txt, Stephan Beyer, (Mon Jun 9, 9:21 pm)
Re: [RFC] git-sequencer.txt, Jakub Narebski, (Tue Jun 10, 2:17 am)
Re: [RFC] git-sequencer.txt, Christian Couder, (Tue Jun 10, 12:46 am)
Re: [RFC] git-sequencer.txt, Daniel Barkalow, (Wed Jun 11, 1:07 pm)
Re: [RFC] git-sequencer.txt, Stephan Beyer, (Tue Jun 10, 4:59 am)
Re: [RFC] git-sequencer.txt, Christian Couder, (Wed Jun 11, 12:10 am)
squashing patches (was: Re: [RFC] git-sequencer.txt), Stephan Beyer, (Mon Jun 9, 7:45 am)
Re: squashing patches, Junio C Hamano, (Mon Jun 9, 3:34 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 4:43 pm)
Re: squashing patches, Junio C Hamano, (Mon Jun 9, 5:02 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 8:38 pm)
Re: squashing patches, Jeff King, (Mon Jun 9, 4:53 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 7:57 pm)
Re: squashing patches, Jeff King, (Mon Jun 9, 9:00 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 11:10 am)
[RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 4:29 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 4:34 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 7:46 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Paolo Bonzini, (Mon Jun 9, 4:53 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 5:34 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Stephan Beyer, (Mon Jun 9, 7:42 pm)
Re: [RFC/PATCH] Add git-squash tool and tests, Johannes Schindelin, (Mon Jun 9, 8:26 pm)
Re: squashing patches, Stephan Beyer, (Mon Jun 9, 12:29 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 12:37 pm)
Re: squashing patches, Paolo Bonzini, (Mon Jun 9, 11:43 am)
Re: squashing patches (was: Re: [RFC] git-sequencer.txt), Johannes Schindelin, (Mon Jun 9, 10:04 am)