git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Feature request: git-pull -e/--edit

From
Jakub Narebski <jnareb@gmail.com>
Date
Nov 20, 2006, 08:02 UTC
Message-ID
<ejrnbg$sg5$1@sea.gmane.org>
In-Reply-To
<7v8xi67qhq.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
> So if we rename the current "git merge" to "git-merge--record"
or git-merge-driver
Show 20 quoted lines
> (or any name "git pull" uses internally to record the merge
> commit), and make "git merge" a synonym to "git pull .", and
> give a command line option -m to "git pull" to _affect_ the
> resulting merge message, I would think everybody would become
> quite happy.  It means:
> 
>  - People can say "git merge this-branch" (which is internally
>    translated to "git pull . this-branch");
> 
>  - People can say "git pull -m 'I am doing this merge for such
>    and such reason' $URL $branch" to _include_ that message in
>    the resulting merge commit;
> 
>  - The same can be said about "git merge -m 'comment' $branch".
> 
> I said _affect_ and _include_ in the above because I suspect
> that most of the time you do not want to _replace_ the
> autogenerated part ("Merge branch of repo", and if you are
> pulling from your subordinate trees the merge summary message as
> well).

I'm all for adding -m <msg> option to git-pull (and perhaps also common other message generation options: -F <file>, --edit). I'm even for adding -m option to git-merge.

Making "git merge" to be a synonym to "git pull ."... I'm not so sure. I'd rather we don't lose the ability to give arbitrary refs ar "other" heads like in

  git merge "Merge early part of branch 'topicA'" HEAD topicA~3

example, and ability (if there is such ability) to not include HEAD (current version of branch) as first parent like in

  git checkout pu
  git merge "Merge branch 'topicA', 'topicB'" topicA topicB
-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Junio C HamanoNext: Junio C Hamano
Message 5 of 7 in “Feature request: git-pull -e/--edit”
  1. linux@horizon.comNov 19, 2006
  2. Junio C HamanoNov 20, 2006
  3. linux@horizon.comNov 20, 2006
  4. Junio C HamanoNov 20, 2006
  5. Jakub NarebskiNov 20, 2006
  6. git-merge: make it usable as the first class UIJunio C Hamano, Nov 20, 2006
  7. Junio C HamanoNov 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.