git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Casey McGinty <casey.mcginty@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Git automatic stashing?
Date: Tue, 09 Nov 2010 08:49:24 +0100	[thread overview]
Message-ID: <vpqlj53j5rv.fsf@bauges.imag.fr> (raw)
In-Reply-To: <AANLkTinwftXiZxbs_=PeM-MxQmMF4VaBCPEufH=OG6iU@mail.gmail.com> (Casey McGinty's message of "Mon\, 8 Nov 2010 19\:37\:53 -1000")

Casey McGinty <casey.mcginty@gmail.com> writes:

> Is there any feature in git to perform and auto stash apply/pop when
> trying to do a merge/rebase in a dirty working dir? This would save
> some keystrokes from time-to-time, and make it easier for new users
> unfamiliar with git.

I agree with the keystrokes part, but not with the fact that it would
make it easier in general. In the sequence

git stash
git merge
git stash pop

conflicts can occur in 2 distinct places. One can easily forsee this
senario occuring:

git stash
git merge
# fix conflicts
# git commit
# forget to do the action needed to get the "git stash pop"

and voila, you've just lost data.

Actually, what I'd like to see would be this feature, but limited to
the case where the merge is a fast-forward, because then, only the
last action of the sequence could possibly leave conflict, so Git
could finish with a message like "please fix conflicts and continue
working". Actually, this is not far from what "git checout -m" is
doing.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2010-11-09  7:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTim3MacQK6EtTPNJsYbqb=5bOM3W3BXC6p=hT+PU@mail.gmail.com>
2010-11-09  5:37 ` Git automatic stashing? Casey McGinty
2010-11-09  7:49   ` Matthieu Moy [this message]
2010-11-09 12:02     ` Martin von Zweigbergk
2010-11-09 12:36   ` Nguyen Thai Ngoc Duy
2010-11-09 12:58     ` Martin von Zweigbergk
2010-11-09 19:12     ` Matthieu Moy
2010-11-09 19:19       ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqlj53j5rv.fsf@bauges.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=casey.mcginty@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).