All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Johannes Sixt <J.Sixt@eudaptics.com>, git@vger.kernel.org
Subject: Re: [PATCH] git add: respect core.filemode even with unmerged entriesin  the index
Date: Fri, 29 Jun 2007 03:20:45 -0700	[thread overview]
Message-ID: <7v3b0bf4ea.fsf@assigned-by-dhcp.pobox.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0706291106190.4438@racer.site> (Johannes Schindelin's message of "Fri, 29 Jun 2007 11:07:00 +0100 (BST)")

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:

> On Fri, 29 Jun 2007, Johannes Sixt wrote:
>
>> However, if only two stages are present, the file mode is still taken 
>> from the file instead of from the index. As that easy to solve (at least 
>> for the unambiguous case)?
>
> It might be related to the bug Junio found, i.e. that I assumed stage 1 to 
> be "ours".

Actually it is because (-1-pos) and (1-pos) are two apart.  By
starting to scan from (1-pos), you are jumping directly to
either the next path (in which case you do not pick it up), or
"their" version (i.e. stage #3) iff there are three stages for
the path in question.

I am all for refactoring the funny "pick up an existing entry at
any stage, but favor 0 then 2 then 1 and finally 3" into a
separate function.  It makes sense, although I do not offhand
know of a place that we can immediately reuse it (logically,
diff-files ought to do that, but I haven't checked).

  reply	other threads:[~2007-06-29 10:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-25  6:40 most commonly used git commands? Michael S. Tsirkin
2007-06-25  7:10 ` Junio C Hamano
2007-06-25  7:17   ` Michael S. Tsirkin
2007-06-25  7:48     ` Junio C Hamano
2007-06-28  2:17       ` Martin Langhoff
2007-06-28  2:30         ` Josh Triplett
2007-06-25  7:51     ` Johannes Schindelin
2007-06-28  8:52       ` Alex Riesen
2007-06-28 13:08         ` Johannes Schindelin
2007-06-28 13:54           ` Johannes Sixt
2007-06-28 14:07             ` Johannes Schindelin
2007-06-28 14:29               ` Johannes Sixt
2007-06-28 14:49                 ` Johannes Sixt
2007-06-28 17:02                   ` [PATCH] git add: respect core.filemode even with unmerged entries in the index Johannes Schindelin
2007-06-29  6:57                     ` [PATCH] git add: respect core.filemode even with unmerged entriesin " Johannes Sixt
2007-06-29 10:07                       ` Johannes Schindelin
2007-06-29 10:20                         ` Junio C Hamano [this message]
2007-06-29 17:32                           ` [PATCH] git add: respect core.filemode with unmerged entries Johannes Schindelin
2007-06-29  8:36                     ` [PATCH] git add: respect core.filemode even with unmerged entries in the index Junio C Hamano
2007-06-29 10:06                       ` Johannes Schindelin
2007-06-30 13:14               ` most commonly used git commands? Alex Riesen
2007-06-30 14:31                 ` Johannes Schindelin
2007-06-30 22:35                   ` Alex Riesen
2007-07-01  9:16                     ` Jan Hudec
2007-07-01 16:49                       ` Alex Riesen
2007-06-28  1:37 ` Josh Triplett

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

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

  git send-email \
    --in-reply-to=7v3b0bf4ea.fsf@assigned-by-dhcp.pobox.com \
    --to=gitster@pobox.com \
    --cc=J.Sixt@eudaptics.com \
    --cc=Johannes.Schindelin@gmx.de \
    --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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.