git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A small Git bug
@ 2016-04-10 15:17 Victor Porton
  2016-04-10 16:01 ` Karthik Nayak
  0 siblings, 1 reply; 3+ messages in thread
From: Victor Porton @ 2016-04-10 15:17 UTC (permalink / raw)
  To: git

I have three branches: master, prerelease, and devel.

Suppose now we are in master.

I often run the following command (in fact it is an alias, to save
typing):

git push && git checkout prerelease && git merge master && git push &&
git checkout devel && git merge prerelease && git push && git checkout
master

There is a small problem: After running this command my text editor
proposes me to reload changed files.

So, it seems that the above command marks some files as changed. It is
wrong, because it is inconvenient a little to reload a file or two
every time after I submit the changes.

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

* Re: A small Git bug
  2016-04-10 15:17 A small Git bug Victor Porton
@ 2016-04-10 16:01 ` Karthik Nayak
  2016-04-10 17:34   ` Philip Oakley
  0 siblings, 1 reply; 3+ messages in thread
From: Karthik Nayak @ 2016-04-10 16:01 UTC (permalink / raw)
  To: Victor Porton; +Cc: Git

Hello,

On Sun, Apr 10, 2016 at 8:47 PM, Victor Porton <porton@narod.ru> wrote:
> I have three branches: master, prerelease, and devel.
>
> Suppose now we are in master.
>
> I often run the following command (in fact it is an alias, to save
> typing):
>
> git push && git checkout prerelease && git merge master && git push &&
> git checkout devel && git merge prerelease && git push && git checkout
> master
>
> There is a small problem: After running this command my text editor
> proposes me to reload changed files.
>
> So, it seems that the above command marks some files as changed. It is
> wrong, because it is inconvenient a little to reload a file or two
> every time after I submit the changes.

Its more of intentional behavior than a bug. When you merge branches, the
timestamp of the files involved are updated to reflect the merge.

Your text editor seems to have picked up this change in the file's timestamp as
changes made to the content of the file.

-- 
Regards,
Karthik Nayak

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

* Re: A small Git bug
  2016-04-10 16:01 ` Karthik Nayak
@ 2016-04-10 17:34   ` Philip Oakley
  0 siblings, 0 replies; 3+ messages in thread
From: Philip Oakley @ 2016-04-10 17:34 UTC (permalink / raw)
  To: Karthik Nayak, Victor Porton; +Cc: Git

From: "Karthik Nayak" <karthik.188@gmail.com>
> Hello,
>
> On Sun, Apr 10, 2016 at 8:47 PM, Victor Porton <porton@narod.ru> wrote:
>> I have three branches: master, prerelease, and devel.
>>
>> Suppose now we are in master.
>>
>> I often run the following command (in fact it is an alias, to save
>> typing):
>>
>> git push && git checkout prerelease && git merge master && git push &&
>> git checkout devel && git merge prerelease && git push && git checkout
>> master
>>
>> There is a small problem: After running this command my text editor
>> proposes me to reload changed files.
>>
>> So, it seems that the above command marks some files as changed. It is
>> wrong, because it is inconvenient a little to reload a file or two
>> every time after I submit the changes.
>
> Its more of intentional behavior than a bug. When you merge branches, the
> timestamp of the files involved are updated to reflect the merge.
>
> Your text editor seems to have picked up this change in the file's 
> timestamp as
> changes made to the content of the file.
>
Victor,
There is also a patch series in discussion [1] about doing these conflict 
free (hopefully) merges without the use of the worktree. This would allow 
you workflow to be re-coded so that the checkout dance never occurs and 
master is undisturbed, removing the editor's change logic from the problem.

[1] http://thread.gmane.org/gmane.comp.version-control.git/291007
--

Philip 

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

end of thread, other threads:[~2016-04-10 17:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-10 15:17 A small Git bug Victor Porton
2016-04-10 16:01 ` Karthik Nayak
2016-04-10 17:34   ` Philip Oakley

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).