Re: [PATCH v2] rebase -r: always reword merge -c

2019-05-16 Thread Johannes Schindelin
Hi Junio, I think this one fell through the cracks (at least I failed to find it in `pu`), but I deem it a bug fix worthy of including in v2.22.0. Ciao, Dscho On Thu, 2 May 2019, Phillip Wood wrote: > From: Phillip Wood > > If a merge can be fast-forwarded then make sure that we still edit th

STOP CONTACTING THE WRONG OFFICE FOR YOUR REAL FUNDS

2019-05-16 Thread info
<<< No Message Collected >>>

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

2019-05-16 Thread Johannes Sixt
Am 17.05.19 um 01:58 schrieb marcandre.lur...@redhat.com: > From: Marc-André Lureau > > This adds xfuncname and word_regex patterns for Rust, a quite > popular programming language. It also includes test cases for the > xfuncname regex (t4018) and updated documentation. > > The word_regex patter

Re: [PATCH v7 7/8 (edit)] blame: add a fingerprint heuristic to match ignored lines

2019-05-16 Thread Junio C Hamano
Barret Rhoden writes: > From: Michael Platings > > ... > Michael removed the bashisms from the tests. Will replace what's queued. Note that I have two extra SQUASH??? patches on top of the branch to make 'pu' build and test, which you may want to take a look at. Thanks. >From 82e68b47261a

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Fri, May 17, 2019 at 12:39:39AM -0400, Jeff King wrote: > > I think to trigger it you'd have to manually assemble an evil pack as I > > described (e.g., using the routines in t/lib-pack.sh). I'm going offline > > for a bit, but I may have a go at it later tonight or tomorrow. > > OK, doing so

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 09:22:34PM -0400, Jeff King wrote: > On Thu, May 16, 2019 at 09:09:50PM -0400, Jeff King wrote: > > > - will we ever append a presumed-thin base to the pack, only to later > > realize that we already have that object, creating a duplicate > > object in the pack?

Re: [PATCH v2 0/6] teach branch-specific options for format-patch

2019-05-16 Thread Junio C Hamano
Denton Liu writes: > diff --git a/Documentation/config/format.txt b/Documentation/config/format.txt > index dc77941c48..d387451573 100644 > --- a/Documentation/config/format.txt > +++ b/Documentation/config/format.txt > @@ -28,14 +28,22 @@ format.headers:: > > format.to:: > format.cc:: > +for

Re: [PATCH v3 3/3] send-email: do defaults -> config -> getopt in that order

2019-05-16 Thread Junio C Hamano
Junio C Hamano writes: > Ah, sorry that nobody noticed that case, but you are right. Because > the ident is used as a part of the key to find identity-specific > configuration values, if the command line gives one, we must have an > access to it before we start reading the configuration. In tha

Re: [RFC PATCH 3/3] list-objects-filter: implement composite filters

