git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* update-index --unresolve
@ 2008-10-02 13:52 SZEDER Gábor
  2008-10-02 13:58 ` Jakub Narebski
  0 siblings, 1 reply; 4+ messages in thread
From: SZEDER Gábor @ 2008-10-02 13:52 UTC (permalink / raw)
  To: git

Dear All,

the documentation says following:

  --unresolve::
         Restores the 'unmerged' or 'needs updating' state of a
         file during a merge if it was cleared by accident.

How could I clear those states by accident (or intentionally)?

Thanks,
Gábor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: update-index --unresolve
  2008-10-02 13:52 update-index --unresolve SZEDER Gábor
@ 2008-10-02 13:58 ` Jakub Narebski
  2008-10-02 14:18   ` SZEDER Gábor
  0 siblings, 1 reply; 4+ messages in thread
From: Jakub Narebski @ 2008-10-02 13:58 UTC (permalink / raw)
  To: SZEDER Gábor; +Cc: git

SZEDER Gábor <szeder@ira.uka.de> writes:

> Dear All,
> 
> the documentation says following:
> 
>   --unresolve::
>          Restores the 'unmerged' or 'needs updating' state of a
>          file during a merge if it was cleared by accident.
> 
> How could I clear those states by accident (or intentionally)?

"git add <file>", or "git update-index <file>", or error in handling
merge tool via git-mergetool.

-- 
Jakub Narebski
Poland
ShadeHawk on #git

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: update-index --unresolve
  2008-10-02 13:58 ` Jakub Narebski
@ 2008-10-02 14:18   ` SZEDER Gábor
  2008-10-02 14:25     ` SZEDER Gábor
  0 siblings, 1 reply; 4+ messages in thread
From: SZEDER Gábor @ 2008-10-02 14:18 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

Hi Jakub,

On Thu, Oct 02, 2008 at 06:58:41AM -0700, Jakub Narebski wrote:
> SZEDER Gábor <szeder@ira.uka.de> writes:
> >   --unresolve::
> >          Restores the 'unmerged' or 'needs updating' state of a
> >          file during a merge if it was cleared by accident.
> > 
> > How could I clear those states by accident (or intentionally)?
> 
> "git add <file>", or "git update-index <file>", or error in handling
> merge tool via git-mergetool.
Thanks for your fast reply.

However:

# ...  do a conflicting merge
(master|MERGING)$ echo 4 >one
(master|MERGING)$ git status
one: needs merge
# On branch master
# Changed but not updated:
#   (use "git add <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working
#   directory)
#
#       unmerged:   one
#
no changes added to commit (use "git add" and/or "git commit -a")
(master|MERGING)$ git add one
(master|MERGING)$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   one
#
(master|MERGING)$ git update-index --unresolve
(master|MERGING)$ echo $?
0
(master|MERGING)$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   one
#

So, as you can see, after 'add ; update-index --unresolve' the file is
not marked as unmerged, but it's still ready to be committed.

Is something wrong going on here, or it is indeed the intended
behaviour and I misunderstood this functionality?

Thanks,
Gábor

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: update-index --unresolve
  2008-10-02 14:18   ` SZEDER Gábor
@ 2008-10-02 14:25     ` SZEDER Gábor
  0 siblings, 0 replies; 4+ messages in thread
From: SZEDER Gábor @ 2008-10-02 14:25 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git

On Thu, Oct 02, 2008 at 04:18:53PM +0200, SZEDER Gábor wrote:
> > > How could I clear those states by accident (or intentionally)?
> > 
> > "git add <file>", or "git update-index <file>", or error in handling
> > merge tool via git-mergetool.
> Thanks for your fast reply.
> 
> However:
> 
> # ...  do a conflicting merge
> (master|MERGING)$ echo 4 >one
> (master|MERGING)$ git status
> one: needs merge
> # On branch master
> # Changed but not updated:
> #   (use "git add <file>..." to update what will be committed)
> #   (use "git checkout -- <file>..." to discard changes in working
> #   directory)
> #
> #       unmerged:   one
> #
> no changes added to commit (use "git add" and/or "git commit -a")
> (master|MERGING)$ git add one
> (master|MERGING)$ git status
> # On branch master
> # Changes to be committed:
> #   (use "git reset HEAD <file>..." to unstage)
> #
> #       modified:   one
> #
> (master|MERGING)$ git update-index --unresolve

Ah, that should be 'git update-index --unresolve one', and
everything works as expected.


Sorry,
Gábor

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-10-02 14:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-02 13:52 update-index --unresolve SZEDER Gábor
2008-10-02 13:58 ` Jakub Narebski
2008-10-02 14:18   ` SZEDER Gábor
2008-10-02 14:25     ` SZEDER Gábor

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 NNTP newsgroup(s).