[PATCH] t6026-merge-attr: wait for process to release trash directory

2016-09-05 Thread Johannes Sixt
to go away. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- t/t6026-merge-attr.sh | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/t/t6026-merge-attr.sh b/t/t6026-merge-attr.sh index dd8f88d..2c5b138 100755 --- a/t/t6026-merge-attr.sh +++ b/t/t6026-merge-attr.sh @@

[PATCH] t9903: fix broken && chain

2016-09-05 Thread Johannes Sixt
because __git_ps1, being the first command in the second part of the broken && chain, records the current exit code, does its work, and finally returns to the caller with the recorded exit code. This fools our && chain check. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- t/

Re: [PATCH 06/22] sequencer: release memory that was allocated when reading options

2016-08-30 Thread Johannes Sixt
Am 30.08.2016 um 19:52 schrieb Johannes Schindelin: Right, but that is exactly what I wanted to avoid, because it is rather inelegant to strdup() strings just so that we do not have to record what to free() and what not to free(). Please, excuse, but when I have to choose what is more

Re: [PATCH 05/22] sequencer: allow the sequencer to take custody of malloc()ed data

2016-08-29 Thread Johannes Sixt
Am 29.08.2016 um 23:59 schrieb Jakub Narębski: W dniu 29.08.2016 o 10:04, Johannes Schindelin pisze: -#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, NULL } +#define REPLAY_OPTS_INIT { -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, NULL,

Re: [PATCH 1/2] gitk: align the commit summary format to the documentation

2016-08-27 Thread Johannes Sixt
Am 26.08.2016 um 20:24 schrieb Junio C Hamano: Beat Bolli writes: In 175d38c ("SubmittingPatches: document how to reference previous commits", 2016-07-28) the format for referring to older commits was specified. is easier to read when pasted into a sentence than what the

Re: git-mergetool reverse file ordering

2016-08-17 Thread Johannes Sixt
Am 17.08.2016 um 08:46 schrieb David Aguilar: The only thing that using diff-files doesn't address is the rerere support in mergetool where it processes the files in the order specified by "git rerere remaining". This is why I initially thought we needed a generic sort-like command. I see.

Re: git-mergetool reverse file ordering

2016-08-17 Thread Johannes Sixt
Am 17.08.2016 um 08:05 schrieb Johannes Sixt: Am 17.08.2016 um 03:25 schrieb David Aguilar: Hmm, I do like the idea of reusing the diff orderFile, but a mechanism for sorting arbitrary inputs based on the orderFile isn't currently exposed in a way that mergetool could use it. Instead of using

Re: git-mergetool reverse file ordering

2016-08-17 Thread Johannes Sixt
Am 17.08.2016 um 03:25 schrieb David Aguilar: Hmm, I do like the idea of reusing the diff orderFile, but a mechanism for sorting arbitrary inputs based on the orderFile isn't currently exposed in a way that mergetool could use it. Instead of using 'git ls-files -u | sed ... | sort -u' you

Re: [PATCH] t/Makefile: make sure that file names are truly platform-independent

2016-08-16 Thread Johannes Sixt
Am 16.08.2016 um 10:42 schrieb Johannes Schindelin: That only leaves the conclusion that some of our pathspec code tries to be helpful and takes a backslash for a directory separator. Very true. The code that does this is in prefix_filename():

Re: [PATCH v1 1/2] t0027: Correct raciness in NNO test

2016-08-13 Thread Johannes Sixt
Am 12.08.2016 um 18:51 schrieb tbo...@web.de: From: Torsten Bögershausen When a non-reversible CRLF conversion is done in "git add", a warning is printed on stderr (or Git dies, depending on checksafe) The function commit_chk_wrnNNO() in t0027 was written to test this, but did

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

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 >

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

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

