A bug in git-add with GIT_DIR?

2018-12-20 Thread Orgad Shaneh
Hi, I played around with t5403-post-checkout-hook, and noticed that its state is not exactly what I'd expect it to be. The test setup is: echo Data for commit0. >a && echo Data for commit0. >b && git update-index --add a && git update-index --add b && tree0=$(git write-tree) && commit0=$(echo set

Re: [PATCH 0/8] introduce no-overlay and cached mode in git checkout

2018-12-20 Thread Thomas Gummerer
On 12/10, Junio C Hamano wrote: > Thomas Gummerer writes: > > > Basically the idea is to also delete files when the match > > in 'git checkout -- ' in the current tree, but > > don't match in . > > I cannot quite parse it, but perhaps. > > "git checkout --no-overlay -- " can > r

Re: Periodic hang during git index-pack

2018-12-20 Thread Sitsofe Wheeler
On Wed, 19 Dec 2018 at 23:22, Jeff King wrote: > > On Wed, Dec 19, 2018 at 10:59:30PM +, Sitsofe Wheeler wrote: > > > While using trying to use git to clone a remote repository git > > index-pack occasionally goes on to hang: > > [...] > > Looking at where it is stuck, git is doing read of a p

[PATCH 2/7] add--helper: create builtin helper for interactive add

