Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update git to v2.10.2, fixes #735 #741

Merged
merged 1 commit into from
Nov 14, 2016
Merged

Conversation

yukoff
Copy link
Contributor

@yukoff yukoff commented Nov 6, 2016

@@ -45,17 +45,31 @@ replaces=('git-core')
provides=('git-core')
#options=('debug' '!strip')
source=("${pkgname}-${pkgver}.tar.gz"::https://github.com/git/git/archive/v${pkgver}.tar.gz
git.keyring
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, what is the purpose of this file?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not used anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a public PGP keyring of git project. It doesn't needed in most cases, it might be used in case of importing some patches from source tree and to verify commit (a tag normally). Just included it for convenience in case someone would require it at some point.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is extra for us. Remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done.

@Alexpux
Copy link
Member

Alexpux commented Nov 14, 2016

You forget to remove git.keyring file

* Fixes msys2#735
* Import *sh completion and XSS patches from openSUSE
@yukoff yukoff force-pushed the feature/git-v2.10.2 branch from b9ba261 to cf4ac8a Compare November 14, 2016 06:35
@Alexpux Alexpux merged commit 8987a70 into msys2:master Nov 14, 2016
@bit2shift
Copy link

Still broken on v2.10.2.
screenshot_2

@yukoff
Copy link
Contributor Author

yukoff commented Nov 24, 2016

What I've found so far - it seems that problem comes from mingw-w64-x86_64-gettext/mingw-w64-i686-gettext (gettext.sh is used in git-sh-i18n):

MING64 shell:

Yury@yk-nb-home MINGW64 /d/Users/Yury/workspace.redmine/redmine
$ which gettext.sh
/mingw64/bin/gettext.sh

Yury@yk-nb-home MINGW64 /d/Users/Yury/workspace.redmine/redmine
$ git stash
': not a valid identifierline 89: export: `dashless
No local changes to save

MING32 shell:

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ which gettext.sh
/usr/bin/gettext.sh

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ git stash
No local changes to save

MSYS shell

Yury@yk-nb-home MSYS /d/Users/Yury/workspace.redmine/redmine
$ which gettext.sh
/usr/bin/gettext.sh

Yury@yk-nb-home MSYS /d/Users/Yury/workspace.redmine/redmine
$ git stash
No local changes to save

Now if I remove mingw-w64-x86_64-gettext:

Yury@yk-nb-home MINGW64 /d/Users/Yury/workspace.redmine/redmine
$ pacman -R -dd mingw-w64-x86_64-gettext
...

Yury@yk-nb-home MINGW64 /d/Users/Yury/workspace.redmine/redmine
$ which gettext.sh
/usr/bin/gettext.sh

Yury@yk-nb-home MINGW64 /d/Users/Yury/workspace.redmine/redmine
$ git stash
No local changes to save

And doing opposite (installing the mingw-w64-i686-gettext for MING32 shell) - BOOM:

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ pacman -S mingw-w64-i686-gettext
resolving dependencies...
looking for conflicting packages...
...

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ which gettext.sh
/mingw32/bin/gettext.sh

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ git stash
': not a valid identifierline 89: export: `dashless
No local changes to save

I've done set -x inside of git-sh-i18n to see what's happening:

Yury@yk-nb-home MINGW32 /d/Users/Yury/workspace.redmine/redmine
$ git stash
+++ TEXTDOMAIN=git
+++ export TEXTDOMAIN
+++ test -z ''
+++ TEXTDOMAINDIR=/usr/share/locale
+++ export TEXTDOMAINDIR
+++ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+++ test -n ''
+++ test -n ''
+++ test -n ''
+++ type gettext.sh
+++ GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+++ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+++ case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in
+++ . gettext.sh
++++ test 'X\t' = 'X\t'
++++ echo=echo
++++ test -z ''
++++ case "$0" in
++ unset CDPATH
++ IFS='
'
++ GIT_QUIET=
++ test -n ''
+++ basename -- /usr/lib/git-core/git-stash
+++ sed -e 's/-/ /'
++ dashless='git stash'
++ '[' -z '' ']'
+++ eval_gettext 'usage: $dashless $USAGE'
+++ gettext 'usage: $dashless $USAGE'
++++ envsubst --variables 'usage: $dashless $USAGE'
+++ export PATH $'dashless\r' USAGE
': not a valid identifierline 89: export: `dashless
+++ envsubst 'usage: $dashless $USAGE'
++ LONG_USAGE='usage:  list [<options>]
   or: git stash show [<stash>]
   or: git stash drop [-q|--quiet] [<stash>]
   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
   or: git stash branch <branchname> [<stash>]
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
                       [-u|--include-untracked] [-a|--all] [<message>]]
   or: git stash clear'
++ case "$1" in
++ case $(uname -s) in
+++ uname -s
++ test -z ''
++ git_dir_init
+++ git rev-parse --git-dir
++ GIT_DIR=.git
++ '[' -z Yes ']'
++ test -n .git
+++ cd .git
+++ pwd
++ GIT_DIR=/d/Users/Yury/workspace.redmine/redmine/.git
+++ git rev-parse --git-path objects
++ : .git/objects
+ require_work_tree
++ git rev-parse --is-inside-work-tree
+ test true = true
+ cd_to_toplevel
++ git rev-parse --show-toplevel
+ cdup=/d/Users/Yury/workspace.redmine/redmine
+ cd /d/Users/Yury/workspace.redmine/redmine
+ TMP=/d/Users/Yury/workspace.redmine/redmine/.git/.git-stash.4392
++ git rev-parse --git-path index
+ TMPindex=.git/index.stash.4392
+ trap 'rm -f "$TMP-"* "$TMPindex"' 0
+ ref_stash=refs/stash
+ git config --get-colorbool color.interactive
++ git config --get-color color.interactive.help 'red bold'
+ help_color=''
++ git config --get-color '' reset
+ reset_color=''
+ PARSE_CACHE=--not-parsed
+ seen_non_option=
+ test -n ''
+ set save
+ case "$1" in
+ shift
+ save_stash
+ keep_index=
+ patch_mode=
+ untracked=
+ test 0 '!=' 0
+ test -n ''
+ stash_msg=
+ git update-index -q --refresh
+ no_changes
+ git diff-index --quiet --cached HEAD --ignore-submodules --
+ git diff-files --quiet --ignore-submodules
+ test -z ''
++ gettext 'No local changes to save'
+ say 'No local changes to save'
+ test -z ''
+ printf '%s\n' 'No local changes to save'
No local changes to save
+ exit 0
+ rm -f '/d/Users/Yury/workspace.redmine/redmine/.git/.git-stash.4392-*' .git/index.stash.4392

