Re: git branch command is incompatible with bash

2015-07-28 Thread Johannes Sixt
Am 27.07.2015 um 23:49 schrieb Junio C Hamano: Johannes Sixt writes: Try branchName=$(git rev-parse --abbrev-ref HEAD) Hmm, interesting. $ git checkout --orphan notyet $ git rev-parse --abbrev-ref HEAD $ git symbolic-ref --short HEAD Please don't scare newcomers

Re: git branch command is incompatible with bash

2015-07-28 Thread Johannes Sixt
Am 28.07.2015 um 17:23 schrieb Junio C Hamano: Johannes Sixt writes: Are you trying to say that the result of 'rev-parse --abbrev-ref HEAD' is suboptimal and that of 'symbolic-ref --short HEAD' is OK? My "Interesting" was primarily about that I wasn't

[PATCH] revisions --stdin: accept CRLF line terminators

2015-08-11 Thread Johannes Sixt
st). It is caused by CRs that end up in the file "$todo".miss, because many tools of the MSYS toolset force LF to CRLF conversion when regular files are written via stdout. To fix the error, permit CRLF line terminators when revisions and pathspec are read using the --stdin option.

[PATCH ee/clean-remove-dirs] t7300-clean: require POSIXPERM for chmod 0 test

2015-08-11 Thread Johannes Sixt
. Therefore, set the POSIXPERM prerequisite on the test case. Signed-off-by: Johannes Sixt --- This fixes a new failure in the test suite (t3404.8[67]) on Windows, but I got around to debug it only now. t/t7300-clean.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t730

[PATCH nd/dwim-wildcards-as-pathspecs] t2019: skip test requiring '*' in a file name non Windows

2015-08-11 Thread Johannes Sixt
file. Skip the test on Windows. Signed-off-by: Johannes Sixt --- This fixes a new failure in the test suite (t3404.8[67]) on Windows, but I got around to debug it only now. t/t2019-checkout-ambiguous-ref.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2019-checkout-a

[PATCH bc/connect-plink] t5601-clone: remove broken and pointless check for plink.exe

2015-08-11 Thread Johannes Sixt
27;s just remove the test and assume that the code "just works". Signed-off-by: Johannes Sixt --- t/t5601-clone.sh | 6 -- 1 file changed, 6 deletions(-) diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh index 9b34f3c..df69bf6 100755 --- a/t/t5601-clone.sh +++ b/t/t5601-clone.sh @@

[PATCH jk/prune-mtime] prune: close directory earlier during loose-object directory traversal

2015-08-12 Thread Johannes Sixt
: Johannes Sixt --- My Windows 8.1 machine does not require this fix for some unkonwn reason. But we still cater for Windows XP users, where this change is a real improvement. sha1_file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sha1_file.c b/sha1_file.c index

Re: [PATCH] revisions --stdin: accept CRLF line terminators

2015-08-12 Thread Johannes Sixt
Am 12.08.2015 um 00:14 schrieb Junio C Hamano: Now, I am wondering if it makes sense to do these two things: * Teach revision.c::read_revisions_from_stdin() to use strbuf_getline() instead of strbuf_getwholeline(). * Teach strbuf_getline() to remove CR at the end when stripping the

Re: [msysGit] Re: [PATCH bc/connect-plink] t5601-clone: remove broken and pointless check for plink.exe

2015-08-12 Thread Johannes Sixt
Am 12.08.2015 um 13:58 schrieb Erik Faye-Lund: On Wed, Aug 12, 2015 at 1:07 PM, Johannes Schindelin wrote: FWIW Git for Windows has this patch (that I wanted to contribute in due time, what with being busy with all those tickets) to solve the problem mentioned in your patch in a different way:

Re: [msysGit] Re: [PATCH bc/connect-plink] t5601-clone: remove broken and pointless check for plink.exe