2018-12-20 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Create a builtin helper for git-add--interactive, which right now is not able to do anything. This is the first step in an effort to convert git-add--interactive.perl to a C builtin, in search for better portability, expressibility and performance (specially on non-POSIX sy

[PATCH 3/7] add-interactive.c: implement status command

2018-12-20 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Add new files: add-interactive.c and add-interactive.h, which will be used for implementing "application logic" of git add -i, whereas add--helper.c will be used mostly for parsing the command line. We're a bit lax with the command-line parsing, as the command is intended to

[PATCH 1/7] diff: export diffstat interface

2018-12-20 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Make the diffstat interface (namely, the diffstat_t struct and compute_diffstat) no longer be internal to diff.c and allow it to be used by other parts of git. This is helpful for code that may want to easily extract information from files using the diff machinery, while fl

[PATCH 4/7] add--interactive.perl: use add--helper --status for status_cmd

2018-12-20 Thread Daniel Ferreira via GitGitGadget
From: Daniel Ferreira Call the newly introduced add--helper builtin on status_cmd() instead of relying on add--interactive's Perl functions to build print the numstat. Signed-off-by: Daniel Ferreira Signed-off-by: Slavica Djukic --- git-add--interactive.perl | 4 +--- 1 file changed, 1 insert

[PATCH 6/7] Git.pm: introduce environment variable GIT_TEST_PRETEND_TTY

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic To enable testing the colored output on Windows, enable TTY by using environment variable GIT_TEST_PRETEND_TTY. This is the original idea by Johannes Schindelin. Signed-off-by: Slavica Djukic --- color.c | 4 perl/Git.pm | 2 +- 2 files changed, 5 insertions(+),

[PATCH 5/7] add-interactive.c: implement show-help command

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Implement show-help command in add-interactive.c and use it in builtin add--helper.c. Use command name "show-help" instead of "help": add--helper is builtin, hence add--helper --help would be intercepted by handle_builtin and re-routed to the help command, without ever calli

[PATCH 7/7] add--interactive.perl: use add--helper --show-help for help_cmd

2018-12-20 Thread Slavica Djukic via GitGitGadget
From: Slavica Djukic Change help_cmd sub in git-add--interactive.perl to use show-help command from builtin add--helper. Add test to t3701-add-interactive to verify that show-help outputs expected content. Use GIT_PRETENT_TTY introduced in earlier commit to be able to test output color on Window

[PATCH 0/7] Turn git add-i into built-in

2018-12-20 Thread Johannes Schindelin
From: "Slavica Đukić via GitGitGadget" This is the first version of a patch series to start porting git-add--interactive from Perl to C. Daniel Ferreira's patch series used as a head start: https://public-inbox.org/git/1494907234-28903-1-git-send-email-bnm...@gmail.com/t/#u Daniel Ferreira (4):

Re: [PATCH 0/7] Turn git add-i into built-in

2018-12-20 Thread Johannes Schindelin
Hi, just a note: this mail had not been sent by GitGitGadget (and hence has me as sender, even if the email address is GitGitGadget's) because it still has problems with From: and To: and Cc: headers that contain non-ASCII characters. I hope to find the time soon to work on this. Ciao, Johannes

Re: [PATCH 2/8] entry: factor out unlink_entry function

2018-12-20 Thread Thomas Gummerer
On 12/10, Duy Nguyen wrote: > On Sun, Dec 9, 2018 at 9:05 PM Thomas Gummerer wrote: > > > > Factor out the 'unlink_entry()' function from unpack-trees.c to > > entry.c. It will be used in other places as well in subsequent > > steps. > > > > As it's no longer a static function, also move the docu

[PATCH v2 5/8] checkout: clarify comment

2018-12-20 Thread Thomas Gummerer
The key point for the if statement is that read_tree_some did not update the entry, because either it doesn't exist in tree-ish or doesn't match the pathspec. Clarify that. Suggested-by: Nguyễn Thái Ngọc Duy Signed-off-by: Thomas Gummerer --- builtin/checkout.c | 8 1 file changed, 4

[PATCH v2 3/8] entry: support CE_WT_REMOVE flag in checkout_entry

2018-12-20 Thread Thomas Gummerer
'checkout_entry()' currently only supports creating new entries in the working tree, but not deleting them. Add the ability to remove entries at the same time if the entry is marked with the CE_WT_REMOVE flag. Currently this doesn't have any effect, as the CE_WT_REMOVE flag is only used in unpack

[PATCH v2 2/8] entry: factor out unlink_entry function

2018-12-20 Thread Thomas Gummerer
Factor out the 'unlink_entry()' function from unpack-trees.c to entry.c. It will be used in other places as well in subsequent steps. As it's no longer a static function, also move the documentation to the header file to make it more discoverable. Signed-off-by: Thomas Gummerer --- cache.h

[PATCH v2 0/8] introduce no-overlay mode in git checkout

2018-12-20 Thread Thomas Gummerer
Previous round is at <20181209200449.16342-1-t.gumme...@gmail.com>. Thanks Junio, Duy and Elijah for your comments and suggestions on the previous round. This round drops the last three patches from the previous round, namely introducing a "--cached" and a "--ignore-unmatched" option, and using t

[PATCH v2 4/8] read-cache: add invalidate parameter to remove_marked_cache_entries

2018-12-20 Thread Thomas Gummerer
When marking cache entries for removal, and later removing them all at once using 'remove_marked_cache_entries()', cache entries currently have to be invalidated manually in the cache tree and in the untracked cache. Add an invalidate flag to the function. With the flag set, the function will tak

[PATCH v2 1/8] move worktree tests to t24*

2018-12-20 Thread Thomas Gummerer
The 'git worktree' command used to be just another mode in 'git checkout', namely 'git checkout --to'. When the tests for the latter were retrofitted for the former, the test name was adjusted, but the test number was kept, even though the test is testing a different command now. t/README states:

[PATCH v2 7/8] checkout: introduce --{,no-}overlay option

2018-12-20 Thread Thomas Gummerer
Currently 'git checkout' is defined as an overlay operation, which means that if in 'git checkout -- []' we have an entry in the index that matches , but that doesn't exist in , that entry will not be removed from the index or the working tree. Introduce a new --{,no-}overlay option, which allows

[PATCH v2 6/8] checkout: factor out mark_cache_entry_for_checkout function

2018-12-20 Thread Thomas Gummerer
Factor out the code that marks a cache entry as matched for checkout into a separate function. We are going to introduce a new mode in 'git checkout' in a subsequent commit, that is going to have a slightly different logic. This would make this code unnecessarily complex. Moving that complexity

[PATCH v2 8/8] checkout: introduce checkout.overlayMode config

2018-12-20 Thread Thomas Gummerer
In the previous patch we introduced a new no-overlay mode for git checkout. Some users (such as the author of this commit) may want to have this mode turned on by default as it matches their mental model more closely. Make that possible by introducing a new config option to that extend. Signed-o

Re: [PATCH 1/3] setup: drop return value from `read_repository_format()`

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 03:45:55AM +, brian m. carlson wrote: > > > I will point out that with the SHA-256 work, reading the config file > > > becomes essential for SHA-256 repositories, because we need to know the > > > object format. Removing the config file leads to things blowing up in a >

Re: [PATCH v3 1/3] ref-filter: add worktreepath atom

2018-12-20 Thread Jeff King
On Wed, Dec 19, 2018 at 11:09:59PM -0800, Nickolai Belakovski wrote: > > Also, why are we replacing it with a single space? Wouldn't the empty > > string be more customary (and work with the other "if empty, then do > > this" formatting options)? > > I was just following what was done for HEAD, b

Re: Periodic hang during git index-pack

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 10:03:45AM +, Sitsofe Wheeler wrote: > > Check the backtrace of git-clone to see why it isn't feeding more data > > (but note that it will generally have two threads -- one processing the > > data from the remote, and one wait()ing for index-pack to finish). > > > > My

Re: A bug in git-add with GIT_DIR?

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 10:37:21AM +0200, Orgad Shaneh wrote: > I played around with t5403-post-checkout-hook, and noticed that its > state is not exactly what I'd expect it to be. > > The test setup is: > echo Data for commit0. >a && > echo Data for commit0. >b && > git update-index --add a && >

Re: A bug in git-add with GIT_DIR?

2018-12-20 Thread Orgad Shaneh
On Thu, Dec 20, 2018 at 5:18 PM Jeff King wrote: > > On Thu, Dec 20, 2018 at 10:37:21AM +0200, Orgad Shaneh wrote: > > > I played around with t5403-post-checkout-hook, and noticed that its > > state is not exactly what I'd expect it to be. > > > > The test setup is: > > echo Data for commit0. >a &

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 12:26:10AM +, brian m. carlson wrote: > In some shells, such as bash and zsh, it's possible to use a command > substitution to provide the output of a command as a file argument to > another process, like so: > > diff -u <(printf "a\nb\n") <(printf "a\nc\n") > > How

Re: [PATCH v3 1/4] pack-protocol.txt: accept error packets in any context

2018-12-20 Thread Jeff King
On Wed, Dec 19, 2018 at 03:30:05PM -0800, Josh Steadmon wrote: > > > > This is outside of the Git pack protocol so having a separate parsing > > > > mode makes sense to me. > > > > > > This sounds like it could be a significant refactoring. Should we go > > > back to V2 of this series, and then w

[PATCH 4/5] travis-ci: switch to Xcode 10.1 macOS image

2018-12-20 Thread SZEDER Gábor
When building something with GCC installed from Homebrew in the default macOS (with Xcode 9.4) image on Travis CI, it errors out with something like this: /usr/local/Cellar/gcc/8.1.0/lib/gcc/8/gcc/x86_64-apple-darwin17.5.0/8.1.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file

[PATCH 0/5] travis-ci: build with the right compiler

2018-12-20 Thread SZEDER Gábor
On Tue, Oct 16, 2018 at 08:45:37PM +0200, SZEDER Gábor wrote: > Our Makefile has lines like these: > > CFLAGS = -g -O2 -Wall > CC = cc > AR = ar > SPATCH = spatch > > Note the use of '=', not '?='. This means that these variables can be > overridden from the command line, i.e. 'make CC

[PATCH 5/5] travis-ci: build with the right compiler

2018-12-20 Thread SZEDER Gábor
Our 'Makefile' hardcodes the compiler to build Git as 'CC = cc'. This can be overridden from the command line, i.e. 'make CC=gcc-X.Y' will build with that particular GCC version, but not from the environment, i.e. 'CC=gcc-X.Y make' will still build with whatever 'cc' happens to be on the platform.

[PATCH 2/5] .gitignore: ignore external debug symbols from GCC on macOS

2018-12-20 Thread SZEDER Gábor
When Git is build with a "real" GCC on macOS [1], or at least with GCC installed via Homebrew, and CFLAGS includes the '-g' option (and our default CFLAGS does), then by default GCC writes the debug symbols into external files under '.dSYM/' directories (e.g. 'git-daemon.dSYM/', 'git.dSYM/', etc.).

[PATCH 3/5] travis-ci: don't be '--quiet' when running the tests

2018-12-20 Thread SZEDER Gábor
All Travis CI build jobs run the test suite with 'make --quiet test'. On one hand, being quiet doesn't save us from much clutter in the output: $ make test |wc -l 861 $ make --quiet test |wc -l 848 It only spares 13 lines, mostly the output of entering the 't/' directory and the pre- and

[PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2018-12-20 Thread SZEDER Gábor
When building Git with GCC 8.2.0 (at least from Homebrew on macOS, DEVELOPER flags enabled) one is greeted with a screenful of compiler errors: compat/obstack.c: In function '_obstack_begin': compat/obstack.c:162:17: error: cast between incompatible function types from 'void * (*)(long int)'

[PATCH] t5570: drop racy test

2018-12-20 Thread Thomas Gummerer
On 11/26, Jeff King wrote: > On Sun, Nov 25, 2018 at 10:01:38PM +, Thomas Gummerer wrote: > > > On 11/25, Torsten Bögershausen wrote: > > > After running the "Git 2.20-rc1" testsuite here on a raspi, > > > the only TC that failed was t5570. > > > When the "grep" was run on daemon.log, the fil

Re: Periodic hang during git index-pack

2018-12-20 Thread Sitsofe Wheeler
On Thu, 20 Dec 2018 at 15:11, Jeff King wrote: > > OK, that's about what I expected. Here we have clone's sideband-demux > thread waiting to pull more packfile data from the remote: > > > (gdb) thread apply all bt > > > > Thread 2 (Thread 0x7faafbf1c700 (LWP 36586)): > > #0 0x7faafc805384 in

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Duy Nguyen
On Thu, Dec 20, 2018 at 1:26 AM brian m. carlson wrote: > @@ -5159,6 +5159,8 @@ int diff_opt_parse(struct diff_options *options, > options->flags.funccontext = 1; > else if (!strcmp(arg, "--no-function-context")) > options->flags.funccontext = 0; > + e

Re: [PATCH] t5570: drop racy test

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 04:41:50PM +, Thomas Gummerer wrote: > > That doesn't really fix it, but just broadens the race window. I dunno. > > Maybe that is enough in practice. We could do something like: > > > > repeat_with_timeout () { > > local i=0 > > while test $i -lt 10 > >

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 06:06:11PM +0100, Duy Nguyen wrote: > On Thu, Dec 20, 2018 at 1:26 AM brian m. carlson > wrote: > > @@ -5159,6 +5159,8 @@ int diff_opt_parse(struct diff_options *options, > > options->flags.funccontext = 1; > > else if (!strcmp(arg, "--no-function-c

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Duy Nguyen
On Thu, Dec 20, 2018 at 6:18 PM Jeff King wrote: > > I wonder if --follow-symlinks would be a good alternative for this > > (then if the final destination is unmmapable then we just read the > > file whole in memory without the user asking, so it will work with > > pipes). --follow-symlinks then c

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 06:23:42PM +0100, Duy Nguyen wrote: > On Thu, Dec 20, 2018 at 6:18 PM Jeff King wrote: > > > I wonder if --follow-symlinks would be a good alternative for this > > > (then if the final destination is unmmapable then we just read the > > > file whole in memory without the u

rebase: Ask before doing anything not undoable

2018-12-20 Thread Ricardo Biehl Pasquali
It was the second time I've typed "git rebase --co", hit tab (for completion) and enter, and the result was --committer-date-is-author-date instead of --continue . Please do ask user before run actions like these! I have not found a way to undo that. I had to perform a reset in the repository. PS

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Duy Nguyen
On Thu, Dec 20, 2018 at 6:32 PM Jeff King wrote: > > On Thu, Dec 20, 2018 at 06:23:42PM +0100, Duy Nguyen wrote: > > > On Thu, Dec 20, 2018 at 6:18 PM Jeff King wrote: > > > > I wonder if --follow-symlinks would be a good alternative for this > > > > (then if the final destination is unmmapable t

Re: rebase: Ask before doing anything not undoable

2018-12-20 Thread Thomas Braun
Am 20.12.2018 um 18:33 schrieb Ricardo Biehl Pasquali: > It was the second time I've typed "git rebase --co", > hit tab (for completion) and enter, and the result was > --committer-date-is-author-date instead of --continue . > > Please do ask user before run actions like these! I have > not found

Re: rebase: Ask before doing anything not undoable

2018-12-20 Thread Ricardo Biehl Pasquali
On Thu, Dec 20, 2018 at 07:28:20PM +0100, Thomas Braun wrote: > Do you know about the reflog? This let's you undo these kind of changes. > See git help reflog. I didn't. This should be documented in rebase manual page. Perhaps a message after the command might be interesting (e.g.: "to undo use g

Security Alert. You account has been hacked. Password must be need changed.

2018-12-20 Thread git
Hello! As you may have noticed, I sent you an email from your account. This means that I have full access to your account: On moment of hack your account has password: esign You say: this is the old password! Or: I will change my password at any time! Yes! You're right! But the fact is that wh

Security Alert. You account has been hacked. Password must be need changed.

2018-12-20 Thread git
Hello! As you may have noticed, I sent you an email from your account. This means that I have full access to your account: On moment of hack your account has password: callgsm01 You say: this is the old password! Or: I will change my password at any time! Yes! You're right! But the fact is tha

Security Scam Warning.

2018-12-20 Thread git
Hello! As you may have noticed, I sent you an email from your account. This means that I have full access to your account: On moment of hack your account has password: ever You say: this is the old password! Or: I will change my password at any time! Yes! You're right! But the fact is that whe

Re: [PATCH v4 0/3] Add commit-graph fuzzer and fix buffer overflow

2018-12-20 Thread Johannes Schindelin
Hi Peff, On Wed, 19 Dec 2018, Jeff King wrote: > On Tue, Dec 18, 2018 at 01:05:51PM -0800, Josh Steadmon wrote: > > > On 2018.12.18 12:35, Jeff King wrote: > > > On Thu, Dec 13, 2018 at 11:43:55AM -0800, Josh Steadmon wrote: > > > > > > > Add a new fuzz test for the commit graph and fix a buff

[PATCH v12 01/26] sha1-name.c: add `get_oidf()` which acts like `get_oid()`

2018-12-20 Thread Paul-Sebastian Ungureanu
Compared to `get_oid()`, `get_oidf()` has as parameters a pointer to `object_id`, a printf format string and additional arguments. This will help simplify the code in subsequent commits. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- cache.h | 1 + sha1-n

[PATCH v12 03/26] strbuf.c: add `strbuf_insertf()` and `strbuf_vinsertf()`

2018-12-20 Thread Paul-Sebastian Ungureanu
Implement `strbuf_insertf()` and `strbuf_vinsertf()` to insert data using a printf format string. Original-idea-by: Johannes Schindelin Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 36 strbuf.h | 9 + 2 files changed, 45 insertions(+) dif

[PATCH v12 04/26] ident: add the ability to provide a "fallback identity"

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Johannes Schindelin In 3bc2111fc2e9 (stash: tolerate missing user identity, 2018-11-18), `git stash` learned to provide a fallback identity for the case that no proper name/email was given (and `git stash` does not really care about a correct identity anyway, but it does want to create a co

[PATCH v12 18/26] stash: convert push to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash push to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 245 +++- git-stash.sh| 6 +- 2 files changed, 245 insertions(+), 6 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c i

[PATCH v12 12/26] stash: convert branch to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash branch to the helper and delete the apply_to_branch function from the shell script. Checkout does not currently provide a function for checking out a branch as cmd_checkout does a large amount of sanity checks first that we require here. Signed-off-by: Joel Teichr

[PATCH v12 05/26] stash: improve option parsing test coverage

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb In preparation for converting the stash command incrementally to a builtin command, this patch improves test coverage of the option parsing. Both for having too many parameters, or too few. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-

[PATCH v12 09/26] stash: mention options in `show` synopsis

2018-12-20 Thread Paul-Sebastian Ungureanu
Mention in the documentation, that `show` accepts any option known to `git diff`. Signed-off-by: Paul-Sebastian Ungureanu --- Documentation/git-stash.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/git-stash.txt b/Documentation/git-stash.txt index 7ef8c4

[PATCH v12 15/26] stash: convert show to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash show to the helper and delete the show_stash, have_stash, assert_stash_like, is_stash_like and parse_flags_and_rev functions from the shell script now that they are no longer needed. In shell version, although `git stash show` accepts `--index` and `--quiet` options, it ignores them. In

[PATCH v12 13/26] stash: convert pop to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add stash pop to the helper and delete the pop_stash, drop_stash, assert_stash_ref functions from the shell script now that they are no longer needed. Signed-off-by: Joel Teichroeb Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 39 ++

[PATCH v12 20/26] stash: convert save to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash save to the helper and delete functions which are no longer needed (`show_help()`, `save_stash()`, `push_stash()`, `create_stash()`, `clear_stash()`, `untracked_files()` and `no_changes()`). Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 50 ++ git-stash.sh

[PATCH v12 22/26] stash: replace all `write-tree` child processes with API calls

2018-12-20 Thread Paul-Sebastian Ungureanu
This commit replaces spawning `git write-tree` with API calls. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 41 - 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c ind

[PATCH v12 02/26] strbuf.c: add `strbuf_join_argv()`

2018-12-20 Thread Paul-Sebastian Ungureanu
Implement `strbuf_join_argv()` to join arguments into a strbuf. Signed-off-by: Paul-Sebastian Ungureanu --- strbuf.c | 15 +++ strbuf.h | 7 +++ 2 files changed, 22 insertions(+) diff --git a/strbuf.c b/strbuf.c index f6a6cf78b9..82e90f1dfe 100644 --- a/strbuf.c +++ b/strbuf.c

[PATCH v12 00/26] Convert "git stash" to C builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Hello, This is a new iteration of git-stash which also takes sd/stash-wo-user-name into account. I cherry-picked some of dscho's commits (from [1]) to keep the scripted version of `git stash` as `git-legacy-stash`. Thank you for your suggestions! Best, Paul [1] https://github.com/dscho/git Joe

[PATCH v12 14/26] stash: convert list to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash list to the helper and delete the list_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 31 +++ git-stash.sh| 7 +-- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/b

[PATCH v12 06/26] t3903: modernize style

2018-12-20 Thread Paul-Sebastian Ungureanu
Remove whitespaces after redirection operators and wrap long lines. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 120 --- 1 file changed, 61 insertions(+), 59 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index ac5562

[PATCH v12 11/26] stash: convert drop and clear to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add the drop and clear commands to the builtin helper. These two are each simple, but are being added together as they are quite related. We have to unfortunately keep the drop and clear functions in the shell script as functions are called with parameters internally that ar

[PATCH v12 26/26] tests: add a special setup where stash.useBuiltin is off

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Johannes Schindelin Add a GIT_TEST_STASH_USE_BUILTIN=false test mode which is equivalent to running with stash.useBuiltin=false. This is needed to spot that we're not introducing any regressions in the legacy stash version while we're carrying both it and the new built-in version. This imi

[PATCH v12 10/26] stash: convert apply to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Joel Teichroeb Add a builtin helper for performing stash commands. Converting all at once proved hard to review, so starting with just apply lets conversion get started without the other commands being finished. The helper is being implemented as a drop in replacement for stash so that whe

[PATCH v12 16/26] stash: convert store to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash store to the helper and delete the store_stash function from the shell script. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 62 + git-stash.sh| 43 ++-- 2 files changed, 64 insertions(+

[PATCH v12 07/26] stash: rename test cases to be more descriptive

2018-12-20 Thread Paul-Sebastian Ungureanu
Rename some test cases' labels to be more descriptive and under 80 characters per line. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3903-stash.sh | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh index 4e83facf23..98c25a671c

[PATCH v12 08/26] stash: add tests for `git stash show` config

2018-12-20 Thread Paul-Sebastian Ungureanu
This commit introduces tests for `git stash show` config. It tests all the cases where `stash.showStat` and `stash.showPatch` are unset or set to true / false. Signed-off-by: Paul-Sebastian Ungureanu --- t/t3907-stash-show-config.sh | 83 1 file changed, 83 i

[PATCH v12 19/26] stash: make push -q quiet

2018-12-20 Thread Paul-Sebastian Ungureanu
There is a change in behaviour with this commit. When there was no initial commit, the shell version of stash would still display a message. This commit makes `push` to not display any message if `--quiet` or `-q` is specified. Add tests for `--quiet`. Signed-off-by: Paul-Sebastian Ungureanu ---

[PATCH v12 24/26] stash: add back the original, scripted `git stash`

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Johannes Schindelin This simply copies the version as of sd/stash-wo-user-name verbatim. As of now, it is not hooked up. The next commit will change the builtin `stash` to hand off to the scripted `git stash` when `stash.useBuiltin=false`. Signed-off-by: Johannes Schindelin --- git-stas

[PATCH v12 21/26] stash: optimize `get_untracked_files()` and `check_changes()`

2018-12-20 Thread Paul-Sebastian Ungureanu
This commits introduces a optimization by avoiding calling the same functions again. For example, `git stash push -u` would call at some points the following functions: * `check_changes()` (inside `do_push_stash()`) * `do_create_stash()`, which calls: `check_changes()` and `get_untracked_files()

[PATCH v12 17/26] stash: convert create to builtin

2018-12-20 Thread Paul-Sebastian Ungureanu
Add stash create to the helper. Signed-off-by: Paul-Sebastian Ungureanu --- builtin/stash--helper.c | 453 +++- git-stash.sh| 2 +- 2 files changed, 453 insertions(+), 2 deletions(-) diff --git a/builtin/stash--helper.c b/builtin/stash--helper.c

[PATCH v12 25/26] stash: optionally use the scripted version again

2018-12-20 Thread Paul-Sebastian Ungureanu
From: Johannes Schindelin We recently converted the `git stash` command from Unix shell scripts to builtins. Let's end users a way out when they discover a bug in the builtin command: `stash.useBuiltin`. As the file name `git-stash` is already in use, let's rename the scripted backend to `git-l

[PATCH v12 23/26] stash: convert `stash--helper.c` into `stash.c`

2018-12-20 Thread Paul-Sebastian Ungureanu
The old shell script `git-stash.sh` was removed and replaced entirely by `builtin/stash.c`. In order to do that, `create` and `push` were adapted to work without `stash.sh`. For example, before this commit, `git stash create` called `git stash--helper create --message "$*"`. If it called `git stas

[RFC PATCH] fetch-pack: respect --no-update-shallow in v2

2018-12-20 Thread Jonathan Tan
While investigating t5537's failure revealed by Aevar's GIT_TEST_PROTOCOL_VERSION patches [1], I found an answer to my confusion that I described in [2]. Quoting the relevant part: > I'm also not sure why this issue only occurs with protocol v2. It's true > that, when using protocol v0, the server

Incorrect tree shown with ls-tree ref^{type}:{{folder}}

2018-12-20 Thread Stan Hu
Suppose I have a repository that has the following files: foo/bar/test1.txt foo/{{curly}}/test2.txt The following works fine: $ git ls-tree master^{tree} 04 tree 9284ac5fef7ad99a2bd508a8c89bde8bd1a88e9ffoo $ git ls-tree master^{tree}:foo 04 tree 69497de4d9a72713f87df8280a147e0a597c4

Unable to install latest git version. Claims git process pid running

2018-12-20 Thread David Brown
- [ ] I was not able to find an [open](https://github.com/git-for-windows/git/issues?q=is%3Aopen) or [closed](https://github.com/git-for-windows/git/issues?q=is%3Aclosed) issue matching what I'm seeing ### Setup - Which version of Git for Windows are you using? Is it 32-bit or 64-bit? $

Re: [PATCH v4 0/3] Add commit-graph fuzzer and fix buffer overflow

2018-12-20 Thread Jeff King
On Thu, Dec 20, 2018 at 08:35:57PM +0100, Johannes Schindelin wrote: > > I do wonder if we'll run into problems on Windows, though. > > As long as we're talking about Unix shell scripts, /dev/zero should be > fine, as we are essentially running in a variant of Cygwin. > > If you try to pass /dev

Re: rebase: Ask before doing anything not undoable

2018-12-20 Thread Ricardo Biehl Pasquali
Ccing the mailing list. On Thu, Dec 20, 2018 at 07:26:53PM +0100, Kevin Daudt wrote: > It would be anoying for users to have to constantly confirm when they > run git rebase --continue. Rather than asking confirmation, it would be > better to make it easy to go back to the previous state. I meant

Re: rebase: Ask before doing anything not undoable

2018-12-20 Thread Thomas Braun
Am 20.12.2018 um 22:11 schrieb Ricardo Biehl Pasquali: > Ccing the mailing list. > > On Thu, Dec 20, 2018 at 07:26:53PM +0100, Kevin Daudt wrote: >> It would be anoying for users to have to constantly confirm when they >> run git rebase --continue. Rather than asking confirmation, it would be >> b

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread Ævar Arnfjörð Bjarmason
On Thu, Dec 20 2018, brian m. carlson wrote: > We don't include a test for the pipe scenario because I couldn't get > that case to work in portable shell (although of course it works in > bash). I have, however, tested it on both macOS and Linux. No clue how > this works on Windows. You can (an

[PATCH 1/2] t5403: Refactor

2018-12-20 Thread orgads
From: Orgad Shaneh * Replace multiple clones and commits by test_commits. * Replace 3 invocations of awk by read. Signed-off-by: Orgad Shaneh --- t/t5403-post-checkout-hook.sh | 55 --- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/t/t5403-post

[PATCH 2/2] Rebase: Run post-checkout hook on checkout

2018-12-20 Thread orgads
From: Orgad Shaneh Signed-off-by: Orgad Shaneh --- builtin/rebase.c | 8 +++- t/t5403-post-checkout-hook.sh | 18 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index b5c99ec10c..78a09dcda2 100644 --- a/bui

[PATCH 1/2] t5403: Refactor

2018-12-20 Thread orgads
From: Orgad Shaneh * Replace multiple clones and commits by test_commits. * Replace 3 invocations of awk by read. Signed-off-by: Orgad Shaneh --- t/t5403-post-checkout-hook.sh | 55 --- 1 file changed, 18 insertions(+), 37 deletions(-) diff --git a/t/t5403-post

[PATCH 2/2] Rebase: Run post-checkout hook on checkout

2018-12-20 Thread orgads
From: Orgad Shaneh Signed-off-by: Orgad Shaneh --- builtin/rebase.c | 8 +++- t/t5403-post-checkout-hook.sh | 18 ++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/builtin/rebase.c b/builtin/rebase.c index b5c99ec10c..78a09dcda2 100644 --- a/bui

[PATCH v6 0/1] Advertise multiple supported proto versions

2018-12-20 Thread Josh Steadmon
Add a registry of supported wire protocol versions that individual commands can use to declare supported versions before contacting a server. The client will then advertise all supported versions, while the server will choose the first allowed version from the advertised list. Every command that a

[PATCH v6 1/1] protocol: advertise multiple supported versions

2018-12-20 Thread Josh Steadmon
Currently the client advertises that it supports the wire protocol version set in the protocol.version config. However, not all services support the same set of protocol versions. For example, git-receive-pack supports v1 and v0, but not v2. If a client connects to git-receive-pack and requests v2,

Re: [PATCH 1/5] compat/obstack: fix -Wcast-function-type warnings

2018-12-20 Thread Ævar Arnfjörð Bjarmason
On Thu, Dec 20 2018, SZEDER Gábor wrote: > When building Git with GCC 8.2.0 (at least from Homebrew on macOS, > DEVELOPER flags enabled) one is greeted with a screenful of compiler > errors: > > compat/obstack.c: In function '_obstack_begin': > compat/obstack.c:162:17: error: cast between in

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread brian m. carlson
On Thu, Dec 20, 2018 at 10:43:06PM +0100, Ævar Arnfjörð Bjarmason wrote: > > On Thu, Dec 20 2018, brian m. carlson wrote: > > > We don't include a test for the pipe scenario because I couldn't get > > that case to work in portable shell (although of course it works in > > bash). I have, however,

RE: error: Use of uninitialized value $hash in chomp

2018-12-20 Thread Andrew Shearer
Hi Thanks for reply, but sorry I don't know how to do that - I don't have the git source code or know how to debug it. Is there another way I can capture logging/debugging information while running "git svn clone" and send it to you? Thanks Andrew Shearer / Web Developer DDI 021 469 888 / and..

Re: rebase: Ask before doing anything not undoable

2018-12-20 Thread Ricardo Biehl Pasquali
On Thu, Dec 20, 2018 at 10:37:00PM +0100, Thomas Braun wrote: > The git rebase documentation has > > ORIG_HEAD is set to point at the tip of the branch before the reset. > > so doing > > git reset ORIG_HEAD > > does reset to the state before the rebase. That's pretty easy :-) > For avoiding the o

Re: [PATCH] diff: add support for reading files literally with --no-index

2018-12-20 Thread brian m. carlson
On Thu, Dec 20, 2018 at 10:48:41AM -0500, Jeff King wrote: > The distinction is a bit subtle, but I think treating only the actual > top-level arguments as symlinks would solve your problem, but still > allow a more detailed diff for the recursive cases. Yeah, I think that would be better. I'll ad

[no subject]

2018-12-20 Thread Nicholas Hsiang
Dear git: When I type `git remote --usage`, The command panel will prompt 'error: unknown option `usage', Then there will be `git remote` related instructions. But I type `git show --usage`, just display 'fatal: unrecognized argument: --usage'. ![git-show-command-no-display-usage.png](https://i.l

"git show --usage" no "usage" displayed

2018-12-20 Thread Nicholas Hsiang
Dear git: When I type `git remote --usage`, The command panel will prompt 'error: unknown option `usage', Then there will be `git remote` related instructions. But I type `git show --usage`, just display 'fatal: unrecognized argument: --usage'. ![git-show-command-no-display-usage.png](https://i.l

Re: [PATCH] log: add %S option (like --source) to log --format

2018-12-20 Thread Issac Trotts
Hi all, friendly ping. Is there still interest in merging this patch? Thanks, Issac On Wed, Dec 19, 2018 at 12:33 AM wrote: > > From: Issac Trotts > > Make it possible to write for example > > git log --format="%H,%S" > > where the %S at the end is a new placeholder that prints out the