And same for (unaffected) MSYS shell:

Yury@yk-nb-home MSYS /d/Users/Yury/workspace.redmine/redmine
$ git stash
+++ TEXTDOMAIN=git
+++ export TEXTDOMAIN
+++ test -z ''
+++ TEXTDOMAINDIR=/usr/share/locale
+++ export TEXTDOMAINDIR
+++ GIT_INTERNAL_GETTEXT_SH_SCHEME=fallthrough
+++ test -n ''
+++ test -n ''
+++ test -n ''
+++ type gettext.sh
+++ GIT_INTERNAL_GETTEXT_SH_SCHEME=gnu
+++ export GIT_INTERNAL_GETTEXT_SH_SCHEME
+++ case "$GIT_INTERNAL_GETTEXT_SH_SCHEME" in
+++ . gettext.sh
++++ test 'X\t' = 'X\t'
++++ echo=echo
++++ test -z ''
++++ case "$0" in
++ unset CDPATH
++ IFS='
'
++ GIT_QUIET=
++ test -n ''
+++ basename -- /usr/lib/git-core/git-stash
+++ sed -e 's/-/ /'
++ dashless='git stash'
++ '[' -z '' ']'
+++ eval_gettext 'usage: $dashless $USAGE'
+++ gettext 'usage: $dashless $USAGE'
++++ envsubst --variables 'usage: $dashless $USAGE'
+++ export PATH dashless USAGE
+++ envsubst 'usage: $dashless $USAGE'
++ LONG_USAGE='usage: git stash list [<options>]
   or: git stash show [<stash>]
   or: git stash drop [-q|--quiet] [<stash>]
   or: git stash ( pop | apply ) [--index] [-q|--quiet] [<stash>]
   or: git stash branch <branchname> [<stash>]
   or: git stash [save [--patch] [-k|--[no-]keep-index] [-q|--quiet]
                       [-u|--include-untracked] [-a|--all] [<message>]]
   or: git stash clear'
++ case "$1" in
++ case $(uname -s) in
+++ uname -s
++ test -z ''
++ git_dir_init
+++ git rev-parse --git-dir
++ GIT_DIR=.git
++ '[' -z Yes ']'
++ test -n .git
+++ cd .git
+++ pwd
++ GIT_DIR=/d/Users/Yury/workspace.redmine/redmine/.git
+++ git rev-parse --git-path objects
++ : .git/objects
+ require_work_tree
++ git rev-parse --is-inside-work-tree
+ test true = true
+ cd_to_toplevel
++ git rev-parse --show-toplevel
+ cdup=/d/Users/Yury/workspace.redmine/redmine
+ cd /d/Users/Yury/workspace.redmine/redmine
+ TMP=/d/Users/Yury/workspace.redmine/redmine/.git/.git-stash.6432
++ git rev-parse --git-path index
+ TMPindex=.git/index.stash.6432
+ trap 'rm -f "$TMP-"* "$TMPindex"' 0
+ ref_stash=refs/stash
+ git config --get-colorbool color.interactive
++ git config --get-color color.interactive.help 'red bold'
+ help_color=''
++ git config --get-color '' reset
+ reset_color=''
+ PARSE_CACHE=--not-parsed
+ seen_non_option=
+ test -n ''
+ set save
+ case "$1" in
+ shift
+ save_stash
+ keep_index=
+ patch_mode=
+ untracked=
+ test 0 '!=' 0
+ test -n ''
+ stash_msg=
+ git update-index -q --refresh
+ no_changes
+ git diff-index --quiet --cached HEAD --ignore-submodules --
+ git diff-files --quiet --ignore-submodules
+ test -z ''
++ gettext 'No local changes to save'
+ say 'No local changes to save'
+ test -z ''
+ printf '%s\n' 'No local changes to save'
No local changes to save
+ exit 0
+ rm -f '/d/Users/Yury/workspace.redmine/redmine/.git/.git-stash.6432-*' .git/index.stash.6432

These are differing parts:
the bad

+++ eval_gettext 'usage: $dashless $USAGE'
+++ gettext 'usage: $dashless $USAGE'
++++ envsubst --variables 'usage: $dashless $USAGE'
+++ export PATH $'dashless\r' USAGE
': not a valid identifierline 89: export: `dashless
+++ envsubst 'usage: $dashless $USAGE'

and the good

+++ eval_gettext 'usage: $dashless $USAGE'
+++ gettext 'usage: $dashless $USAGE'
++++ envsubst --variables 'usage: $dashless $USAGE'
+++ export PATH dashless USAGE
+++ envsubst 'usage: $dashless $USAGE'

@bit2shift
Copy link

export PATH $'dashless\r' USAGE
That's it, the ludicrous bug I've been looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants