Skip to contentSkip to conversation

A small Git bug

DISCUSSION Victor Porton 3 participants 3 messages Jun 16, 2016

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw

Hello,

Quoted 11 lines · Victor Porton

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

Quoted 6 lines

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.

Signature · 2 lines
Regards,
Karthik Nayak
#2 lore raw

From: "Karthik Nayak" <[email protected]>

Quoted 21 lines

Hello,

Quoted 11 lines · Victor Porton

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

Quoted 6 lines

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.

Quoted 6 lines

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