2019-05-16 Thread Junio C Hamano
Matthew DeVore writes: > Allow combining filters such that only objects accepted by all filters > are shown. The motivation for this is to allow getting directory > listings without also fetching blobs. This can be done by combining > blob:none with tree:. There are massive repositories that have

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 09:09:50PM -0400, Jeff King wrote: > - will we ever append a presumed-thin base to the pack, only to later > realize that we already have that object, creating a duplicate > object in the pack? If so, do we handle this correctly when > generating the index (I

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 09:02:06PM -0400, Eric Sunshine wrote: > On Thu, May 16, 2019 at 8:19 PM Jeff King wrote: > > On Thu, May 16, 2019 at 07:16:54PM -0400, Eric Sunshine wrote: > > > Is there > > > any existing code in Git for doing the relative fixups you mention for > > > other Git environm

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 04:15:09PM -0700, Jonathan Tan wrote: > > /* > > * Second pass: > > * - for all non-delta objects, look if it is used as a base for > > * deltas; > > * - if used as a base, uncompress the object and apply all deltas, > > * recursively checking if the resulting obje

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 8:19 PM Jeff King wrote: > On Thu, May 16, 2019 at 07:16:54PM -0400, Eric Sunshine wrote: > > Is there > > any existing code in Git for doing the relative fixups you mention for > > other Git environment variables? > > You can assign local_repo_env to child_process.env (or

[PATCH v2 3/6] format-patch: make cover letter subject configurable

2019-05-16 Thread Denton Liu
We used to populate the subject of the cover letter generated by git-format-patch with "*** SUBJECT HERE ***". However, if a user submits multiple patchsets, they may want to keep a consistent subject between rerolls. If git-format-patch is run on a branch that has `format..coverSubject` defined,

[PATCH v2 4/6] format-patch: move extra_headers logic later

2019-05-16 Thread Denton Liu
In a future patch, we need to perform the addition of To: and Cc: to extra_headers after the branch_name logic. Simply transpose this logic later in the function so that this happens. (This patch is best viewed with `git diff --color-moved`.) Note that this logic only depends on the `git_config` a

[PATCH v2 6/6] format-patch: read branch-specific To: and Cc: headers

2019-05-16 Thread Denton Liu
If a user wishes to keep track of whom to Cc: on individual patchsets, they must manually keep track of each recipient and fill it in with the `--cc` option on git-format-patch each time. However, on the Git mailing list, Cc:'s are typically never dropped. As a result, it would be nice to have a me

[PATCH v2 2/6] Doc: add more detail for git-format-patch

2019-05-16 Thread Denton Liu
In git-format-patch.txt, we were missing some key user information. First of all, using the `--to` and `--cc` options don't override `format.to` and `format.cc` variables, respectively. They add on to each other. Document this. In addition, document the special value of `--base=auto`. Finally, wh

[PATCH v2 1/6] t4014: clean up style

2019-05-16 Thread Denton Liu
In Git's tests, there is typically no space between the redirection operator and the filename. Remove these spaces. Since output is silenced when running without `-v` and debugging output is useful with `-v`, remove redirections to /dev/null. Change here-docs from `<<\EOF` to `<<-\EOF` so that th

[PATCH v2 5/6] string-list: create string_list_append_all

2019-05-16 Thread Denton Liu
In a future patch, we'll need to take one string_list and append it to the end of another. Create the `string_list_append_all` function which does this. Signed-off-by: Denton Liu --- string-list.c | 9 + string-list.h | 7 +++ 2 files changed, 16 insertions(+) diff --git a/string-li

[PATCH v2 0/6] teach branch-specific options for format-patch

2019-05-16 Thread Denton Liu
Hi all, I thought a lot about building the branch-specific include option but I opted against this because `format..coverSubject` is a branch-exclusive config option, whereas it doesn't make sense to have a `format.coverSubject` option. Thus, if we pursue this, we *need* to have a `format..*` sec

Re: [PATCH] Makefile: remove the NO_R_TO_GCC_LINKER flag

2019-05-16 Thread Jeff King
On Fri, May 17, 2019 at 08:21:09AM +0900, Junio C Hamano wrote: > Jeff King writes: > > > Far be it from me to care about AIX, but it seems like this is ripe for > > regressions, because we don't know which platforms were relying on "-R" > > instead of "-Wl,-rpath", and now everybody will be usi

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 07:16:54PM -0400, Eric Sunshine wrote: > On Thu, May 16, 2019 at 6:17 PM Jeff King wrote: > > On Thu, May 16, 2019 at 06:25:24PM +0700, Duy Nguyen wrote: > > > So you probably can still make it work by backing up $GIT_INDEX_FILE > > > (in case you need it), then unset it b

Re: [RFC PATCH 0/3] implement composite filters

2019-05-16 Thread Matthew DeVore
> On 2019/05/16, at 15:41, Jonathan Tan wrote: > > Thanks - seeing these patches reduces my concerns significantly. A Thank you for taking a look :) > > - LOFR_MARK_SEEN is tracked for LHS and RHS separately. To support an > arbitrary number of filters, we don't use object flags to track t

[PATCH v2] userdiff: add built-in pattern for rust

2019-05-16 Thread marcandre . lureau
From: Marc-André Lureau This adds xfuncname and word_regex patterns for Rust, a quite popular programming language. It also includes test cases for the xfuncname regex (t4018) and updated documentation. The word_regex pattern finds identifiers, integers, floats and operators, according to the Ru

Re: [PATCH v3] userdiff.c & doc/gitattributes.txt: add Octave

2019-05-16 Thread Junio C Hamano
Johannes Sixt writes: > I'd prefer to keep this list at the minimum necessary as long as it is > hard-coded in C. Yeah, I know that feeling. > I would take a different stance if this were some > configuration file that we ship. Hmm, now you reminded me of my ancient wish. Perhaps it is not to

Re: [PATCH] Makefile: remove the NO_R_TO_GCC_LINKER flag

2019-05-16 Thread Junio C Hamano
Jeff King writes: > Far be it from me to care about AIX, but it seems like this is ripe for > regressions, because we don't know which platforms were relying on "-R" > instead of "-Wl,-rpath", and now everybody will be using the latter by > default. I do not have a stake in AIX, either, but I ha

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jonathan Tan
> > > Right, REF_DELTA is definitely correctly handled currently, and I don't > > > think that would break with your patch. It's just that your patch would > > > introduce a bunch of extra traffic as we request bases separately that > > > are already in the pack. > > > > Ah...I see. For this probl

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 6:17 PM Jeff King wrote: > On Thu, May 16, 2019 at 06:25:24PM +0700, Duy Nguyen wrote: > > So you probably can still make it work by backing up $GIT_INDEX_FILE > > (in case you need it), then unset it before you use "git worktree" (or > > cd to it if you keep a permanent se

[PATCH v4 2/2] format-patch: teach format.notes config option

2019-05-16 Thread Denton Liu
In git-format-patch, notes can be appended with the `--notes` option. However, this must be specified by the user on an invocation-by-invocation basis. If a user is not careful, it's possible that they may forget to include it and generate a patch series without notes. Teach git-format-patch the `

[PATCH v4 1/2] git-format-patch.txt: document --no-notes option

2019-05-16 Thread Denton Liu
Internally, git-format-patch uses the `handle_revision_opt` parser. The parser handles the `--no-notes` option to negate an earlier `--notes` option, but it isn't documented. Document this option so that users are aware of it. Signed-off-by: Denton Liu --- Documentation/git-format-patch.txt | 4

[PATCH v4 0/2] format-patch: teach format.notes config option

2019-05-16 Thread Denton Liu
Hi Junio, I've changed format.notes so that it can accept a boolean as well. Hopefully, my last email has addressed the remainder of your comments. Changes since v3: * Made format.notes accept a boolean instead of "standard" to get default notes Changes since v2: * Fixed if-else code style *

Re: [PATCH v3 3/3] send-email: do defaults -> config -> getopt in that order

2019-05-16 Thread Junio C Hamano
Stephen Boyd writes: >> As can be seen in this change the only place where we actually want to >> do something clever is with the to/cc/bcc variables, where setting >> them on the command-line (or using --no-{to,cc,bcc}) should clear out >> values we grab from the config. >> >> All the rest are

Re: [PATCH v3 2/2] Doc: git.txt: remove backticks from link and add git-scm.com/docs

2019-05-16 Thread Philip Oakley
On 16/05/2019 23:22, Jeff King wrote: On Thu, May 16, 2019 at 12:25:47PM +0100, Philip Oakley wrote: Except perhaps for these to see what's there: Documentation/git-archimport.txt: Attempt to auto-register archives at `http://mirrors.sourcecontrol.net` That domain is gone. Whole line s

Re: [PATCH v3 3/3] send-email: do defaults -> config -> getopt in that order

2019-05-16 Thread Stephen Boyd
(Sorry for weird reply, I'm not subscribed and my MUA is not prepared for this) > Change the git-send-email command-line argument parsing and config > reading code to parse those two in the right order. I.e. first we set > our hardcoded defaults, then we read our config, and finally we read > the

Re: [RFC PATCH 0/3] implement composite filters

2019-05-16 Thread Jonathan Tan
> Here is a first stab at composite filters. It does not actually support omits, > but the biggest difficulties of the implementation are already addressed. So I > decided to send out an early version to give interested people an idea of just > what is needed to implement it, and then give them a c

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

2019-05-16 Thread Marc-André Lureau
Hi On Fri, May 17, 2019 at 12:17 AM Marc-André Lureau wrote: > > Hi > > On Thu, May 16, 2019 at 10:29 PM Johannes Sixt wrote: > > > > Am 15.05.19 um 20:34 schrieb marcandre.lur...@redhat.com: > > > From: Marc-André Lureau > > > > > > This adds xfuncname and word_regex patterns for Rust, a quite

Re: [PATCH] Makefile: remove the NO_R_TO_GCC_LINKER flag

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 08:05:21PM +0200, Ævar Arnfjörð Bjarmason wrote: > From what I can tell we should, with the benefit of hindsight, have > made this change back in 2006. GCC & ld supported this type of > invocation back then, or since at least binutils-gdb.git's[1] > a1ad915dc4 ("[...]Add su

Re: [PATCH v3 2/2] Doc: git.txt: remove backticks from link and add git-scm.com/docs

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 12:25:47PM +0100, Philip Oakley wrote: > > Except perhaps for these to see what's there: > > > > Documentation/git-archimport.txt: Attempt to auto-register archives at > > `http://mirrors.sourcecontrol.net` > That domain is gone. Whole line should probably be removed.

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

2019-05-16 Thread Marc-André Lureau
Hi On Thu, May 16, 2019 at 10:29 PM Johannes Sixt wrote: > > Am 15.05.19 um 20:34 schrieb marcandre.lur...@redhat.com: > > From: Marc-André Lureau > > > > This adds xfuncname and word_regex patterns for Rust, a quite > > popular programming language. It also includes test cases for the > > xfunc

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 06:25:24PM +0700, Duy Nguyen wrote: > > Is it forbidden to call this command from a hook? > > pre-commit hook sets GIT_INDEX_FILE to this "index.lock" so you have > the latest index content (which is not the same as from > $GIT_DIR/index). This variable will interfere with

Re: [PATCH v2] grep: provide sane default to grep_source struct

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 02:44:44PM -0700, Emily Shaffer wrote: > grep_buffer creates a struct grep_source gs and calls grep_source() > with it. However, gs.name is null, which eventually produces a > segmentation fault in > grep_source()->grep_source_1()->show_line() when grep_opt.status_only is >

Re: Closing fds twice when using remote helpers

2019-05-16 Thread Mike Hommey
On Thu, May 16, 2019 at 05:47:52PM -0400, Jeff King wrote: > On Thu, May 16, 2019 at 05:35:19PM +0900, Mike Hommey wrote: > > > On Wed, May 15, 2019 at 11:28:02PM -0400, Jeff King wrote: > > > Totally orthogonal, but I think we might also want to introduce a helper > > > capability so that import

[PATCH v7 7/8 (edit)] blame: add a fingerprint heuristic to match ignored lines

2019-05-16 Thread Barret Rhoden
From: Michael Platings This algorithm will replace the heuristic used to identify lines from ignored commits with one that finds likely candidate lines in the parent's version of the file. The actual replacement occurs in an upcoming commit. The old heuristic simply assigned lines in the target

Re: [PATCH v2 6/7] config: allow configuration of multiple hook error behavior

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 05:19:53PM +, brian m. carlson wrote: > > > + /* Use -2 as sentinel because failure to exec is -1. */ > > > + int ret = -2; > > > > Maybe this would be simpler to follow by using an enum for the handler > > return value? > > We can't make this variable an enum because

Re: Closing fds twice when using remote helpers

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 05:35:19PM +0900, Mike Hommey wrote: > On Wed, May 15, 2019 at 11:28:02PM -0400, Jeff King wrote: > > Totally orthogonal, but I think we might also want to introduce a helper > > capability so that import helpers can say "I always send 'done' to > > fast-import". And then w

[PATCH v2] grep: provide sane default to grep_source struct

2019-05-16 Thread Emily Shaffer
grep_buffer creates a struct grep_source gs and calls grep_source() with it. However, gs.name is null, which eventually produces a segmentation fault in grep_source()->grep_source_1()->show_line() when grep_opt.status_only is not set. This seems to be unreachable from existing commands but is reac

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 02:30:56PM -0700, Jonathan Tan wrote: > > So I could go either way, though I do think it makes sense for on-demand > > fetches for partial clones to avoid asking for thin packs as a general > > principle. > > This should not be a problem since fetch-pack can already know t

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jonathan Tan
> On Thu, May 16, 2019 at 11:26:46AM -0700, Jonathan Tan wrote: > > > > Pretty unlikely, but should we put some kind of circuit-breaker into the > > > client to ensure this? > > > > I thought of this - such a server could, but it seems to me that it > > would be similar to a server streaming rand

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jeff King
On Thu, May 16, 2019 at 11:26:46AM -0700, Jonathan Tan wrote: > > Pretty unlikely, but should we put some kind of circuit-breaker into the > > client to ensure this? > > I thought of this - such a server could, but it seems to me that it > would be similar to a server streaming random bytes to us

Re: [RFC PATCH] grep: provide sane default to grep_source struct

2019-05-16 Thread Emily Shaffer
On Wed, May 15, 2019 at 08:11:52PM -0700, Jonathan Nieder wrote: > Hi, > > Emily Shaffer wrote: > > > grep_buffer creates a struct grep_source gs and calls grep_source() > > with it. However, gs.name is null, which eventually produces a > > segmentation fault in > > grep_source()->grep_source_1()

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

2019-05-16 Thread Johannes Sixt
Am 16.05.19 um 22:29 schrieb Johannes Sixt: > Am 15.05.19 um 20:34 schrieb marcandre.lur...@redhat.com: >> + "[a-zA-Z_][a-zA-Z0-9_]*" >> + >> "|[-+_0-9.eE]+(f32|f64|u8|u16|u32|u64|u128|usize|i8|i16|i32|i64|i128|isize)?" > > I assume that > >+e_1.ei8-e_2.eu128 Make that +

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

2019-05-16 Thread Johannes Sixt
Am 15.05.19 um 20:34 schrieb marcandre.lur...@redhat.com: > From: Marc-André Lureau > > This adds xfuncname and word_regex patterns for Rust, a quite > popular programming language. It also includes test cases for the > xfuncname regex (t4018) and updated documentation. > > The word_regex patter

Re: [PATCH v3] userdiff.c & doc/gitattributes.txt: add Octave

2019-05-16 Thread Johannes Sixt
Am 16.05.19 um 11:19 schrieb Junio C Hamano: > Johannes Sixt writes: > >> In Matlab, is %%% followed by space at the beginning of a line >> *commonly* used for something different? If I were to make a guess, I >> would say no. If I'm right, it does not hurt to merge the Octave rules >> into the M

Re: [PATCH v2 1/7] run-command: add preliminary support for multiple hooks

2019-05-16 Thread Johannes Sixt
Am 16.05.19 um 00:44 schrieb brian m. carlson: > On Tue, May 14, 2019 at 05:12:39PM +0200, Johannes Schindelin wrote: >> On Tue, 14 May 2019, brian m. carlson wrote: >>> +/* >>> + * Return 1 if a hook exists at path (which may be modified) using >>> access(2) >>> + * with check (which should be F_

[RFC PATCH 3/3] list-objects-filter: implement composite filters

2019-05-16 Thread Matthew DeVore
Allow combining filters such that only objects accepted by all filters are shown. The motivation for this is to allow getting directory listings without also fetching blobs. This can be done by combining blob:none with tree:. There are massive repositories that have larger-than-expected trees - eve

[RFC PATCH 2/3] list-objects-filter-options: error is localizeable

2019-05-16 Thread Matthew DeVore
The "invalid filter-spec" message is user-facing and not a BUG, so make it localizeable. Signed-off-by: Matthew DeVore --- list-objects-filter-options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list-objects-filter-options.c b/list-objects-filter-options.c index c0036f7

[RFC PATCH 1/3] list-objects-filter: refactor into a context struct

2019-05-16 Thread Matthew DeVore
The next patch will create and manage filters in a new way, which means that this bundle of data will have to be managed at a new callsite. Make this bundle of data more manageable by putting it in a struct and making it part of the list-objects-filter module's API. Signed-off-by: Matthew DeVore

[RFC PATCH 0/3] implement composite filters

2019-05-16 Thread Matthew DeVore
Here is a first stab at composite filters. It does not actually support omits, but the biggest difficulties of the implementation are already addressed. So I decided to send out an early version to give interested people an idea of just what is needed to implement it, and then give them a chance to

Re: [PATCH 2/2] index-pack: prefetch missing REF_DELTA bases

2019-05-16 Thread Jonathan Tan
> On Tue, May 14, 2019 at 02:10:55PM -0700, Jonathan Tan wrote: > > > Support for lazy fetching should still generally be turned off in > > index-pack because it is used as part of the lazy fetching process > > itself (if not, infinite loops may occur), but we do need to fetch the > > REF_DELTA ba

Re: [PATCH v6 0/5] Fix and extend encoding handling in fast export/import

2019-05-16 Thread Torsten Bögershausen
On Mon, May 13, 2019 at 09:30:57PM -0700, Elijah Newren wrote: > While stress testing `git filter-repo`, I noticed an issue with > encoding; further digging led to the fixes and features in this series. > See the individual commit messages for details. > No more comments from my side, thanks for t

Re: [PATCH] clone: add `--remote-submodules` flag

2019-05-16 Thread Ben Avison
On 16/05/2019 12:31, Duy Nguyen wrote: On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: When using `git clone --recurse-submodules` there was previously no way to pass a `--remote` switch to the implicit `git submodule update` command for any use case where you want the submodules to be check

[PATCH] Makefile: remove the NO_R_TO_GCC_LINKER flag

2019-05-16 Thread Ævar Arnfjörð Bjarmason
Remove the NO_R_TO_GCC_LINKER flag, thus switching the default to "-Wl,-rpath,$LIBPATH" instead of our current "-R$LIBPATH". This is a relatively obscure thing that only kicks in when using one of the LIBDIR flags, e.g. LIBPCREDIR or CURLDIR. How we invoke the linker to do this can still be overri

Re: [PATCH v2 6/7] config: allow configuration of multiple hook error behavior

2019-05-16 Thread brian m. carlson
On 2019-05-16 at 05:02:00, Jeff King wrote: > > +static int git_default_hook_config(const char *key, const char *value) > > +{ > > + const char *hook; > > + size_t key_len; > > + uintptr_t behavior; > > + > > + key += strlen("hook."); > > + if (strip_suffix(key, ".errorbehavior", &key_len

Re: Feedback on git-restore

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 7:12 PM Philip Oakley wrote: > Maybe we need a `git index` command to make it far more visible to > average users (or `git staging-area --show`, with a --cached option ;-). Not commenting on the other parts (and also Junio's mail) since I still need more time to process.

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 7:15 PM Eric Sunshine wrote: > > On Thu, May 16, 2019 at 7:42 AM Duy Nguyen wrote: > > On Thu, May 16, 2019 at 6:33 PM Eric Sunshine > > wrote: > > > You run afoul of it in other situations, as well. For instance, say > > > you have your index file in a non-standard loca

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:42 AM Duy Nguyen wrote: > On Thu, May 16, 2019 at 6:33 PM Eric Sunshine wrote: > > You run afoul of it in other situations, as well. For instance, say > > you have your index file in a non-standard location: > > > > $ export GIT_INDEX_FILE=../storage/index > > $

Re: Feedback on git-restore

2019-05-16 Thread Philip Oakley
On 16/05/2019 03:18, Junio C Hamano wrote: Duy Nguyen writes: I think it depends on whether use actively use the index, or you mostly ignore it and always do "git commit -a" and friends. When you do use the index, the "worktree <-> index <-> HEAD" is the three stages that you are aware, in th

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:45 AM Duy Nguyen wrote: > On Thu, May 16, 2019 at 6:39 PM Eric Sunshine wrote: > > Thinking more clearly on it, a better fix might be for git-worktree to > > deal with this itself, converting such a path to absolute before > > cd'ing to the new worktree directory (or som

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:25 AM Duy Nguyen wrote: > pre-commit hook sets GIT_INDEX_FILE to this "index.lock" so you have > the latest index content (which is not the same as from > $GIT_DIR/index). This variable will interfere with any commands that > work on a different worktree. I think that th

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 6:39 PM Eric Sunshine wrote: > > On Thu, May 16, 2019 at 7:33 AM Eric Sunshine wrote: > > I researched this also and concluded that it's a bug in git-commit. > > You run afoul of it in other situations, as well. For instance, say > > you have your index file in a non-stand

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 6:33 PM Eric Sunshine wrote: > I researched this also and concluded that it's a bug in git-commit. > You run afoul of it in other situations, as well. For instance, say > you have your index file in a non-standard location: > > $ export GIT_INDEX_FILE=../storage/index >

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:33 AM Eric Sunshine wrote: > I researched this also and concluded that it's a bug in git-commit. > You run afoul of it in other situations, as well. For instance, say > you have your index file in a non-standard location: > > $ export GIT_INDEX_FILE=../storage/index >

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Eric Sunshine
On Thu, May 16, 2019 at 7:25 AM Duy Nguyen wrote: > pre-commit hook sets GIT_INDEX_FILE to this "index.lock" so you have > the latest index content (which is not the same as from > $GIT_DIR/index). This variable will interfere with any commands that > work on a different worktree. > > So you proba

Re: [PATCH] clone: add `--remote-submodules` flag

2019-05-16 Thread Duy Nguyen
On Tue, May 14, 2019 at 2:46 AM Ben Avison wrote: > > When using `git clone --recurse-submodules` there was previously no way to > pass a `--remote` switch to the implicit `git submodule update` command for > any use case where you want the submodules to be checked out on their > remote-tracking b

Re: Running 'git worktree add' in 'pre-commit' hook

2019-05-16 Thread Duy Nguyen
On Tue, May 14, 2019 at 9:53 PM Cosmin Polifronie wrote: > > Hello! I am trying to run 'git worktree add HEAD' in the > 'pre-commit' hook, more specifically in a Python script that is being > called from the hook. When doing so, I am greeted with the following > error: > > On Windows 10: > Prepar

Re: [PATCH v3 2/2] Doc: git.txt: remove backticks from link and add git-scm.com/docs

2019-05-16 Thread Philip Oakley
On 16/05/2019 02:56, Junio C Hamano wrote: Philip Oakley writes: While checking the html formatted git(1) manual page, it was noted that the link to https://git.github.io/htmldocs/git.html was formatted as code. Remove the backticks. Good. I just ran $ git grep '`https*://' Document

Re: [PATCH v2 3/7] rebase: add support for multiple hooks

2019-05-16 Thread Duy Nguyen
On Thu, May 16, 2019 at 5:55 AM brian m. carlson wrote: > > On Tue, May 14, 2019 at 07:56:49PM +0700, Duy Nguyen wrote: > > On Tue, May 14, 2019 at 7:24 AM brian m. carlson > > wrote: > > > - close(cp.in); > > > > In the old code, we close cp.in... > > > > > +int post_rewrite_rebase_hook(co

Re: Finer timestamps and serialization in git

2019-05-16 Thread Ævar Arnfjörð Bjarmason
On Thu, May 16 2019, Eric S. Raymond wrote: > Derrick Stolee : >> On 5/15/2019 3:16 PM, Eric S. Raymond wrote: >> > The deeper problem is that I want something from Git that I cannot >> > have with 1-second granularity. That is: a unique timestamp on each >> > commit in a repository. >> >> This

[PATCH] configure: Detect linking style for HP aCC on HP-UX

2019-05-16 Thread Ævar Arnfjörð Bjarmason
From: Michael Osipov HP aCC does not accept any of the previously tested CC_LD_DYNPATH formats, but only its own[1] "-Wl,+b" format. Add it to configure.ac. 1. http://nixdoc.net/man-pages/hp-ux/man1/ld_pa.1.html Signed-off-by: Michael Osipov Signed-off-by: Ævar Arnfjörð Bjarmason --- I took

Re: [PATCH v3] userdiff.c & doc/gitattributes.txt: add Octave

2019-05-16 Thread Junio C Hamano
Johannes Sixt writes: > In Matlab, is %%% followed by space at the beginning of a line > *commonly* used for something different? If I were to make a guess, I > would say no. If I'm right, it does not hurt to merge the Octave rules > into the Matlab rules. That is true because we are not syntax-

Re: [PATCH] sha1dc: update from upstream

2019-05-16 Thread Osipov, Michael
Am 2019-05-16 um 10:31 schrieb Ævar Arnfjörð Bjarmason: On Thu, May 16 2019, Osipov, Michael wrote: Am 2019-05-15 um 13:48 schrieb Ævar Arnfjörð Bjarmason: On Tue, May 14 2019, Osipov, Michael wrote: Hi, Am 2019-05-14 um 00:17 schrieb Ævar Arnfjörð Bjarmason: Update sha1dc from the lates

Re: Closing fds twice when using remote helpers

2019-05-16 Thread Mike Hommey
On Wed, May 15, 2019 at 11:28:02PM -0400, Jeff King wrote: > Totally orthogonal, but I think we might also want to introduce a helper > capability so that import helpers can say "I always send 'done' to > fast-import". And then we can pass "--done" to fast-import, which means > it would detect a tr

Re: [PATCH] sha1dc: update from upstream

2019-05-16 Thread Ævar Arnfjörð Bjarmason
On Thu, May 16 2019, Osipov, Michael wrote: > Am 2019-05-15 um 13:48 schrieb Ævar Arnfjörð Bjarmason: >> >> On Tue, May 14 2019, Osipov, Michael wrote: >> >>> Hi, >>> >>> Am 2019-05-14 um 00:17 schrieb Ævar Arnfjörð Bjarmason: Update sha1dc from the latest version by the upstream maint

Re: [PATCH v7 7/8] blame: add a fingerprint heuristic to match ignored lines

2019-05-16 Thread Junio C Hamano
Barret Rhoden writes: > From: Michael Platings > > +test_expect_success setup ' > + { for ((i=2;i<=$last_test;i++)) Crap. What language are you writing this in? Please make it a habit to try running the test suite with a shell that is *not* bash, after you are happy with your tests in bas

Re: [PATCH] sha1dc: update from upstream

2019-05-16 Thread Osipov, Michael
Am 2019-05-15 um 13:48 schrieb Ævar Arnfjörð Bjarmason: On Tue, May 14 2019, Osipov, Michael wrote: Hi, Am 2019-05-14 um 00:17 schrieb Ævar Arnfjörð Bjarmason: Update sha1dc from the latest version by the upstream maintainer[1]. See 07a20f569b ("Makefile: fix unaligned loads in sha1dc wit