0

I have branch and all changes at that branch are at master (HEAD). but git diff master...feature/5492_new_currency shows me that it is not. Where am I wrong?

$ git diff master...feature/5492_new_currency
diff --git a/app/locale/ru/LC_MESSAGES/lang.po b/app/locale/ru/LC_MESSAGES/lang.po
index 9274c9e..6b9d1ae 100644
--- a/app/locale/ru/LC_MESSAGES/lang.po
+++ b/app/locale/ru/LC_MESSAGES/lang.po
@@ -4531,6 +4531,10 @@ msgstr "$"
 msgid "currency:UZS"
 msgstr "сум."

+# Британский фунт
+msgid "currency:GBP"
+msgstr "£"
+
 msgid "datepicker:prevText"
 msgstr "Пред>"

diff --git a/app/protos/defaults.ini b/app/protos/defaults.ini
index 4742982..4de9ea3 100644
--- a/app/protos/defaults.ini
+++ b/app/protos/defaults.ini
@@ -2,8 +2,8 @@ BASE_DOMAIN                = xxxxx
 INSTANCE_COUNTRY           = ru
 INSTANCE_LANGS             = ru en
 DEFAULT_LANGUAGE           = ru
-# Доступные валюты стран для магазинов: РФ, США, Евро, Казахстан, Украина, Китай, Молдова, Армения,
-INSTANCE_CURRENCY          = RUB USD EUR KZT UAH CNY MDL AMD UZS AZN KGS TJS TMT GEL LVL LTL
+# Доступные валюты стран для магазинов: РФ, США, Евро, Казахстан, Украина, Китай, Молдова, Армения,
+INSTANCE_CURRENCY          = RUB USD EUR KZT UAH CNY MDL AMD UZS AZN KGS TJS TMT GEL LVL LTL GBP

 MAIL_FROM         = xxxxx
 MAIL_FEEDBACK     = xxxxx
kes@backend01:~/site/app$ git branch
  feature/5492_new_currency
* master
  production
kes@backend01:~/site/app$ cat locale/ru/LC_MESSAGES/lang.po | grep -A 5 -B 5 'msgid "currency:GBP"'
# Узбекистан
msgid "currency:UZS"
msgstr "сум."

# Британский фунт
msgid "currency:GBP"
msgstr "£"

msgid "datepicker:prevText"
msgstr "Пред>"

kes@backend01:~/site/app$ git branch -d feature/5492_new_currency
warning: deleting branch 'feature/5492_new_currency' that has been merged to
         'refs/remotes/origin/feature/5492_new_currency', but not yet merged to HEAD.
Deleted branch feature/5492_new_currency (was ab38009).
Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158

3 Answers3

1

Have you tried git fetch to see if the repo has updated? You may not have updated it on your computer.


Check your repo on the web. If it shows your branch as merged, it is. If it does, force push an update to Github desktop.

Hope this helps!

Giacomo
  • 156
  • 1
  • 16
1

git diff master...feature/5492_new_currency [shows some differences]

The three-dot syntax, A...B, has a special meaning in Git. More precisely, it has two special meanings, one exclusive to git diff. (In other Git commands it has its other special meaning.) For git diff (and only for git diff), A...B means:

  • First, run git merge-base --all A B. Save its output ID(s) in a variable—let's call this $base. (In shell script you could write base=$(git merge-base --all A B) and then echo $base to see whether there is just one ID.)
  • Then, as long as that outputs just one commit ID, choose that one commit ID, and run: git diff $base B. Otherwise produce some not-useful output. (This "otherwise" part is a bug. It's not actually happening here as you would see diff --cc in the headers, so we know there was in fact just one ID.)

Since A here is master and B here is feature/5492_new_currency, and there is some diff output, that tells me that:

git merge-base master feature/5492_new_currency

and:

git rev-parse feature/5492_new_currency

would have produced two different IDs.

That in turn implies that master is not an ancestor of feature/5492_new_currency. If it were, the merge base of master and feature/5492_new_currency would be the same commit ID as feature/5492_new_currency.

Your next command and its result is actually more directly informative:

kes@backend01:~/site/app$ git branch -d feature/5492_new_currency
warning: deleting branch 'feature/5492_new_currency' that has been merged to
  'refs/remotes/origin/feature/5492_new_currency', but not yet merged to HEAD.
Deleted branch feature/5492_new_currency (was ab38009).

Put together, these two mean that your claim:

I have branch and all changes at that branch are at master (HEAD)

is wrong! In particular, this second result proves that given the two IDs that would be produced by:

git rev-parse HEAD

and:

git rev-parse feature/5492_new_currency

the ID from the former is not "less than or equal to" the ID from the latter, i.e., HEAD is not an ancestor of feature/5492_new_currency. Assuming HEAD is actually a reference to master, that in turn means master is not an ancestor of feature/5492_new_currency, just as we saw from the first command. It could be "greater than" (i.e., ahead of), but if that were the case, git diff would have compared feature/5492_new_currency to itself. So feature/5492_new_currency was definitely not merged into master. It was pushed to its upstream, though (its upstream being origin/5492_new_currency). That is, the ID from the name feature/5492_new_currency was "less than or equal to" the ID you can still get from origin/5492_new_currency.

Now that your branch-name feature/5492_new_currency has been deleted, you will have to do any manipulation you need to apply to your local name master using some name other than feature/5492_new_currency. The most straightforward might be to run:

$ git checkout master && git merge origin/5492_new_currency

which will either fast-forward master, or make a new merge commit. (To force a new merge commit even if fast-forward is possible, use git merge --no-ff.)

torek
  • 448,244
  • 59
  • 642
  • 775
0

We have found what problem is:

Someone just cherry-pick those changes into master branch.

So despite on changes are same the branch is not at master

Eugen Konkov
  • 22,193
  • 17
  • 108
  • 158