2015-08-13 Thread Johannes Sixt
Am 13.08.2015 um 09:30 schrieb Johannes Schindelin: Hi Johannes, On 2015-08-12 20:31, Johannes Sixt wrote: Am 12.08.2015 um 13:58 schrieb Erik Faye-Lund: On Wed, Aug 12, 2015 at 1:07 PM, Johannes Schindelin wrote: FWIW Git for Windows has this patch (that I wanted to contribute in due time

Re: git merge changes file mode from 644 to 755

2015-08-14 Thread Johannes Sixt
Am 14.08.2015 um 14:02 schrieb Dmitry Oksenchuk: Hello, I've noticed strange behavior of git merge on Windows with core.filemode=false (set by default). Git changed mode of some files from 644 to 755 for unknown reason. One of the files is stdafx.cpp, it's absent in the common ancestor, it was a

Re: [PATCH] Mingw: verify both ends of the pipe () call

2015-08-28 Thread Johannes Sixt
Am 27.08.2015 um 23:50 schrieb Jonathan Nieder: Johannes Schindelin wrote: From: jfmc This means the name shown by git shortlog would be jfmc instead of Jose F. Morales. Intended? The code to open and test the second end of the pipe clearly imitates the code for the first end. A little to

Re: More builtin git-am issues..

2015-09-05 Thread Johannes Sixt
Am 05.09.2015 um 02:54 schrieb Junio C Hamano: Linus Torvalds writes: So I think that logic should basically be extended to saying - if any line in the last chunk has a "Signed-off-by:", set a flag. - at the end of the loop, if that flag wasn't set, return 0. I am reluctant to special

Re: [BUG?] applypatch-msg hook no-longer thinks stdin is a tty

2015-10-03 Thread Johannes Sixt
Am 03.10.2015 um 09:37 schrieb Chris Packham: On Sat, Oct 3, 2015 at 6:43 AM, Junio C Hamano wrote: If you want to go interactive from the hook, you'd have to open and interact with /dev/tty yourself in your hook anyway. That may be what I have to do, although I have absolutely no idea how.

[PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-05-29 Thread Johannes Sixt
On Windows, we do not have functions srandom() and random(). Use srand() and rand(). These functions produce random numbers of lesser quality, but for the purpose (a retry time-out) they are still good enough. Signed-off-by: Johannes Sixt --- There you have it: Look the other way for a while

Re: [PATCH mh/lockfile-retry] lockfile: replace random() by rand()

2015-06-04 Thread Johannes Sixt
Am 30.05.2015 um 19:12 schrieb Junio C Hamano: Johannes Sixt writes: There you have it: Look the other way for a while, and people start using exotic stuff... ;) Is it exotic to have random/srandom? Both are in POSIX and 4BSD; admittedly rand/srand are written down in C89 and later, so

[PATCH 4/4] lockfile: wait using sleep_millisec() instead of select()

2015-06-05 Thread Johannes Sixt
Use the new function sleep_millisec() to delay execution for a short time. This avoids the invocation of select() with just a timeout, but no file descriptors. Such a use of select() is quit with EINVAL on Windows, leading to no delay at all. Signed-off-by: Johannes Sixt --- lockfile.c | 10

[PATCH 2/4] help.c: wrap wait-only poll() invocation in sleep_millisec()

2015-06-05 Thread Johannes Sixt
We want to use the new function elsewhere in a moment. Signed-off-by: Johannes Sixt --- cache.h | 1 + help.c| 2 +- wrapper.c | 5 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cache.h b/cache.h index 54f108a..328cdb7 100644 --- a/cache.h +++ b/cache.h @@ -1680,5

[PATCH 3/4] lockfile: convert retry timeout computations to millisecond

2015-06-05 Thread Johannes Sixt
When the goal is to wait for some random amount of time up to one second, it is not necessary to compute with microsecond precision. This is a preparation to re-use sleep_millisec(). Signed-off-by: Johannes Sixt --- lockfile.c | 21 - 1 file changed, 8 insertions(+), 13

[PATCH 1/4] lockfile: replace random() by rand()

2015-06-05 Thread Johannes Sixt
On Windows, we do not have functions srandom() and random(). Use srand() and rand(). These functions produce random numbers of lesser quality, but for the purpose (a retry time-out) they are still good enough. Signed-off-by: Johannes Sixt --- This is the same version I posted earlier

[PATCH 0/4] Fix file locking with retry and timeout on Windows

2015-06-05 Thread Johannes Sixt
because a select() call where all three sets of file descriptors are empty is not supported on Windows. Johannes Sixt (4): lockfile: replace random() by rand() help.c: wrap wait-only poll() invocation in sleep_millisec() lockfile: convert retry timeout computations to millisecond lockfile

Re: [PATCH 03/14] lockfile: remove some redundant functions

2015-06-10 Thread Johannes Sixt
Am 10.06.2015 um 19:40 schrieb Junio C Hamano: Michael Haggerty writes: Remove the following functions and rewrite their callers to use the equivalent tempfile functions directly: * fdopen_lock_file() -> fdopen_tempfile() * reopen_lock_file() -> reopen_tempfile() * close_lock_file() -> close_

Re: [PATCH v2] fetch-pack: optionally save packs to disk

2015-06-11 Thread Johannes Sixt
Am 11.06.2015 um 20:59 schrieb Augie Fackler: When developing server software, it's often helpful to save a potentially-bogus pack for later analysis. This makes that trivial, instead of painful. When you develop server software, shouldn't you test drive the server via the bare metal protocol

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread Johannes Sixt
Am 07.07.2015 um 21:49 schrieb Jeff King: On Tue, Jul 07, 2015 at 09:31:25PM +0200, X H wrote: For the moment, I'm the only one pushing to the remote, always with the same user (second user is planned). I use git-for-windows which is based on MSYS2. I have mounted the network share with noacl o

Re: [PATCH v7 2/8] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 02:55 schrieb David Turner: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by: David Turner --- ... diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh i

Re: [PATCH 12/12] t3901: test git-am encoding conversion

2015-07-08 Thread Johannes Sixt
Am 02.07.2015 um 20:16 schrieb Paul Tan: Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --utf8 and --no-utf8 options, and if set, would pass the -u flag and the -k flag respectively. git mailinfo -u will re-code the commit log message and authorship info in

Re: Git force push fails after a rejected push (unpack failed)?

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 20:05 schrieb Jeff King: We also don't write objects directly, of course; we write to a temporary file and try to link them into place. It really sounds more like the "objects/d9" directory is where the permission problems are. But, hmm... Not on Windows: A read-only file canno

Re: [PATCH] check_and_freshen_file: fix reversed success-check

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 20:33 schrieb Jeff King: ...or maybe in the utime() step there is actually a bug, and we report failure for no good reason. Ugh. Ah! That code is less than a year old. When I began to adopt a workflow requiring force-pushes lately, I wondered why I haven't seen these failures

Re: [PATCH v7 2/8] cherry-pick: treat CHERRY_PICK_HEAD and REVERT_HEAD as refs

2015-07-08 Thread Johannes Sixt
Am 08.07.2015 um 21:16 schrieb David Turner: On Wed, 2015-07-08 at 19:46 +0200, Johannes Sixt wrote: Am 08.07.2015 um 02:55 schrieb David Turner: Instead of directly writing to and reading from files in $GIT_DIR, use ref API to interact with CHERRY_PICK_HEAD and REVERT_HEAD. Signed-off-by

Re: [PATCH] check_and_freshen_file: fix reversed success-check

2015-07-09 Thread Johannes Sixt
Am 08.07.2015 um 23:03 schrieb Johannes Sixt: Am 08.07.2015 um 20:33 schrieb Jeff King: ...or maybe in the utime() step there is actually a bug, and we report failure for no good reason. Ugh. Ah! That code is less than a year old. When I began to adopt a workflow requiring force-pushes lately

Re: [PATCH v2] gitk: Add a "Copy commit summary" command

2015-07-16 Thread Johannes Sixt
Am 16.07.2015 um 17:29 schrieb Beat Bolli: When referring to earlier commits in commit messages or other text, one of the established formats is ("", ) Add a "Copy commit summary" command to the context menu that puts this text for the currently selected commit on the clipboard. This make

Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-18 Thread Johannes Sixt
Am 18.07.2015 um 17:21 schrieb Ben Walton: The space following the last / in a sed command caused Solaris' xpg4/sed to fail, claiming the program was garbled and exit with status 2: % echo 'foo' | /usr/xpg4/bin/sed -e 's/foo/bar/ ' sed: command garbled: s/foo/bar/ % echo $? 2 Fix this by simply

Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Sixt
Am 19.07.2015 um 09:37 schrieb Johannes Schindelin: On 2015-07-19 08:54, Johannes Sixt wrote: Am 18.07.2015 um 17:21 schrieb Ben Walton: - sed -e s/CHANGE_ME/change_me/ file+ && - mv -f file+ file && + perl -pi -e "s/CHANGE_ME/change_me/" file &a

Re: [PATCH 3/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Sixt
Am 19.07.2015 um 20:00 schrieb Ben Walton: - sed -e s/CHANGE_ME/change_me/ file+ && + perl -pne "s/CHANGE_ME/change_me/" file >file+ && Did you mean '-lpe' or better '-pe' here? -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: git branch command is incompatible with bash

2015-07-27 Thread Johannes Sixt
Am 27.07.2015 um 14:12 schrieb Anatol Rudolph: When using the git branch command, git uses a '*' to denote the current branch. Therefore, in bash this: $ branchName=$(git branch -q) $ echo $branchName produces a directory listing, because the '*' is interpreded by the shell. O

Re: [PATCH v2 0/8] object_id part 4

2016-06-19 Thread Johannes Sixt
Am 19.06.2016 um 00:13 schrieb brian m. carlson: * Adjust the Coccinelle patches to transform plain structs before pointers to structs to avoid misconversions. This addresses the issue that Peff caught originally. To avoid future mistakes, can you write down how "transform plain structs

Re: [PATCH v3 1/4] t5000: test tar files that overflow ustar headers

2016-06-24 Thread Johannes Sixt
Am 24.06.2016 um 01:20 schrieb Jeff King: +# We expect git to die with SIGPIPE here (otherwise we +# would generate the whole 64GB). +test_expect_failure BUNZIP 'generate tar with huge size' ' + { + git archive HEAD + echo $? >exit-code + } | head -c 4096 >

Re: [PATCH v3 1/4] t5000: test tar files that overflow ustar headers

2016-06-24 Thread Johannes Sixt
Am 24.06.2016 um 18:46 schrieb Jeff King: On Fri, Jun 24, 2016 at 06:38:55PM +0200, Johannes Sixt wrote: It's going to be 269 with ksh, and who-knows-what on Windows (due to lack of SIGPIPE - I haven't tested this, yet). Thanks, I meant to ask about that. We do a workaround in t00

Re: [PATCH 1/4] tests: factor portable signal check out of t0005

2016-06-24 Thread Johannes Sixt
Am 24.06.2016 um 21:43 schrieb Jeff King: In POSIX shells, a program which exits due to a signal generally has an exit code of 128 plus the signal number. However, some platforms do other things. ksh uses 256 plus the signal number, and on Windows, all signals are just "3". That's not true, see

Re: [PATCH 1/4] tests: factor portable signal check out of t0005

2016-06-24 Thread Johannes Sixt
Am 24.06.2016 um 23:05 schrieb Jeff King: On Fri, Jun 24, 2016 at 10:52:32PM +0200, Johannes Sixt wrote: The Windows behavior is most closely described as having signal(SIGPIPE, SIG_IGN) at the very beginning of the program. Right, but then we would get EPIPE. So what does git do in such

Re: [PATCH] builtin/worktree.c: add option for setting worktree name

2016-06-25 Thread Johannes Sixt
Am 25.06.2016 um 07:15 schrieb Barret Rennie: +--name:: + Set the name for the worktree. If there is already a worktree with this What is "the name for the worktree"? Is it the directory where it lives in? Is it how it is listed with 'git worktree list'? How is --name different from th

Re: [PATCH v1] git-p4: place temporary refs used for branch import under ref/git-p4-tmp

2016-06-28 Thread Johannes Sixt
Am 27.06.2016 um 09:26 schrieb larsxschnei...@gmail.com: --- a/git-p4.py +++ b/git-p4.py @@ -2274,7 +2274,7 @@ class P4Sync(Command, P4UserMap): self.useClientSpec_from_options = False self.clientSpecDirs = None self.tempBranches = [] -self.tempBranchLocation

Re: preview: What's cooking in git.git (Jun 2016, #10; Tue, 28)

2016-06-28 Thread Johannes Sixt
Am 29.06.2016 um 03:43 schrieb Jeff King: Another is to just put the posix/ksh schemes into the helper function, and let Windows people sort it out later if they want to. Let's do this. -- Hannes -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to maj

Re: [PATCH 1/9] Report bugs consistently

2016-06-29 Thread Johannes Sixt
Am 29.06.2016 um 13:36 schrieb Johannes Schindelin: @@ -955,9 +955,8 @@ static struct merge_file_info merge_file_1(struct merge_options *o, if (!sha_eq(a->sha1, b->sha1)) result.clean = 0; - } else { - d

Re: [PATCH 3/5] index-pack: correct "len" type in unpack_data()

2016-07-05 Thread Johannes Sixt
Am 05.07.2016 um 19:05 schrieb Nguyễn Thái Ngọc Duy: + die(Q_("premature end of pack file, %"PRIuMAX" byte missing", + "premature end of pack file, %"PRIuMAX" bytes missing", I would be surprised if this form of translation worked... +

Re: Git GUI Guesses Incorrect Language

2016-07-08 Thread Johannes Sixt
Am 09.07.2016 um 06:57 schrieb Sunjay Varma: Just before the first line of my code, it says "C++ source, ASCII text". That file is a JavaScript/ES6 file. The ".jsx" file extension signifies that it may also contain Facebook's special JSX syntax (HTML-like syntax in JavaScript). Git-gui just del

Re: git push doesn't update the status with multiple remotes

2016-07-11 Thread Johannes Sixt
Am 11.07.2016 um 18:54 schrieb Garoe: I have a repository on github, a clone on my desktop and bare repo on a private server, in my desktop the remotes looks like this allg...@github.com:user/repo.git (fetch) allg...@github.com:user/repo.git (push) allu...@server.com:user/repo.git (p

Re: [PATCH v4 2/5] t5000: test tar files that overflow ustar headers

2016-07-14 Thread Johannes Sixt
Am 14.07.2016 um 17:47 schrieb Johannes Schindelin: On Thu, 30 Jun 2016, Jeff King wrote: The ustar format only has room for 11 (or 12, depending on some implementations) octal digits for the size and mtime of each file. For values larger than this, we have to add pax extended headers to specify

Re: [PATCH v4 3/5] archive-tar: write extended headers for file sizes >= 8GB

2016-07-14 Thread Johannes Sixt
Am 30.06.2016 um 11:09 schrieb Jeff King: +/* + * This is the max value that a ustar size header can specify, as it is fixed + * at 11 octal digits. POSIX specifies that we switch to extended headers at + * this size. + */ +#define USTAR_MAX_SIZE 0777UL This is too large by one bit for

Re: [PATCH v4 2/5] t5000: test tar files that overflow ustar headers

2016-07-14 Thread Johannes Sixt
Am 14.07.2016 um 19:08 schrieb Junio C Hamano: Johannes Sixt writes: Am 14.07.2016 um 17:47 schrieb Johannes Schindelin: On Thu, 30 Jun 2016, Jeff King wrote: The ustar format only has room for 11 (or 12, depending on some implementations) octal digits for the size and mtime of each file

Re: [PATCH] git-clean: remove fifo, devices, socket files

2016-07-14 Thread Johannes Sixt
Am 15.07.2016 um 04:42 schrieb Andrey Vagin: Currently git-clean removes only links and files, but there can be special files like fifo, sockets, devices. I think git-clean has to remove them too. I think that is not necessary. If you do mkfifo fifo && sudo mknod zero c 1 5 then 'git statu

Re: [PATCH] git-clean: remove fifo, devices, socket files

2016-07-15 Thread Johannes Sixt
Am 15.07.2016 um 09:46 schrieb Andrey Vagin: On Thu, Jul 14, 2016 at 10:56 PM, Johannes Sixt wrote: IOW: These special files are invisible for Git unless it already knows the names. The latter case is outside 'git clean's domain, and the former case really means that special fi

[PATCH ew/daemon-socket-keepalive] Windows: add missing definition of ENOTSOCK

2016-07-21 Thread Johannes Sixt
The previous commit introduced the first use of ENOTSOCK. This macro is not available on Windows. Define it as WSAENOTSOCK because that is the corresponding error value reported by the Windows versions of socket functions. Signed-off-by: Johannes Sixt --- compat/mingw.h | 3 +++ 1 file changed

[PATCH 1/2] git-submodule: forward exit code of git-submodule--helper more faithfully

2016-07-22 Thread Johannes Sixt
self is fixed in the next commit. Signed-off-by: Johannes Sixt --- When you run ./t7400-submodule-basic.sh -v, you will notice this output: fatal: destination path '/home/jsixt/Src/git/git/t/trash directory.t7400-submodule-basic/init' already exists and is not an empty directory

[PATCH 2/2] submodule-helper: fix indexing in clone retry error reporting path

2016-07-22 Thread Johannes Sixt
ult always points one past the end of the second list. Pick the correct index. Signed-off-by: Johannes Sixt --- builtin/submodule--helper.c | 2 +- t/t5815-submodule-protos.sh | 4 ++-- t/t7400-submodule-basic.sh | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/builtin

[PATCH v2 ew/daemon-socket-keepalive] Windows: add missing definition of ENOTSOCK

2016-07-23 Thread Johannes Sixt
/ms740476.aspx Signed-off-by: Johannes Sixt Acked-by: Johannes Schindelin --- Same patch text, but the commit message is amended, just in case it's easier for you to apply a new patch than to amend a queued one. Thanks everybody. compat/mingw.h | 3 +++ 1 file changed, 3 insertions(+)

Re: [PATCH 3/3] subtree: adjust style to match CodingGuidelines

2016-07-25 Thread Johannes Sixt
These caught my eye browsing through my inbox. I'm not a subtree user. Am 26.07.2016 um 06:14 schrieb David Aguilar: @@ -50,87 +51,145 @@ prefix= debug() { - if [ -n "$debug" ]; then - printf "%s\n" "$*" >&2 + if test -n "$debug" + then + printf "

Re: [PATCH] t4130: work around Windows limitation

2016-07-27 Thread Johannes Sixt
n if not, those changes are typically made after the index file was written, triggering a rehashing of the files' contents. The t4130-apply-criss-cross-rename test case, however, requires the inode to determine that files of equal size were swapped, as renaming files does not update their m

[PATCH va/i18n-even-more] rebase-interactive: trim leading whitespace from progress count

2016-07-28 Thread Johannes Sixt
nts <"$todo" | wc -l) todocount=${todocount##* } I did not choose this idiom because it adds a line of code, and there is already an arithmetic evaluation in the vicinity of the line that is changed here. Signed-off-by: Johannes Sixt --- git-rebase--interactive.sh | 2 +- 1 file ch

Re: [PATCH] Fix failing test t3700-add.sh

2016-07-29 Thread Johannes Sixt
Am 29.07.2016 um 14:31 schrieb Ingo Brückl: At the time of the test xfoo1 already exists and is a link. As a result, the check for file mode 100644 fails. Create not yet existing file xfoo instead. Signed-off-by: Ingo Brückl --- t/t3700-add.sh | 12 ++-- 1 file changed, 6 insertions(+

Re: [PATCH v3 06/10] run-command: add clean_on_exit_handler

2016-07-30 Thread Johannes Sixt
Am 30.07.2016 um 01:37 schrieb larsxschnei...@gmail.com: Some commands might need to perform cleanup tasks on exit. Let's give them an interface for doing this. Signed-off-by: Lars Schneider --- run-command.c | 12 run-command.h | 1 + 2 files changed, 9 insertions(+), 4 deletion

Re: [PATCH v3 06/10] run-command: add clean_on_exit_handler

2016-08-01 Thread Johannes Sixt
Am 01.08.2016 um 13:14 schrieb Lars Schneider: >> On 30 Jul 2016, at 11:50, Johannes Sixt wrote: >> Am 30.07.2016 um 01:37 schrieb larsxschnei...@gmail.com: >>> static struct child_to_clean *children_to_clean; >>> @@ -30,6 +31,8 @@ static void cleanup_c

[PATCH v2] t4130: work around Windows limitation

2016-08-02 Thread Johannes Sixt
some property that the swapped files can be discovered reliably even on Windows. Helped-by: Johannes Schindelin Signed-off-by: Johannes Sixt --- This fell through the cracks, I think. I marked it as v2 because there is a minor fixup in the commit message. t/t4130-apply-criss-cross-rename.sh

Re: [PATCH v2] t4130: work around Windows limitation

2016-08-03 Thread Johannes Sixt
Am 03.08.2016 um 17:50 schrieb Junio C Hamano: Johannes Sixt writes: The patch itself seems to got whitespace damaged somewhere between you and me, which I fixed up, Sorry for the damaged patch. I forgot that Thunderbird's "Send again" feature as well as copying and

Re: [PATCH 2/2] nedmalloc: work around overzealous GCC 6 warning

2016-08-04 Thread Johannes Sixt
Am 05.08.2016 um 00:39 schrieb Junio C Hamano: @@ -955,12 +955,10 @@ void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void ** */ char *strdup(const char *s1) { - char *s2 = 0; - if (s1) { - size_t len = strlen(s1) + 1; - s2 = ma

Re: [PATCH 2/2] nedmalloc: work around overzealous GCC 6 warning

2016-08-04 Thread Johannes Sixt
Am 05.08.2016 um 07:36 schrieb Johannes Sixt: Am 05.08.2016 um 00:39 schrieb Junio C Hamano: @@ -955,12 +955,10 @@ void **nedpindependent_comalloc(nedpool *p, size_t elems, size_t *sizes, void ** */ char *strdup(const char *s1) { -char *s2 = 0; -if (s1) { -size_t len

Forward declaration of enum iterator_selection?

2016-08-06 Thread Johannes Sixt
When refs.c is being compiled, the only mention of enum iterator_selection is in this piece of code pulled in from refs-internal.h (have a look at the preprocessed code): typedef enum iterator_selection ref_iterator_select_fn( struct ref_iterator *iter0, struct ref_iterator *ite

Re: Forward declaration of enum iterator_selection?

2016-08-08 Thread Johannes Sixt
Am 07.08.2016 um 22:34 schrieb Ramsay Jones: On 05/08/16 23:26, Johannes Sixt wrote: When refs.c is being compiled, the only mention of enum iterator_selection is in this piece of code pulled in from refs-internal.h(have a look at the preprocessed code): typedef enum iterator_selection

[PATCH 1/2] config.c: avoid duplicated global static variables

2016-08-09 Thread Johannes Sixt
ey -1", 2014-11-20). Remove the redundant, younger, definitions near the top of the file and keep the original definitions that occur later. Signed-off-by: Johannes Sixt --- Why the heck are duplicated static variables not an error in C? Since they aren't (as it seems), this and the

[PATCH 2/2] commit-slab.h: avoid duplicated global static variables

2016-08-09 Thread Johannes Sixt
of a struct that is already defined earlier. This language construct can serve the same purpose as the duplicated static variable definition, but without the confusion. Signed-off-by: Johannes Sixt --- commit-slab.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commit-sl

Re: [PATCH 2/2] commit-slab.h: avoid duplicated global static variables

2016-08-09 Thread Johannes Sixt
BTW, these are all instances of duplicated global static variables that can be found in a standard Linux build. How I found them? I waded through the error messages produced by compiling the code base as C++ code for the fun of it (basically CFLAGS='-x c++ -fpermissive'). -- Hannes -- To un

Re: [PATCH] Spelling fixes

2016-08-10 Thread Johannes Sixt
Am 09.08.2016 um 20:19 schrieb Junio C Hamano: > > > accidentlyaccidentally > commited committed > dependancydependency > emtpy empty > existance existence > expli

Re: [PATCH RFC] diff: add SUBMODULE_DIFF format to display submodule diff

2016-08-10 Thread Johannes Sixt
Am 10.08.2016 um 00:56 schrieb Jacob Keller: On Tue, Aug 9, 2016 at 3:50 PM, Stefan Beller wrote: On Tue, Aug 9, 2016 at 3:32 PM, Jacob Keller wrote: + if (strbuf_read(buf, cp.out, 0) < 0) So we keep the whole diff in memory I don't know much about the diff machinery, but I thought th

Re: [PATCH 1/1] mingw: intercept isatty() to handle /dev/null as Git expects it

2016-12-16 Thread Johannes Sixt
Am 11.12.2016 um 12:16 schrieb Johannes Schindelin: When Git's source code calls isatty(), it really asks whether the respective file descriptor is connected to an interactive terminal. Windows' _isatty() function, however, determines whether the file descriptor is associated with a character de

Re: [PATCH 1/1] mingw: intercept isatty() to handle /dev/null as Git expects it

2016-12-16 Thread Johannes Sixt
Am 16.12.2016 um 19:08 schrieb Junio C Hamano: Sorry for not having waited for you to chime in before agreeing to fast-track this one, and now this is in 'master'. No reason to be sorry, things happen... Dscho's request for fast-tracking was very reasonable, and the patch looked "obviously co

[PATCH] winansi_isatty(): fix when Git is used from CMD

2016-12-18 Thread Johannes Sixt
le. Use it. Signed-off-by: Johannes Sixt --- I was able to test the idea earlier than anticipated and it does work for me. compat/winansi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/winansi.c b/compat/winansi.c index cb725fb02f..ba360be69b 100644 --- a/compat/winan

Re: [PATCH] winansi_isatty(): fix when Git is used from CMD

2016-12-18 Thread Johannes Sixt
Am 18.12.2016 um 16:26 schrieb Johannes Sixt: > The new isatty() override implemented by cbb3f3c9b197 (mingw: intercept > isatty() to handle /dev/null as Git expects it, 2016-12-11) does not > take into account that _get_osfhandle() returns the handle visible by > the C code, which

Re: [PATCH] winansi_isatty(): fix when Git is used from CMD

2016-12-19 Thread Johannes Sixt
Am 18.12.2016 um 16:37 schrieb Johannes Sixt: winansi.c is all about overriding MSVCRT's console handling. If we are connected to a console, then by the time isatty() is called (from outside the emulation layer), all handling of file descriptors 1 and 2 is already outside MSVCRT's c

Re: Allow "git shortlog" to group by committer information

2016-12-20 Thread Johannes Sixt
Am 16.12.2016 um 14:51 schrieb Jeff King: diff --git a/t/t4201-shortlog.sh b/t/t4201-shortlog.sh index ae08b57712..6c7c637481 100755 --- a/t/t4201-shortlog.sh +++ b/t/t4201-shortlog.sh @@ -190,4 +190,17 @@ test_expect_success 'shortlog with --output=' ' test_line_count = 3 shortlog ' +t

Re: [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die

2016-12-20 Thread Johannes Sixt
Am 20.12.2016 um 00:28 schrieb Stefan Beller: +static void report_and_die(struct child_process *cmd, const char *action) +{ + int i; + struct strbuf err = STRBUF_INIT; + if (cmd->git_cmd) + strbuf_addstr(&err, "git "); + for (i = 0; cmd->argv[i]; ) +

Re: Allow "git shortlog" to group by committer information

2016-12-20 Thread Johannes Sixt
Am 20.12.2016 um 19:35 schrieb Junio C Hamano: test_expect_success 'shortlog --committer (internal)' ' + git checkout --orphan side && + git commit --allow-empty -m one && + git commit --allow-empty -m two && + GIT_COMMITTER_NAME="Sin Nombre" git commit --allow-empty -m t

Re: [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die

2016-12-20 Thread Johannes Sixt
Am 20.12.2016 um 19:33 schrieb Johannes Sixt: Am 20.12.2016 um 00:28 schrieb Stefan Beller: +void run_command_or_die(struct child_process *cmd) +{ +if (finish_command(cmd)) +report_and_die(cmd, "run"); And here as well. Oh, and BTW, this one wraps only finish_co

Re: [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die

2016-12-20 Thread Johannes Sixt
Am 20.12.2016 um 20:23 schrieb Stefan Beller: In a reroll I'll drop this patch and instead introduce a function `char *get_child_command_line(struct child_process*);`, which a caller can call before calling finish_command and then use the resulting string to assemble an error message without lego

Re: [PATCHv4 3/5] run-command: add {run,start,finish}_command_or_die

2016-12-20 Thread Johannes Sixt
Am 20.12.2016 um 21:49 schrieb Stefan Beller: On Tue, Dec 20, 2016 at 12:12 PM, Johannes Sixt wrote: I have to ask, though: Is it so much necessary to report the exact command line in an error message? Have a look at https://github.com/git/git/blob/master/submodule.c#L1122 die("

Re: Allow "git shortlog" to group by committer information

2016-12-21 Thread Johannes Sixt
Am 20.12.2016 um 19:52 schrieb Johannes Sixt: Am 20.12.2016 um 19:35 schrieb Junio C Hamano: test_expect_success 'shortlog --committer (internal)' ' +git checkout --orphan side && +git commit --allow-empty -m one && +git commit --allow-empty -m two

Re: [PATCH 0/2] Really fix the isatty() problem on Windows

2016-12-21 Thread Johannes Sixt
Am 21.12.2016 um 18:53 schrieb Johannes Schindelin: The current patch series is based on `pu`, as that already has the winansi_get_osfhandle() fix. For ease of testing, I also have a branch based on master which you can pull via git pull https://github.com/dscho/git mingw-isatty-fixup-ma

[PATCH 4/2] t5615-alternate-env: double-quotes in file names do not work on Windows

2016-12-21 Thread Johannes Sixt
Protect a recently added test case with !MINGW. Signed-off-by: Johannes Sixt --- I don't remember why I did not notice this failure sooner. Perhaps I did, but then ran out of time to debug it... The patch should go on top of jk/quote-env-path-list-component. t/t5615-alternate-env.s

[PATCH bw/realpath-wo-chdir] real_path: canonicalize directory separators in root parts

2016-12-21 Thread Johannes Sixt
because t1504-ceiling-dirs.sh caught a breakage in GIT_CEILING_DIRECTORIES handling on Windows. Signed-off-by: Johannes Sixt --- This introduces the second #ifdef GIT_WINDOWS_NATIVE in this file. It could be avoided if convert_slashes were defined as a do-nothing on POSIX, but that would not

Re: [PATCH bw/realpath-wo-chdir] real_path: canonicalize directory separators in root parts

2016-12-21 Thread Johannes Sixt
Am 21.12.2016 um 23:33 schrieb Brandon Williams: On 12/21, Johannes Sixt wrote: +/* copies root part from remaining to resolved, canonicalizing it on the way */ +static void get_root_part(struct strbuf *resolved, struct strbuf *remaining) +{ + int offset = offset_1st_component(remaining

Re: [PATCH 4/2] t5615-alternate-env: double-quotes in file names do not work on Windows

2016-12-21 Thread Johannes Sixt
Am 21.12.2016 um 23:42 schrieb Jeff King: On Wed, Dec 21, 2016 at 10:33:43PM +0100, Johannes Sixt wrote: Protect a recently added test case with !MINGW. Signed-off-by: Johannes Sixt --- I don't remember why I did not notice this failure sooner. Perhaps I did, but then ran out of ti

Re: [PATCH 0/2] Really fix the isatty() problem on Windows

2016-12-22 Thread Johannes Sixt
Am 21.12.2016 um 22:15 schrieb Johannes Sixt: Am 21.12.2016 um 18:53 schrieb Johannes Schindelin: The current patch series is based on `pu`, as that already has the winansi_get_osfhandle() fix. For ease of testing, I also have a branch based on master which you can pull via git pull https

Re: [PATCH bw/realpath-wo-chdir] real_path: canonicalize directory separators in root parts

2016-12-22 Thread Johannes Sixt
Am 22.12.2016 um 18:33 schrieb Brandon Williams: It took me a couple extra seconds to realize that offset_1st_component returns 0 with a relative path, which makes causes the call to get_root_part to essentially be a noop (ie nothing is resolved). Yeah, I am still unsure whether it is a good id

Re: [PATCH 4/2] t5615-alternate-env: double-quotes in file names do not work on Windows

2016-12-22 Thread Johannes Sixt
Am 22.12.2016 um 07:13 schrieb Johannes Sixt: Am 21.12.2016 um 23:42 schrieb Jeff King: Hmph. I explicitly avoided a colon in the filename so that it would run on MINGW. Is a double-quote also not allowed? It is not allowed; that was my conclusion. But now that you ask, I'll double-

Re: [PATCH v2 3/3] mingw: replace isatty() hack

2016-12-22 Thread Johannes Sixt
I've only one request for clarification below. Otherwise, the patch looks good. (lines removed by the patch trimmed) Am 22.12.2016 um 18:09 schrieb Johannes Schindelin: +static HANDLE swap_osfhnd(int fd, HANDLE new_handle) +{ + /* +* Create a copy of the original handle associate

Re: [PATCH v2 3/3] mingw: replace isatty() hack

2016-12-22 Thread Johannes Sixt
Am 22.12.2016 um 22:37 schrieb Johannes Schindelin: Hi Hannes, On Thu, 22 Dec 2016, Johannes Sixt wrote: Am 22.12.2016 um 18:09 schrieb Johannes Schindelin: +static HANDLE swap_osfhnd(int fd, HANDLE new_handle) +{ + /* +* Create a copy of the original handle associated with fd

Re: [PATCH] mingw: add a regression test for pushing to UNC paths

2016-12-23 Thread Johannes Sixt
Am 23.12.2016 um 18:11 schrieb Johannes Schindelin: Let's make sure that it does not regress again, by introducing a test that uses so-called "administrative shares": disk volumes are automatically shared under certain circumstances, e.g. the C: drive is shared as \\localhost\c$. Clever! +te

Re: [PATCH v4 2/2] repack: die on incremental + write-bitmap-index

2016-12-28 Thread Johannes Sixt
Am 28.12.2016 um 19:12 schrieb David Turner: +static const char incremental_bitmap_conflict_error[] = N_( +"Incremental repacks are incompatible with bitmap indexes. Use \n" The SP before LF could be removed. +"--no-write-bitmap-index or disable the pack.writebitmaps configuration." +); Th

Re: Rebasing multiple branches at once

2017-01-01 Thread Johannes Sixt
Am 31.12.2016 um 09:14 schrieb Mike Hommey: Hi, I've had this kind of things to do more than once, and had to do it a lot today, so I figured it would be worth discussing whether git-rebase should be enhanced to support this, or if this should go in a separate tool or whatever. So here is what

Re: [PATCH] don't use test_must_fail with grep

2017-01-01 Thread Johannes Sixt
Am 01.01.2017 um 15:23 schrieb Luke Diamand: On 31 December 2016 at 11:44, Pranit Bauva wrote: diff --git a/t/t9813-git-p4-preserve-users.sh b/t/t9813-git-p4-preserve-users.sh index 0fe231280..2384535a7 100755 --- a/t/t9813-git-p4-preserve-users.sh +++ b/t/t9813-git-p4-preserve-users.sh @@ -126

Re: [PATCH v2 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-06 Thread Johannes Sixt
Am 06.01.2017 um 02:09 schrieb Richard Hansen: If rerere is enabled and no pathnames are given, run cd_to_toplevel before running 'git diff --name-only' so that 'git diff --name-only' sees the pathnames emitted by 'git rerere remaining'. Also run cd_to_toplevel before running 'git rerere remaini

  1   2   3   4   5   6   7   8   9   10   >