Am 30.04.2017 um 05:11 schrieb Jeff King:
> On Sat, Apr 29, 2017 at 08:16:17PM +0200, René Scharfe wrote:
>
>>> I dunno. I could go either way. Or we could leave it as-is, and let
>>> valgrind find the problem. That has zero run-time cost, but of course
>>> nobody bothers to run valgrind outside o
On Mon, May 1, 2017 at 8:07 PM, Junio C Hamano wrote:
> Brandon Williams writes:
>
>> On 05/01, Stefan Beller wrote:
>>> While fixing the leak of `cp`, reuse it instead of having to declare
>>> another struct child_process.
>>>
>>> Signed-off-by: Stefan Beller
>>
>> This shouldn't be needed as '
Junio C Hamano writes:
> "Daniel Ferreira (theiostream)" writes:
>
>> Reproducing either of these comparisons "natively" would simply
>> require running run_diff_index() or run_diff_files() with
>> DIFF_FORMAT_NUMSTAT and tweaking diff_flush() to format appropriately
>> for the "interactive--add
On Mon, May 1, 2017 at 7:04 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> We forgot to prepare the submodule env, which is only a problem for
>> nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
>> with nested submodules, 2017-04-13) for further explanation.
>>
>> Signe
On Mon, May 1, 2017 at 6:36 PM, Junio C Hamano wrote:
> Stefan Beller writes:
>
>> This applies to origin/master.
>>
>> For better readability and understandability for newcomers it is a good idea
>> to not offer 2 APIs doing the same thing with on being the #define of the
>> other.
>>
>> In the
Johannes Schindelin writes:
> While POSIX states that it is okay to pass EOF to isspace() (and it seems
> to be implied that EOF should *not* be treated as whitespace), and also to
> pass EOF to ungetc() (which seems to be intended to fail without buffering
> the character), it is much better to
On Mon, May 1, 2017 at 6:35 PM, Junio C Hamano wrote:
> Brandon Williams writes:
>
>> I don't know why submodules were originally designed to be in a
>> detached HEAD state but I much prefer working on branches (as I'm sure
>> many other developers do) so the prospect of this becoming the norm is
Add the 'rebase.abbreviateCommands' configuration option to allow
`git rebase -i` to default to the single-letter command-names in
the todo list.
Using single-letter command-names can present two benefits.
First, it makes it easier to change the action since you only need to
replace a single chara
teach `git rebase -i` to recognise short command-names when using the
'--autosquash' option. This allows commit with titles beginning with
"s! ..." and "f! ..." to be treated the same way as "squash! ..." and
"fixup! ..." respectively.
Signed-off-by: Liam Beguin
---
Documentation/git-rebase.txt
make sure 'add_exec_commands' and 'transform_todo_ids' also understand
the abbreviated versions of the command-names.
Signed-off-by: Liam Beguin
---
git-rebase--interactive.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-rebase--interactive.sh b/git-rebase--interac
Once the rest of the processing is done, the `abbreviate_commands`
function is called. If the 'rebase.abbreviateCommands' option is set to
true, the function will replace each command-name by its abbreviated
form.
Signed-off-by: Liam Beguin
---
git-rebase--interactive.sh | 16
1
Move configuration variables to a separate file in order to remove
duplicates, and include it in config.txt and git-rebase.txt.
The new descriptions are taken from config.txt as they are more verbose.
Signed-off-by: Liam Beguin
---
Documentation/config.txt| 31 +--
Use "todo list" instead of "instruction list" or "todo-list" to
reduce further confusion regarding the name of this script.
Signed-off-by: Liam Beguin
---
Documentation/rebase-config.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/rebase-config.txt b/Doc
Signed-off-by: Liam Beguin
---
Documentation/rebase-config.txt | 23 +++
1 file changed, 23 insertions(+)
diff --git a/Documentation/rebase-config.txt b/Documentation/rebase-config.txt
index a9b1d496e63a..0f29b7d0b89a 100644
--- a/Documentation/rebase-config.txt
+++ b/Documen
Johannes Schindelin writes:
> Coverity reported a memory leak in this function. However, it can only
> be called once, as setup_git_directory() changes global state and hence
> is not reentrant.
>
> Mark the variable as static to indicate that this is a singleton.
>
> Signed-off-by: Johannes Schi
Junio C Hamano writes:
> Johannes Schindelin writes:
>
>> When the `name_rev()` function is asked to dereference the tip name, it
>> allocates memory. But when it turns out that another tip already
>> described the commit better than the current one, we forgot to release
>> the memory.
>
> Very
Johannes Schindelin writes:
> When the `name_rev()` function is asked to dereference the tip name, it
> allocates memory. But when it turns out that another tip already
> described the commit better than the current one, we forgot to release
> the memory.
Very well explained.
>
> Pointed out by
Johannes Schindelin writes:
> The buffer allocated by shorten_unambiguous_ref() needs to be released.
Yes. Looks good.
>
> Discovered by Coverity.
>
> Signed-off-by: Johannes Schindelin
> ---
> builtin/worktree.c | 8 +---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git
Johannes Schindelin writes:
> There is really no reason why we would need to hold onto the allocated
> string longer than necessary.
Yup. The longer we make the duration between the allocation and the
standard release, the more likely future code would add early returns
that forget to release t
On Mon, May 01, 2017 at 05:30:10PM -0700, Jonathan Nieder wrote:
> > @@ -162,6 +152,16 @@ helper::
> > shell (so, for example, setting this to `foo --option=bar` will execute
> > `git credential-foo --option=bar` via the shell. See the manual of
> > specific helpers for examples of the
On Mon, May 01, 2017 at 05:21:14PM -0700, Jonathan Nieder wrote:
> Subject: credential doc: make multiple-helper behavior more prominent
>
> Git's configuration system works by reading multiple configuration
> files in order, from general to specific:
>
> - first, the system configuration /etc/
Brandon Williams writes:
> On 05/01, Stefan Beller wrote:
>> While fixing the leak of `cp`, reuse it instead of having to declare
>> another struct child_process.
>>
>> Signed-off-by: Stefan Beller
>
> This shouldn't be needed as 'finish_command' does the cleanup for you by
> calling 'child_prc
On Mon, May 01, 2017 at 05:05:15PM -0700, Jonathan Nieder wrote:
> "git clone --config" uses the following incantation to add an item to
> a config file, instead of replacing an existing value:
>
> git_config_set_multivar_gently(key, value, "^$", 0)
>
> As long as no existing value matches
xiaoqiang zhao writes:
> Some email server(e.g. smtp.163.com) limits a fixed number emails to
> be send per session(connection) and this will lead to a send faliure.
>
> With --batch-size= option, an auto reconnection will occur when
> number of sent email reaches and the problem is solved.
>
>
Stefan Beller writes:
> We forgot to prepare the submodule env, which is only a problem for
> nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
> with nested submodules, 2017-04-13) for further explanation.
>
> Signed-off-by: Stefan Beller
> ---
Sounds good (if only because th
Jonathan Tan writes:
> On 05/01/2017 04:29 PM, Junio C Hamano wrote:
>> Jonathan Tan writes:
>>
>>> Thanks for your comments. If you're referring to the codepath
>>> involving write_sha1_file() (for example, builtin/hash-object ->
>>> index_fd or builtin/unpack-objects), that is fine because
>>>
Stefan Beller writes:
> This applies to origin/master.
>
> For better readability and understandability for newcomers it is a good idea
> to not offer 2 APIs doing the same thing with on being the #define of the
> other.
>
> In the long run we may want to drop the macros guarded by
> NO_THE_INDE
Brandon Williams writes:
> I don't know why submodules were originally designed to be in a
> detached HEAD state but I much prefer working on branches (as I'm sure
> many other developers do) so the prospect of this becoming the norm is
> exciting! :D
The reason is because the superproject alrea
On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote:
> Teach 'submodule_has_commits()' to ensure that if a commit exists in a
> submodule, that it is also reachable from a ref.
>
> This is a preparatory step prior to merging the logic which checks for
> changed submodules when fetching or pushi
On 05/01, Stefan Beller wrote:
> On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote:
>
> > Change-Id: Ia6d15f34cee4d0dc32f7a475c69f4cb3aa8ce5bf
>
> Uh?
Oops! I forgot to run it through my scrubbing script...
>
> Maybe another side project for the long todo list: get git-trailers into
> s
On Mon, May 1, 2017 at 6:02 PM, Brandon Williams wrote:
> Change-Id: Ia6d15f34cee4d0dc32f7a475c69f4cb3aa8ce5bf
Uh?
Maybe another side project for the long todo list: get git-trailers into shape,
such that it can be configured to yell at you upon formatting the patch or
sending email when a give
There are currently two instances (fetch and push) where we want to
determine if submodules have changed given some revision specification.
These two instances don't use the same logic to generate a list of
changed submodules and as a result there is a fair amount of code
duplication.
This patch r
Eliminate a call to 'xstrdup()' by changing the string_list
'changed_submodule_paths' to duplicated strings added to it.
Change-Id: Id4b53837a6e209c0c0837c9f5ba06c70df2ffe06
Signed-off-by: Brandon Williams
---
submodule.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/su
Rename 'free_submodules_sha1s()' to 'free_submodules_oids()' since the
function frees a 'struct string_list' which has a 'struct oid_array'
stored in the 'util' field.
Change-Id: I0c52fa3af1b1492b196bcf52f8b8cc8f5daf085d
Signed-off-by: Brandon Williams
---
submodule.c | 5 +++--
1 file changed,
The function 'add_oid_to_argv()' provides the same functionality as
'append_oid_to_argv()'. Remove this duplicate function and instead use
'append_oid_to_argv()' where 'add_oid_to_argv()' was previously used.
Change-Id: Id0abea012707460cb7000df761e6557ba5cd88d9
Signed-off-by: Brandon Williams
--
Rename 'add_sha1_to_array()' to 'append_oid_to_array()' to more
accurately describe what the function does since it handles 'struct
object_id' and not sha1 character arrays.
Change-Id: Ia6d15f34cee4d0dc32f7a475c69f4cb3aa8ce5bf
Signed-off-by: Brandon Williams
---
submodule.c | 9 +
1 file
Teach 'submodule_has_commits()' to ensure that if a commit exists in a
submodule, that it is also reachable from a ref.
This is a preparatory step prior to merging the logic which checks for
changed submodules when fetching or pushing.
Change-Id: I4fed2acfa7e69a5fbbca534df165671e77a90f22
Signed-o
Changes in v2:
- few tweaks in the commit messages of a couple of the commits
- use 'GIT_MAX_HEXSZ + 1' as the hint size in [5/6]
- added a comment in [5/6] better explaining the rational for having a quick,
incorrect check for the existence of a commit in a submodule.
Brandon Williams (6):
su
Samuel Lijin writes:
> On Fri, Mar 31, 2017 at 10:52 AM, Junio C Hamano wrote:
>
>> It might not be a bad idea to teach "blame" not to pay attention to
>> any path that is marked as "-diff" (e.g. binary files) when trying
>> to see if remaining contents appeared by borrowing from them. We do
>>
On 05/01, Jonathan Tan wrote:
> On 05/01/2017 04:29 PM, Junio C Hamano wrote:
> >Jonathan Tan writes:
> >
> >>Thanks for your comments. If you're referring to the codepath
> >>involving write_sha1_file() (for example, builtin/hash-object ->
> >>index_fd or builtin/unpack-objects), that is fine bec
On 05/01/2017 04:29 PM, Junio C Hamano wrote:
Jonathan Tan writes:
Thanks for your comments. If you're referring to the codepath
involving write_sha1_file() (for example, builtin/hash-object ->
index_fd or builtin/unpack-objects), that is fine because
write_sha1_file() invokes freshen_packed_o
"Daniel Ferreira (theiostream)" writes:
> Reproducing either of these comparisons "natively" would simply
> require running run_diff_index() or run_diff_files() with
> DIFF_FORMAT_NUMSTAT and tweaking diff_flush() to format appropriately
> for the "interactive--add case".
A more usual way to dri
Starting out the reviews:
Jonathan Nieder wrote:
[...]
> configuration item to empty before giving it a new value. This is
> already documented by the documentation is hard to find ---
^^
s/by/but/
Sorry for the confusion.
[...]
> +++ b/Documentation/gitcredentials.txt
[..
Samuel Lijin writes:
> After some more digging (and familiarizing myself with the
> behind-the-scenes logic) the issue is that dir.c has this implicit
> assumption that a directory which contains only untracked and ignored
> files should itself be considered untracked. While that works fine for
>
On 05/01, Jonathan Nieder wrote:
> Subject: credential doc: make multiple-helper behavior more prominent
>
> Git's configuration system works by reading multiple configuration
> files in order, from general to specific:
>
> - first, the system configuration /etc/gitconfig
> - then the user's co
Subject: credential doc: make multiple-helper behavior more prominent
Git's configuration system works by reading multiple configuration
files in order, from general to specific:
- first, the system configuration /etc/gitconfig
- then the user's configuration (~/.gitconfig or ~/.config/git/conf
On 05/01, Jonathan Nieder wrote:
> "git clone --config" uses the following incantation to add an item to
> a config file, instead of replacing an existing value:
>
> git_config_set_multivar_gently(key, value, "^$", 0)
>
> As long as no existing value matches the regex ^$, that works as
> in
"git clone --config" uses the following incantation to add an item to
a config file, instead of replacing an existing value:
git_config_set_multivar_gently(key, value, "^$", 0)
As long as no existing value matches the regex ^$, that works as
intended and adds to the config. When a value
On 04/30/2017 07:29 PM, brian m. carlson wrote:
Make parse_object, parse_object_or_die, and parse_object_buffer take a
pointer to struct object_id. Remove the temporary variables inserted
earlier, since they are no longer necessary. Transform all of the
callers using the following semantic patc
Nikita Orlov writes:
>>On Sun, 30 Apr 2017, 1:56 +03:00 from Kevin Daudt :
>>Not sure if this is the case here, but it at least confirms that rebase
>>--preserve-merges was not meant to reorder commits.
>>
>>See [this][1] thread for more background on this limitation.
>>
>>[0]: https://git-scm.co
Jonathan Tan writes:
> Thanks for your comments. If you're referring to the codepath
> involving write_sha1_file() (for example, builtin/hash-object ->
> index_fd or builtin/unpack-objects), that is fine because
> write_sha1_file() invokes freshen_packed_object() and
> freshen_loose_object() dire
Jeff King writes:
> PS Outside of our test scripts, I'd probably just have written:
>
> perl -lpe 'print "extra line" if $. == 2'
>
>I think we have traditionally preferred sed/awk to perl, but given
>the heavy use of vanilla perl elsewhere in the test suite, I think
>that is may
On 04/30/2017 07:29 PM, brian m. carlson wrote:
@@ -195,27 +195,18 @@ static const char PACKED_REFS_HEADER[] =
* Return a pointer to the refname within the line (null-terminated),
* or NULL if there was a problem.
*/
-static const char *parse_ref_line(struct strbuf *line, unsigned char *sha
Ævar Arnfjörð Bjarmason writes:
>> * ab/grep-pcre-v2 (2017-04-25) 20 commits
>> - SQUASH???
>> - Makefile & configure: make PCRE v2 the default PCRE implementation
>> - grep: remove support for concurrent use of both PCRE v1 & v2
>> - grep: add support for PCRE v2
>> - grep: add support for
Hey there,
So, in the GSoC proposal I sent about porting git-add--interactive to
C[1], I expected I would be able to do a couple of small patches to
git-add to familiarize myself with the Git API and have a better clue
of how the porting process would go by. Due to the unexpected size my
microproj
On 05/01/2017 03:27 PM, Jeff King wrote:
On Mon, May 01, 2017 at 03:07:22PM -0700, Jonathan Tan wrote:
@@ -2298,8 +2296,12 @@ static uintmax_t do_change_note_fanout(
static uintmax_t change_note_fanout(struct tree_entry *root,
unsigned char fanout)
{
- char hex_sha1[40],
On Mon, May 01, 2017 at 03:07:22PM -0700, Jonathan Tan wrote:
> > @@ -2298,8 +2296,12 @@ static uintmax_t do_change_note_fanout(
> > static uintmax_t change_note_fanout(struct tree_entry *root,
> > unsigned char fanout)
> > {
> > - char hex_sha1[40], path[60];
> > - return do_cha
On Mon, May 01, 2017 at 06:13:44PM -0400, Marc Branchaud wrote:
> From: Stefan Beller
>
> The feature was included in v2.11 (released 2016-11-29) and we got no
> negative feedback. Quite the opposite, all feedback we got was positive.
>
> Turn it on by default. Users who dislike the feature can
> Changes since v2:
>
> Patch 1/4 : Unchanged.
>
> Patch 2/4 : Mentioned how the new behaviour matches the diff Porcelain.
>
> Patch 3/4 : Updated the tests.
Thanks for picking up that patch and carrying it further!
The whole series looks good to me.
Thanks,
Stefan
From: Stefan Beller
The feature was included in v2.11 (released 2016-11-29) and we got no
negative feedback. Quite the opposite, all feedback we got was positive.
Turn it on by default. Users who dislike the feature can turn it off
by setting diff.indentHeuristic (which also configures plumbing
From: Jeff King
Now that diff.indentHeuristic is handled automatically by the plumbing
commands, there's no need to propagate it manually.
Signed-off-by: Jeff King
Signed-off-by: Marc Branchaud
---
git-add--interactive.perl | 4
1 file changed, 4 deletions(-)
diff --git a/git-add--inter
On 2017-04-29 09:14 AM, Jeff King wrote:
> On Sat, Apr 29, 2017 at 08:40:52AM -0400, Jeff King wrote:
>
>> On Fri, Apr 28, 2017 at 06:33:12PM -0400, Marc Branchaud wrote:
>>
>>> v2: Fixed up the commit messages and added tests.
>>>
>>> Marc Branchaud (2):
>>> diff: make the indent heuristic part
This heuristic was originally introduced as an experimental feature,
and therefore part of the UI configuration.
But the user often sees diffs generated by plumbing commands like
diff-tree. Moving the indent heuristic into diff's basic configuration
prepares the way for diff plumbing commands to
This matches how the diff Porcelain works. It makes the plumbing commands
respect diff's configuration options, such as indentHeuristic, because
init_revisions() calls diff_setup() which fills in the diff_options struct.
Signed-off-by: Marc Branchaud
---
builtin/diff-files.c | 2 +-
builtin/
On 04/30/2017 07:29 PM, brian m. carlson wrote:
@@ -391,10 +391,8 @@ static void write_branch_report(FILE *rpt, struct branch
*b)
fputc('\n', rpt);
fprintf(rpt, " tip commit : %s\n", oid_to_hex(&b->oid));
- fprintf(rpt, " old tree: %s\n",
- oid_to_hex(
On 04/30/2017 07:29 PM, brian m. carlson wrote:
@@ -340,7 +340,7 @@ static int try_parent_shorthands(const char *arg)
}
if (include_rev)
- show_rev(NORMAL, sha1, arg);
+ show_rev(NORMAL, &oid, arg);
for (parents = commit->parents, parent_number
On Mon, May 01, 2017 at 01:50:57PM -0700, Stefan Beller wrote:
> > diff --git a/remote.c b/remote.c
> > index 9f83fe2c4..2f8cb35a3 100644
> > --- a/remote.c
> > +++ b/remote.c
> > @@ -742,6 +742,8 @@ int for_each_remote(each_remote_fn fn, void *priv)
> > r->push = parse_push_refspec(r->push_refsp
On Mon, May 01, 2017 at 11:00:58PM +0200, René Scharfe wrote:
> Am 01.05.2017 um 21:22 schrieb Jeff King:
> > On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote:
> > > I can only get gcc and clang to call memcpy instead of inlining it by
> > > specifying -fno-builtin. Do you use that op
On Sun, Apr 30, 2017 at 7:28 PM, brian m. carlson
wrote:
> This is the eighth series of patches to convert unsigned char [20] to
> struct object_id. This series converts lookup_commit, lookup_blob,
> lookup_tree, lookup_tag, and finally parse_object to struct object_id.
>
> A small number of func
Am 01.05.2017 um 21:22 schrieb Jeff King:
On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote:
I can only get gcc and clang to call memcpy instead of inlining it by
specifying -fno-builtin. Do you use that option? If yes, why? (Just
curious.)
I do my normal edit-compile cycles with
On Mon, May 1, 2017 at 1:40 PM, David CARLIER wrote:
> Hi this is my first submission, a memory leak found in the maint branch
> (might be in master as well).
>
> Kind regards.
Hi and welcome to Git!
> From d98f3944780730447f111a4178c9d99f5110c260 Mon Sep 17 00:00:00 2001
> From: David Carlier
Hi this is my first submission, a memory leak found in the maint branch (might
be in master as well).
Kind regards.
0001-memory-leaks-fixes-for-remote-lists.patch
Description: Binary data
On Mon, May 01, 2017 at 04:25:14PM +0200, Ævar Arnfjörð Bjarmason wrote:
> > * ab/grep-pcre-v2 (2017-04-25) 20 commits
> [...]
> > * ab/grep-threading-cleanup (2017-04-16) 8 commits
> [...]
> >
> > Needs review.
>
> Between these two series there's 27 patches, and I understand it's a
> bit of a
On Mon, May 01, 2017 at 01:23:28PM +0200, René Scharfe wrote:
> Am 24.04.2017 um 12:39 schrieb Duy Nguyen:
> > BTW, I ran t7009 with valgrind and it reported this. Is it something
> > we should be worried about? I vaguely recall you're doing something
> > with prio-queue...
> >
> > ==4246== Sourc
On 04/30/2017 08:57 PM, Junio C Hamano wrote:
One thing I wonder is what the performance impact of a change like
this to the codepath that wants to see if an object does _not_ exist
in the repository. When creating a new object by hashing raw data,
we see if an object with the same name already
coccinelle patch:
@@ expression E; @@
-read_cache_preload(E)
+read_index_preload(&the_index, E)
Additionally manual editing:
* drop the define from cache.h.
* builtin/{commit,describe}.c were not picked up as we have NULL and
the address of an expression. Converted them manually.
* builtin/diff{
This patch is produced via coccinelle using this semantic patch:
@@ @@
-read_cache()
+read_index(&the_index)
Additional manual editing:
* drop define in cache.h
* a comment in builtin/check-ignore.c and read-cache.c were
converted
* builtin/diff.c: fix error message referencing the function.
S
Based on the coccinelle patch:
@@ @@
-active_cache
+the_index.cache
@@ @@
-active_nr
+the_index.cache_nr
@@ @@
-active_alloc
+the_index.cache_alloc
@@ @@
-active_cache_changed
+the_index.cache_changed
@@ @@
-active_cache_tree
+the_index.cache_tree
Additional manual editing:
* drop the macros from
@@ @@
-read_cache_unmerged()
+read_index_unmerged(&the_index)
Additionally drop the define from cache.h manually.
Signed-off-by: Stefan Beller
---
builtin/am.c| 2 +-
builtin/merge.c | 2 +-
builtin/pull.c | 2 +-
builtin/read-tree.c | 2 +-
builtin/reset.c | 2 +-
cache.h
coccinelle patch:
@@ expression E; @@
-read_cache_from(E)
+read_index_from(&the_index, E)
additionally drop the define from cache.h manually
Signed-off-by: Stefan Beller
---
apply.c | 2 +-
builtin/am.c | 4 ++--
builtin/commit.c | 6 +++---
cache.h | 1 -
4 files changed,
This applies to origin/master.
For better readability and understandability for newcomers it is a good idea
to not offer 2 APIs doing the same thing with on being the #define of the other.
In the long run we may want to drop the macros guarded by
NO_THE_INDEX_COMPATIBILITY_MACROS. This converts a
Hi Junio,
On Sun, 30 Apr 2017, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
> >> Hmph. I find a "leak" of a resource acquired inside the main
> >> function and not released when the main function leaves a lot less
> >> interesting than the other ones this series covers.
> >
> > Ah, I
On Mon, May 1, 2017 at 11:36 AM, Brandon Williams wrote:
> if (flags & REATTACH_HEAD_DIE_ON_ERROR)
> die(...);
>
> return -1;
>
> It just feels weird to me to have the inverted logic, that's my opinion
> though.
Yeah, me too. But my feelings were not as important as staying
under 80 chara
On 05/01, Stefan Beller wrote:
> Add a new command, that reattaches a detached HEAD to its configured
> branch in a submodule.
>
> In a later patch we will teach git-submodule as well as other submodule
> worktree manipulators (git reset/checkout --recurse-submodules) to not
> end up in a detached
On 05/01, Stefan Beller wrote:
> The first three patches fix bugs in existing submodule code,
> sort of independent from the last 2 patches, which are RFCs.
>
>
>
> In submodules as of today you always end up with a detached HEAD,
> which may be scary to people used to working on branches. (I my
On 05/01, Stefan Beller wrote:
> While fixing the leak of `cp`, reuse it instead of having to declare
> another struct child_process.
>
> Signed-off-by: Stefan Beller
This shouldn't be needed as 'finish_command' does the cleanup for you by
calling 'child_prcoess_clear()'.
> ---
> submodule.c
We forgot to prepare the submodule env, which is only a problem for
nested submodules. See 2e5d6503bd (ls-files: fix recurse-submodules
with nested submodules, 2017-04-13) for further explanation.
Signed-off-by: Stefan Beller
---
submodule.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/su
Add a new command, that reattaches a detached HEAD to its configured
branch in a submodule.
In a later patch we will teach git-submodule as well as other submodule
worktree manipulators (git reset/checkout --recurse-submodules) to not
end up in a detached HEAD state in the submodules.
Signed-off-
While fixing the leak of `cp`, reuse it instead of having to declare
another struct child_process.
Signed-off-by: Stefan Beller
---
submodule.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/submodule.c b/submodule.c
index d3299e29c0..cd098cf12b 100644
--- a/
Side note: We also want to call this from git submodule update
Signed-off-by: Stefan Beller
---
submodule.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/submodule.c b/submodule.c
index 4e74e38829..66651ffa34 100644
--- a/submodule.c
+++ b/submodule.c
@@ -1483,6 +1483,8 @@ int submodule_
All commands that are run in a submodule, are run in a correct setup,
there is no need to prepare the environment without setting the GIT_DIR
variable. By setting the GIT_DIR variable we fix issues as discussed in
10f5c52656 (submodule: avoid auto-discovery in
prepare_submodule_repo_env(), 2016-09-
The first three patches fix bugs in existing submodule code,
sort of independent from the last 2 patches, which are RFCs.
In submodules as of today you always end up with a detached HEAD,
which may be scary to people used to working on branches. (I myself
enjoy working with a detached HEAD).
Th
On Fri, Mar 31, 2017 at 10:52 AM, Junio C Hamano wrote:
> "Ulrich Windl" writes:
>
>> I was running "vc-annotate" in Emacs for a file from a large
>> repository (>4 files, a big percentage being binary, about 10
>> commits). For the first file the result was presented rather soon, but
>> for
On Mon, May 1, 2017 at 6:21 PM, Brandon Williams wrote:
> On 05/01, Ęvar Arnfjörš Bjarmason wrote:
>> On Mon, May 1, 2017 at 7:35 AM, Junio C Hamano wrote:
>> > * ab/clone-no-tags (2017-05-01) 3 commits
>> > (merged to 'next' on 2017-04-30 at 601649896a)
>> > + tests: rename a test having to d
On Sun, Apr 30, 2017 at 06:47:29PM -0700, Junio C Hamano wrote:
> Kevin Daudt writes:
>
> > Note that git does not store that files are renamed. So a remove + add
> > is the same as a rename in git. Only git status shows it when you for
> > example use git mv directly, but this information is los
On 05/01, Stefan Beller wrote:
> On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote:
>
> > This hunk of logic is essentially a copy and paste from elsewhere in the
> > file. Essentially both code paths were essentially doing the same thing
> > (checking if a submodule has a commit) but one
On Sun, Apr 30, 2017 at 4:14 PM, Brandon Williams wrote:
> This hunk of logic is essentially a copy and paste from elsewhere in the
> file. Essentially both code paths were essentially doing the same thing
> (checking if a submodule has a commit) but one of the code paths included
> this logic t
On 04/28, Stefan Beller wrote:
> + Heiko, who touched the pushing code end of last year.
>
> On Fri, Apr 28, 2017 at 4:54 PM, Brandon Williams wrote:
> > There are currently two instances (fetch and push) where we want to
> > determine if submodules have changed given some revision specification.
On 04/30, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > oid_array_for_each_unique(commits, check_has_commit, &has_commit);
> > +
> > + if (has_commit) {
> > + /*
> > +* Even if the submodule is checked out and the commit is
> > +* present, make sur
On 04/30, Junio C Hamano wrote:
> Brandon Williams writes:
>
> > Eliminate a call to 'xstrdup()' by changing the string_list
> > 'changed_submodule_paths' to duplicated strings added to it.
> >
> > Signed-off-by: Brandon Williams
> > ---
> > submodule.c | 4 ++--
> > 1 file changed, 2 insertion
1 - 100 of 121 matches
Mail list logo