[Nix-dev] Git + gettextWithExpat incompatibility
zimbatm
zimbatm at zimbatm.com
Tue Feb 16 20:20:44 CET 2016
Can you create an issue ?
I can reproduce the issue on master. If just `nixos.gettext` is installed
it works fine.
I also tried changing the EDITOR but that's not it.
Note that git-rebase is implemented in bash
On Tue, 16 Feb 2016 at 18:23 Mikhail <volhovm.cs at gmail.com> wrote:
> Hi!
>
> I've discovered an interesting bug. Here's how it's possible to
> reproduce it:
>
> 1. Install both `gettextWithExpat` and `git` package using nix-env or
> declaration in `configuration.nix`. I've tried different git versions,
> all them work this way. Not sure about `gettextWithExpat` versions, but
> I'm using 0.19.6 with `nixos-unstable` channel on my system.
> 2. cd into any git repository directory
> 3. Run `git rebase` or `git stash` with any arguments (except options,
> `--help` works well). Git will do nothing and return code 0.
>
> Here's an illustration of how it works:
> ```
> [volhovm at avishai:~/code]$ mkdir testGit
> [volhovm at avishai:~/code]$ cd testGit/
> [volhovm at avishai:~/code/testGit]$ git init
> Initialized empty Git repository in /home/volhovm/code/testGit/.git/
> [volhovm at avishai:~/code/testGit]$ nix-env -q
> gettext-expat-gettext-0.19.6
> git-minimal-2.7.0
> #other stuff
> [volhovm at avishai:~/code/testGit]$ git rebase asoehuasnotuehsoathueao
> [volhovm at avishai:~/code/testGit]$ echo $?
> 0
> [volhovm at avishai:~/code/testGit]$ git stash asoehuasnoteu
> [volhovm at avishai:~/code/testGit]$ echo $?
> 0
> [volhovm at avishai:~/code/testGit]$ nix-env -e gettext-expat-gettext
> uninstalling ‘gettext-expat-gettext-0.19.6’
> [volhovm at avishai:~/code/testGit]$ git rebase aoeuaoeuaoe
> fatal: Needed a single revision
> invalid upstream aoeuaoeuaoe
> [volhovm at avishai:~/code/testGit]$ echo $?
> 1
> [volhovm at avishai:~/code/testGit]$ git stash aoeuaoeuaeo
> 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
> [volhovm at avishai:~/code/testGit]$ echo $?
> 1
> ```
>
> I used strace to discover what's going on and it appeared that `git
> rebase aoeuaoeuaoeu` with and without `gettextWithExpat` installed gives
> almost identical output (differs in addresses only), except for the last
> ~6 lines, which are:
>
> With `gettextExpat` installed:
> ```
> read(4, "", 1) = 0
> close(4) = 0
> wait4(13438, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13438
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13438,
> si_uid=1000, si_status=0, si_utime=0, si_stime=0} ---
> exit_group(0) = ?
> +++ exited with 0 +++
> ```
>
> Without:
> ```
> read(4, "", 1) = 0
> close(4) = 0
> wait4(13271, fatal: Needed a single revision
> invalid upstream aoeuaoeu
> [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 13271
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13271,
> si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
> exit_group(1) = ?
> +++ exited with 1 +++
> ```
>
> I wonder if this issue is related to nixOS or git. What are your
> thoughts about it?
>
> --
> Volkhov Mikhail
> M3#38 IFMO study group 17'
> Computer Technologies Department
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160216/98d00be4/attachment-0001.html
More information about the nix-dev
mailing list