2016-08-09 Thread Johannes Sixt
laration 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 <j...@kdbg.org> --- commit-slab.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[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 <j...@kdbg.org> --- Why the heck are duplicated static variables not an error in C? Since they are

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

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

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

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 =

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 <j...@kdbg.org> 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 cop

[PATCH v2] t4130: work around Windows limitation

2016-08-03 Thread Johannes Sixt
property that the swapped files can be discovered reliably even on Windows. Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by: Johannes Sixt <j...@kdbg.org> --- This fell through the cracks, I think. I marked it as v2 because there is a minor fixup in the commit

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

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

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,

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

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

2016-07-28 Thread Johannes Sixt
quot; | 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 <j...@kdbg.org> --- git-rebase--interactive.sh | 2 +- 1 file c

Re: [PATCH] t4130: work around Windows limitation

2016-07-27 Thread Johannes Sixt
this missing piece. Equal file sizes are not crucial for the test cases, however. Hence, generate files with different sizes so that there is some property that the swapped files can be discovered reliably even on Windows. Helped-by: Johannes Schindelin <johannes.schinde...@gmx.de> Signed-off-by:

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

2016-07-26 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

[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 <j...@kdbg.org> Acked-by: Johannes Schindelin <johannes.schinde...@gmx.de> --- 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

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

2016-07-22 Thread Johannes Sixt
points one past the end of the second list. Pick the correct index. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- 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

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

2016-07-22 Thread Johannes Sixt
commit. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- 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. fatal: clone of './.s

[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 <j...@kdbg.org> --- compat/mingw

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 <j...@kdbg.org> 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 s

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

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 <j...@kdbg.org> 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

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 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

Re: Git GUI Guesses Incorrect Language

2016-07-09 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

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: [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 { -

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

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 = [] -

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

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

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,

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 t0005, but we

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 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

Re: [PATCH v6 31/44] run-command: make dup_devnull() non static

2016-06-11 Thread Johannes Sixt
Am 10.06.2016 um 22:11 schrieb Christian Couder: --- a/run-command.c +++ b/run-command.c @@ -85,7 +85,7 @@ static inline void close_pair(int fd[2]) } #ifndef GIT_WINDOWS_NATIVE -static inline void dup_devnull(int to) +void dup_devnull(int to) I'm not adding arguments to what we've heard

Re: [PATCH v2 00/94] libify apply and use lib in am

2016-06-10 Thread Johannes Sixt
Am 10.06.2016 um 13:11 schrieb Johannes Schindelin: On Fri, 10 Jun 2016, Christian Couder wrote: On Fri, Jun 10, 2016 at 9:01 AM, Johannes Schindelin wrote: I lost track in the meantime: were those issues with unclosed file handles and unreleased memory in the

Re: [PATCH v2 00/94] libify apply and use lib in am

2016-06-09 Thread Johannes Sixt
Am 12.05.2016 um 20:02 schrieb Christian Couder: On Thu, May 12, 2016 at 7:06 PM, Johannes Sixt <j...@kdbg.org> wrote: Am 11.05.2016 um 15:16 schrieb Christian Couder: This is a patch series about libifying `git apply` functionality, and using this libified functionality in `git a

Re: [PATCH v4 3/3] doc: more consistency in environment variables format

2016-06-08 Thread Johannes Sixt
Am 08.06.2016 um 00:35 schrieb Tom Russello: Wrap with backticks (monospaced font) unwrapped or single-quotes wrapped (italic type) environment variables which are followed by the word "environment". It was obtained with: perl -pi -e "s/\'?(\\\$?[0-9A-Z\_]+)\'?(?= environment ?)/\`\1\`/g" *.txt

Re: [PATCH 2/5] t1404: document function test_update_rejected

2016-06-07 Thread Johannes Sixt
Am 07.06.2016 um 13:50 schrieb Michael Haggerty: test_update_rejected () { + local prefix before pack create error && Do we want to add more of unportable 'local' declarations? prefix="$1" && before="$2" && pack="$3" && -- Hannes -- To unsubscribe from this

Re: [PATCH 4/8] Rename struct diff_filespec's sha1_valid member.

2016-06-07 Thread Johannes Sixt
Am 07.06.2016 um 02:57 schrieb brian m. carlson: Now that this struct's sha1 member is called "oid", update the comment and the sha1_valid member to be called "oid_valid" instead. The following Coccinelle semantic patch was used to implement this, followed by the transformations in

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-03 Thread Johannes Sixt
with a name in column 1, pick the whole line Credits to Johannes Sixt (j...@kdbg.org) for the pattern regex and most of the tests. Signed-off-by: William Duclot <william.duc...@ensimag.grenoble-inp.fr> Signed-off-by: Matthieu Moy <matthieu@grenoble-inp.fr> --- Changes since V3: -

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-03 Thread Johannes Sixt
Am 03.06.2016 um 08:41 schrieb Matthieu Moy: Rejecting colon anywhere in the line would also reject valid patterns like this: a:hover { Rejecting it at end of line is probably a good trade-off. Good point. Could be worth another test case. -- Hannes -- To unsubscribe from this list: send

Re: [PATCH] t1308: do not get fooled by symbolic links to the source tree

2016-06-03 Thread Johannes Sixt
Am 03.06.2016 um 08:10 schrieb Jeff King: On Fri, Jun 03, 2016 at 08:05:56AM +0200, Johannes Sixt wrote: - name=$(pwd)/.gitconfig + name=$HOME/.gitconfig I haven't tested this, yet, but my guess is that this breaks on Windows: test-config will produce C:/foo style path

Re: [PATCH] t1308: do not get fooled by symbolic links to the source tree

2016-06-03 Thread Johannes Sixt
Am 03.06.2016 um 00:15 schrieb Junio C Hamano: When your $PWD does not match $(/bin/pwd), e.g. you have your copy of the git source tree in one place, point it with a symbolic link, and then "cd" to that symbolic link before running 'make test', one of the tests in t1308 expects that the

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-06-02 Thread Johannes Sixt
Am 03.06.2016 um 00:48 schrieb William Duclot: Logic behind the "pattern" regex is: The name of the macro parameter is "pattern", but the actual meaning is "function name" regex. diff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt index e3b1de8..81f60ad 100644

Re: git gc and worktrees

2016-06-01 Thread Johannes Sixt
Am 01.06.2016 um 00:14 schrieb Jeff King: > Right, we use the index for reachability checks (both in "prune", but > also during a "repack -a", which uses the revision parser's > '--indexed-objects" option). That obviously should handle per-worktree > index files, but I don't know whether it

Re: [PATCH] t4014: shell portability fix

2016-05-31 Thread Johannes Sixt
Am 01.06.2016 um 05:31 schrieb Jeff King: printf '%s' "$1" | sed "s/'/'''/g" ... export -p | grep "^declare -x $1=" ... "$fake_env_var_=$(shellquote "$fake_env_orig_")" ... eval

git gc and worktrees

2016-05-31 Thread Johannes Sixt
Earlier this year I had a largish merge going on in a separate worktree. With a mix of staged resolutions and unmerged paths in the index, I ran 'git gc' in the main worktree. This removed a lot of objects that were recorded in that separate worktree index. (I was able to recover them because

How to cut extra liftime of expired loose objects

2016-05-30 Thread Johannes Sixt
I think there is logic somewhere in git gc or its minions that gives expired objects that have been packed a two weeks extra life time as loose objects. That is, reachable loose objects are moved to a pack, but those objects that were packed, but become unreachable due to expired reflogs, are

Re: Small rerere in rebase regression

2016-05-27 Thread Johannes Sixt
h after "git commit" fails. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- git-rebase--interactive.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh index 9d2bfb7..6e96abc 100644 --- a/git-rebase--interactive.sh +++ b/gi

Re: [PATCH] userdiff: add built-in pattern for CSS

2016-05-26 Thread Johannes Sixt
Am 24.05.2016 um 16:25 schrieb William Duclot: > +PATTERNS("css", > + "^([^,{}]+)((,[^}]*\\{)|([ \t]*\\{))$", This hunk header pattern is a bit too restrictive for my taste. Find below a few more test cases that you should squash in. One case fails because only the first CSS selector is

Re: Small rerere in rebase regression

2016-05-24 Thread Johannes Sixt
Am 24.05.2016 um 00:11 schrieb Junio C Hamano: Johannes Sixt <j...@kdbg.org> writes: However, calling "git rerere" after a failed "git commit" may be destructive: it would record a resolution even though the commit has not be completed. Think of an squash commit bein

Re: Small rerere in rebase regression

2016-05-24 Thread Johannes Sixt
Am 24.05.2016 um 15:18 schrieb Johannes Schindelin: Hannes, could you quickly test whether https://github.com/dscho/git/tree/interactive-rebase calls rerere twice, too? (Please call interactive rebase with the GIT_USE_REBASE_HELPER=true to avoid running the interactive rebase twice.) I have a

Re: Small rerere in rebase regression

2016-05-23 Thread Johannes Sixt
Am 23.05.2016 um 21:43 schrieb Junio C Hamano: Johannes Sixt <j...@kdbg.org> writes: I'm not sure whether the new behavior is a defect in rerere.c or a consequence of the extra rerere call in interactive rebase... Interesting. When running an unnecessary "git rerere" (be

Small rerere in rebase regression

2016-05-23 Thread Johannes Sixt
Even though I operate with jc/rerere-multi for some time now, I noticed this regression only recently. Watch out for the duplicated "Recorded preimage" message: gittest@side:1078> strace -f -o /tmp/git-rebase-conflict.strace git rebase -i master error: could not apply 59f92e0... side When you

Re: [PATCH] rerere: plug memory leaks upon "rerere forget" failure

2016-05-19 Thread Johannes Sixt
Am 12.05.2016 um 01:32 schrieb Junio C Hamano: + if (unlink(filename)) { + if (errno == ENOENT) + error("no remembered resolution for %s", path); + else + error("cannot unlink %s: %s", filename, strerror(errno)); +

[PATCH] t6044: replace seq by test_seq

2016-05-17 Thread Johannes Sixt
seq is not available everywhere. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- t/t6044-merge-unrelated-index-changes.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t6044-merge-unrelated-index-changes.sh b/t/t6044-merge-unrelated-index-changes.sh index 2

Re: [BUG] A part of an edge from an octopus merge gets colored, even with --color=never

2016-05-17 Thread Johannes Sixt
Am 17.05.2016 um 21:45 schrieb Jeff King: On Tue, May 17, 2016 at 09:07:33PM +0200, Johannes Sixt wrote: Am 15.05.2016 um 15:05 schrieb Noam Postavsky: With a certain topology involving an octopus merge, git log --graph --oneline --all --color=never produces output which includes some ANSI

Re: [BUG] A part of an edge from an octopus merge gets colored, even with --color=never

2016-05-17 Thread Johannes Sixt
Am 15.05.2016 um 15:05 schrieb Noam Postavsky: With a certain topology involving an octopus merge, git log --graph --oneline --all --color=never produces output which includes some ANSI escape code coloring. Attached is a script to reproduce the problem (creates a git repository in subdir

Re: [PATCH v2 00/94] libify apply and use lib in am

2016-05-12 Thread Johannes Sixt
Am 11.05.2016 um 15:16 schrieb Christian Couder: This is a patch series about libifying `git apply` functionality, and using this libified functionality in `git am`, so that no 'git apply' process is spawn anymore. This makes `git am` significantly faster, so `git rebase`, when it uses the am

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Johannes Sixt
Am 11.05.2016 um 23:34 schrieb Junio C Hamano: Johannes Sixt <j...@kdbg.org> writes: As this path is read from a file git itself creates, and if we know that it will always contain forward slashes, then I agree that it could be potentially confusing to later readers

Re: [PATCH 24/25] worktree move: accept destination as directory

2016-05-11 Thread Johannes Sixt
Am 11.05.2016 um 19:32 schrieb Eric Sunshine: On Wed, May 11, 2016 at 9:34 AM, Duy Nguyen wrote: On Wed, May 11, 2016 at 11:43 AM, Eric Sunshine wrote: On Wed, Apr 13, 2016 at 9:15 AM, Nguyễn Thái Ngọc Duy wrote: + if

Re: [git-for-windows] [PATCH] exec_cmd.c, sideband.c, Makefile: avoid multiple PREFIX definitions

2016-05-06 Thread Johannes Sixt
Am 05.05.2016 um 23:28 schrieb Philip Oakley: The short and sweet PREFIX can be confused when used in many places. Rename both usages to better describe their purpose. Noticed when compiling Git for Windows using MSVC/Visual Studio which reports the conflict beteeen the command line definition

Re: [PATCH 80/83] run-command: make dup_devnull() non static

2016-05-05 Thread Johannes Sixt
Am 05.05.2016 um 11:50 schrieb Christian Couder: On Mon, Apr 25, 2016 at 5:05 PM, Johannes Schindelin wrote: Hi Chris, On Sun, 24 Apr 2016, Christian Couder wrote: diff --git a/run-command.c b/run-command.c index 8c7115a..29d2bda 100644 --- a/run-command.c +++

[PATCH jk/push-client-deadlock-fix] Windows: add pthread_sigmask() that does nothing

2016-05-01 Thread Johannes Sixt
is that write() calls return EPIPE when the reader closes the pipe. This is how write() behaves on Windows. Signed-off-by: Johannes Sixt <j...@kdbg.org> --- compat/mingw.h | 1 + compat/win32/pthread.h | 5 + 2 files changed, 6 insertions(+) diff --git a/compat/mingw.h b/compat/mingw.h

Re: Bisect limited to Merge Commits

2016-04-27 Thread Johannes Sixt
Am 27.04.2016 um 22:56 schrieb Junio C Hamano: So being able to stop at only commits on the first-parent chain is a valid and useful tool. "git bisect --first-parent" is one of the things that are sometimes asked for. With origin pointing to git.git, I attempted this: git bisect start git

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-27 Thread Johannes Sixt
Am 27.04.2016 um 08:43 schrieb Johannes Schindelin: On Tue, 26 Apr 2016, Johannes Sixt wrote: Should we insert a check for MAP_PRIVATE to catch unexpected use-cases (think of the index-helper daemon effort)? I agree, we should have such a check. The line above the `die("Invalid

Re: [PATCH 2/2] merge: warn --no-commit merge when no new commit is created

2016-04-26 Thread Johannes Sixt
Am 26.04.2016 um 23:37 schrieb Junio C Hamano: * The necessary update to avoid end-user mistake would look like this. I am not queuing this or further working on it myself, as I am not sure if it is all that useful. Whoever picks up this patch, be warned that the i18n coding should

Re: [PATCH 2/3] mmap(win32): avoid copy-on-write when it is unnecessary

2016-04-26 Thread Johannes Sixt
Am 22.04.2016 um 16:31 schrieb Johannes Schindelin: Often we are mmap()ing read-only. In those cases, it is wasteful to map in copy-on-write mode. Even worse: it can cause errors where we run out of space in the page file. So let's be extra careful to map files in read-only mode whenever

Re: [PATCH v2] hooks: Add ability to specify where the hook directory is

2016-04-25 Thread Johannes Sixt
Am 24.04.2016 um 23:18 schrieb Ævar Arnfjörð Bjarmason: +test_expect_success 'set up a pre-commit hook in core.hooksPath' ' + mkdir -p .git/custom-hooks .git/hooks && + write_script .git/custom-hooks/pre-commit <>.git/PRE-COMMIT-HOOK-WAS-CALLED +EOF + cat >.git/hooks/pre-commit

Re: git rebase -i without altering the committer date

2016-04-20 Thread Johannes Sixt
Am 20.04.2016 um 23:47 schrieb Andreas Schwab: Shaun Jackman writes: I'd like to insert a commit between two commits without changing the committer date or author date of that commit or the subsequent commits. The easiest way to implement that is to add a graft to

Re: [PATCH 2/5] run-command: teach async threads to ignore SIGPIPE

2016-04-20 Thread Johannes Sixt
Am 20.04.2016 um 00:49 schrieb Jeff King: This is our first use of pthread_sigmask, and I think Windows will have to come up with something for this in compat/. I don't know how SIGPIPE works there at all, so it's possible that we can just turn this into a noop. Worst case it could probably

Re: [PATCH v2 1/2] test-lib: add a function to compare an expection with stdout from a command

2016-04-17 Thread Johannes Sixt
Am 17.04.2016 um 05:07 schrieb Eric Sunshine: Hmm, considering that $(...) collapses each whitespace run (including newlines) down to a single space, I don't see how you could get a multi-line result. No, it doesn't. It only removes trailing newlines: ~:1004> frotz=$(echo 1; echo; echo 2;

Re: [PATCH v2 2/2] t1500-rev-parse: rewrite each test to run in isolation

2016-04-17 Thread Johannes Sixt
Am 17.04.2016 um 07:59 schrieb Eric Sunshine: On Sat, Apr 16, 2016 at 12:13:50PM -0400, Michael Rappazzo wrote: +test_expect_success 'GIT_DIR=../.git, core.bare = false: prefix' ' + mkdir work && + test_when_finished "rm -rf work" && + test_config -C "$(pwd)"/.git core.bare

Re: [PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-14 Thread Johannes Sixt
Am 14.04.2016 um 20:18 schrieb Stefan Beller: > @@ -298,4 +305,40 @@ test_git_path GIT_COMMON_DIR=bar config > bar/config > test_git_path GIT_COMMON_DIR=bar packed-refs bar/packed-refs > test_git_path GIT_COMMON_DIR=bar shallow bar/shallow >

Re: [PATCH v3 03/16] index-helper: new daemon for caching index and related stuff

2016-04-07 Thread Johannes Sixt
Am 07.04.2016 um 00:11 schrieb David Turner: +static void share_index(struct index_state *istate, struct shm *is) +{ + void *new_mmap; + if (istate->mmap_size <= 20 || + hashcmp(istate->sha1, + (unsigned char *)istate->mmap + istate->mmap_size - 20) || +

Re: [PATCH] diff: run arguments through precompose_argv

2016-04-05 Thread Johannes Sixt
Am 05.04.2016 um 19:09 schrieb Junio C Hamano: Thanks-to: Torsten Bögershausen I sense NFD disease: The combining diaresis should combine with the o, not the g. Here is a correct line to copy-and-paste if you like: Thanks-to: Torsten Bögershausen -- Hannes

Re: [PATCH v3 1/4] builtin/verify-tag.c: Ignore SIGPIPE on gpg-interface

2016-04-03 Thread Johannes Sixt
Am 03.04.2016 um 01:16 schrieb santi...@nyu.edu: From: Santiago Torres The verify_signed_buffer comand might cause a SIGPIPE signal when the gpg child process terminates early (due to a bad keyid, for example) and git tries to write to it afterwards. Previously, ignoring

Re: [PATCH v2 6/7] t5520: reduce commom lines of code

2016-04-03 Thread Johannes Sixt
Am 03.04.2016 um 08:24 schrieb Mehul Jain: On Sun, Apr 3, 2016 at 12:20 AM, Johannes Sixt <j...@kdbg.org> wrote: Am 02.04.2016 um 19:58 schrieb Mehul Jain: +for i in --autostash --no-autostash +do + test_expect_success "pull $i (without --rebase)

Re: [PATCH 1/4] config --show-origin: report paths with forward slashes

2016-04-02 Thread Johannes Sixt
Am 29.03.2016 um 22:05 schrieb Junio C Hamano: > Johannes Sixt <j...@kdbg.org> writes: > >> This part of your 45bf3297 (t1300: fix the new --show-origin tests on >> Windows) >> >> @@ -1205,6 +1205,9 @@ test_expect_success POSIXPERM,PERL 'preserves existing &

Re: [PATCH 1/4] config --show-origin: report paths with forward slashes

2016-04-02 Thread Johannes Sixt
Am 30.03.2016 um 07:52 schrieb Johannes Sixt: Am 29.03.2016 um 21:18 schrieb Johannes Sixt: It does pass. The reason is that pwd -W generates forward slashes. It just occurred to me that we might be observing a difference in behavior of pwd -W between the modern MSYS2 bash and the old MSYS1

Re: [PATCH v2 6/7] t5520: reduce commom lines of code

2016-04-02 Thread Johannes Sixt
Am 02.04.2016 um 19:58 schrieb Mehul Jain: These two tests are almost similar and thus can be folded in a for-loop. Helped-by: Eric Sunshine Signed-off-by: Mehul Jain --- t/t5520-pull.sh | 16 +++- 1 file changed, 7

Re: [PATCH 1/4] config --show-origin: report paths with forward slashes

2016-03-29 Thread Johannes Sixt
Am 29.03.2016 um 21:18 schrieb Johannes Sixt: Am 28.03.2016 um 17:14 schrieb Johannes Schindelin: The problem with your patch is that it does not account for backslashes in paths resulting in quoting. I am afraid that your patch will most likely *not* let the tests pass in Git for Windows SDK

Re: [PATCH 1/4] config --show-origin: report paths with forward slashes

2016-03-29 Thread Johannes Sixt
Am 28.03.2016 um 17:14 schrieb Johannes Schindelin: > Hi Hannes, > > On Mon, 28 Mar 2016, Johannes Sixt wrote: > >> A change like this whould have been preferable: >> [...] > > The problem with your patch is that it does not account for backslashes in > paths

Re: [PATCH 1/4] config --show-origin: report paths with forward slashes

2016-03-28 Thread Johannes Sixt
Am 22.03.2016 um 18:42 schrieb Johannes Schindelin: > On Windows, the backslash is the native directory separator, but all > supported Windows versions also accept the forward slash in most > circumstances. > > Our tests expect forward slashes. > > Relative paths are generated by Git using

Re: [PATCH] rebase -x: do not die without -i

2016-03-19 Thread Johannes Sixt
Am 17.03.2016 um 02:19 schrieb Stefan Beller: -test_expect_success 'rebase --exec without -i shows error message' ' +test_expect_success 'rebase --exec works without -i ' ' git reset --hard execute && - set_fake_editor && - test_must_fail git rebase --exec "git show HEAD"

Re: [PATCH 0/1] Introduce a way to create a branch and worktree at the same time

2016-03-15 Thread Johannes Sixt
Am 11.03.2016 um 03:57 schrieb Mikael Magnusson: You can have /usr/src/git/master, /usr/src/git/some-work-tree, etc, and /usr/src/git itself is not a git repository at all. That way /usr/src only has one git-related directory and no worktrees are nested. I started using separate worktrees

<    1   2   3   4   5   6   7   8   9   10   >