This rewrites append_todo_help() from shell to C. It also incorporates
some parts of initiate_action() and complete_action() that also write
help texts to the todo file.
This also introduces the source file rebase-interactive.c. This file
will contain functions necessary for interactive rebase
This patch series rewrite the interactive rebase from shell to C.
It is based on ffc6fa0e39 ("Fourth batch for 2.19 cycle", 2018-07-24).
This conflicts a bit with b9dfa238d5 ("Getting ready for -rc1",
2017-08-27) because of the range-diff, but a 3-way merge can solve these
conflicts cleanly.
Hi Stolee,
On Mon, 27 Aug 2018, Derrick Stolee wrote:
> On 8/27/2018 9:22 AM, Johannes Schindelin wrote:
> > Point in favor of the pure-online meeting: the informal standup on IRC
> > every second Friday. I really try to attend it (it is a bit awkward
> > because it is on a Friday evening in my
This will enable users to implement bisecting on first parents
which can be useful for when the commits from a feature branch
that we want to merge are not always tested.
Signed-off-by: Tiago Botelho
---
This patch refactors **only** the tests according to the suggestions made by
Junio in v5
On 8/28/2018 8:04 AM, Johannes Schindelin wrote:
Hi,
On Thu, 23 Aug 2018, Jonathan Nieder wrote:
Ævar Arnfjörð Bjarmason wrote:
[...]
Since all operations that make new objects (e.g., "git commit") add
the new objects to the corresponding index, this mapping is possible
for all objects in
On Tue, Aug 28 2018, Nikolay Kasyanov wrote:
> Hi,
>
> I’ve found something that may be a regression in git rebase implementation in
> 2.18.0.
> First I spotted it on macOS but I can also confirm it happening on Linux.
> Git 2.19.0.rc0.48.gb9dfa238d is affected too.
>
> In order to trigger it,
Hi Junio,
On Mon, 27 Aug 2018, Junio C Hamano wrote:
> Johannes Schindelin writes:
>
> >> Please include this information in the commit message. It's super
> >> helpful to find this kind of information about why a patch does what
> >> it does when encountering a patch later "in the wild" (in
Hi Peff,
On Mon, 27 Aug 2018, Jeff King wrote:
> On Mon, Aug 27, 2018 at 06:25:26PM +0200, Johannes Schindelin wrote:
>
> > On Sat, 25 Aug 2018, Jeff King wrote:
> >
> > > On Wed, Aug 22, 2018 at 04:16:00PM -0700, Gregory Oschwald wrote:
> > >
> > > diff --git a/builtin/commit.c
Hi Tiago,
On Tue, 28 Aug 2018, Tiago Botelho wrote:
> This will enable users to implement bisecting on first parents
> which can be useful for when the commits from a feature branch
> that we want to merge are not always tested.
This message is still lacking the explanation I asked for, namely
Hi Johannes
On 27/08/18 22:21, Johannes Schindelin wrote:
Hi,
On Sat, 25 Aug 2018, Constantin Weißer wrote:
I think there are two aspects to using "force with lease".
There is a third, very, very important aspect.
When you use --force-with-lease (and I, for one, do, all the time), keep
in
This rewrites complete_action() from shell to C.
A new mode is added to rebase--helper (`--complete-action`), as well as
a new flag (`--autosquash`).
Finally, complete_action() is stripped from git-rebase--interactive.sh.
The original complete_action() would return the code 2 when the todo
list
This removes git-rebase--interactive.sh, as its functionnality has been
replaced by git-rebase--interactive2.
git-rebase--interactive2.c is then renamed to git-rebase--interactive.c.
Signed-off-by: Alban Gruin
---
No changes since v6.
.gitignore| 1 -
This rewrites the edit-todo functionality from shell to C.
To achieve that, a new command mode, `edit-todo`, is added, and the
`write-edit-todo` flag is removed, as the shell script does not need to
write the edit todo help message to the todo list anymore.
The shell version is then stripped in
This moves the rebase--helper modes still used by
git-rebase--preserve-merges.sh (`--shorten-ids`, `--expand-ids`,
`--check-todo-list`, `--rearrange-squash` and `--add-exec-commands`) to
rebase--interactive.c.
git-rebase--preserve-merges.sh is modified accordingly, and
rebase--helper.c is removed
This rewrites write_basic_state() from git-rebase.sh in C. This is the
first step in the conversion of init_basic_state(), hence the mode in
rebase--helper.c is called INIT_BASIC_STATE. init_basic_state() will be
converted in the next commit.
The part of read_strategy_opts() that parses the
This rewrites the part of init_revisions_and_shortrevisions() needed by
`--complete-action` (which initialize $shortrevisions) from shell to C.
When `upstream` is empty, it means that the user launched a `rebase
--root`, and `onto` contains the ID of an empty commit. As a range
between an empty
Instead of skip_unnecessary_picks() printing its result to stdout, it
returns it into a struct object_id, as the rewrite of complete_action()
(to come in the next commit) will need it.
rebase--helper then is modified to fit this change.
Signed-off-by: Alban Gruin
---
No changes since v6.
This removes the modes `--skip-unnecessary-picks`, `--append-todo-help`,
and `--checkout-onto` from rebase--helper.c, the functions of
git-rebase--interactive.sh that were rendered useless by the rewrite of
complete_action(), and append_todo_help_to_file() from
rebase-interactive.c.
This rewrites the submodes of interactive rebase (`--continue`,
`--skip`, `--edit-todo`, and `--show-current-patch`) in C.
git-rebase.sh is then modified to call directly git-rebase--interactive2
instead of git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
This rewrites init_basic_state() from shell to C. The call to
write_basic_state() in cmd_rebase__helper() is replaced by a call to the
new function.
The shell version is then stripped from git-rebase--interactive.sh.
Signed-off-by: Alban Gruin
---
No changes since v6.
This rewrites the part of init_revisions_and_shortrevisions() needed by
`--make-script` from shell to C. The new version is called
get_revision_ranges(), and is a static function inside of
rebase--helper.c. As this does not initialize $shortrevision, the
original shell version is not yet
This rewrites the part of interactive rebase which initializes the
basic state, make the script and complete the action, as a buitin, named
git-rebase--interactive2 for now. Others modes (`--continue`,
`--edit-todo`, etc.) will be rewritten in the next commit.
git-rebase--interactive.sh is
This rewrites checkout_onto() from shell to C.
A new command (“checkout-onto”) is added to rebase--helper.c. The shell
version is then stripped.
Signed-off-by: Alban Gruin
---
No changes since v6.
builtin/rebase--helper.c | 7 ++-
git-rebase--interactive.sh | 25
This rewrites (the misnamed) setup_reflog_action() from shell to C. The
new version is called prepare_branch_to_be_rebased().
A new command is added to rebase--helper.c, “checkout-base”, as well as
a new flag, “verbose”, to avoid silencing the output of the checkout
operation called by
This makes rebase_path_todo(), get_missing_commit_check_level(),
write_message() and the enum check_level accessible outside sequencer.c,
renames check_level to missing_commit_check_level, and prefixes its
value names by MISSING_COMMIT_ to avoid namespace pollution.
This function and this enum
This adds a new function, run_command_silent_on_success(), to
redirect the stdout and stderr of a command to a strbuf, and then to run
that command. This strbuf is printed only if the command fails. It is
functionnaly similar to output() from git-rebase.sh.
run_git_commit() is then refactored to
This refactors append_todo_help() to write its message to a buffer
instead of the todo-list. This is needed for the rewrite of
complete_action(), which will come after the next commit.
As rebase--helper still needs the file manipulation part of
append_todo_help(), it is extracted to a temporary
If the todo list generated by `--make-script` is empty,
complete_action() writes a noop, but if it has only commented-out
commands, it will abort with the message "Nothing to do", and does not
launch the editor. This adds a new test to ensure that
complete_action() behaves this way.
As part of the rewrite of interactive rebase, the sequencer will need to
open the sequence editor to allow the user to edit the todo list.
Instead of duplicating the existing launch_editor() function, this
refactors it to a new function, launch_specified_editor(), which takes
the editor as a
When a hunk was split before being edited manually, it does not apply
anymore cleanly. Apply coalesce_overlapping_hunks() first to make it
work. Enable test for it as well.
Signed-off-by: Jochen Sprickerhof
---
git-add--interactive.perl | 8
t/t3701-add-interactive.sh | 2 +-
2 files
On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote:
> On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote:
> Does that just mean that when cloning with --recursive with
> transfer.fsckObjects=true we'll re-read the file for each "clone"
> invocation, both for the main project and everything listed
From: René Scharfe
Create a performance test to see how the skipList implementation
performs. First we setup N bad commits, then we see how progressively
working our way up to 0..N in increments of 10x does. I.e. the
needle(s) in the haystack get progressively more numerous.
Signed-off-by: René
Several fsck tests used the exact same git-hash-object output, but had
copy/pasted that part of the setup code. Let's instead do that setup
once and use it in subsequent tests.
Signed-off-by: Ævar Arnfjörð Bjarmason
---
t/t5504-fetch-receive-strict.sh | 8
1 file changed, 4
From: René Scharfe
The buffer is unlikely to contain a NUL character, so printing its
contents using %s in a die() format is unsafe (detected with ASan).
Use an idiomatic strbuf_getline() loop instead, which ensures the buffer
is always NUL-terminated, supports CRLF files as well, accepts files
From: René Scharfe
Change the implementation of the skipList feature to use oidset
instead of oid_array to store SHA-1s for later lookup.
This list is parsed once on startup by fsck, fetch-pack or
receive-pack depending on the *.skipList config in use. I.e. only once
per invocation, but note
Ever since the skipList support was first added in cd94c6f91 ("fsck:
git receive-pack: support excluding objects from fsck'ing",
2015-06-22) the documentation for the format has that the file is a
sorted list of object names.
Thus, anyone using the feature would have thought the list needed to
be
The recent 65a836fa6b ("fsck: add stress tests for fsck.skipList",
2018-07-27) added various stress tests for odd invocations of
fsck.skipList, but didn't tests for some very simple ones, such as
asserting that providing to skipList with a bad commit causes fsck to
exit with a non-zero exit code.
It's annoying not to be able to put comments and empty lines in the
skipList, when e.g. keeping a big central list of commits to skip in
/etc/gitconfig, which was my motivation for 1362df0d41 ("fetch:
implement fetch.fsck.*", 2018-07-27).
Implement that, and document what version of Git this was
There is currently no comment syntax for the fsck.skipList, this isn't
really by design, and it would be nice to have support for comments.
Document that this doesn't work, and test for how this errors
out. These tests reveal a current bug, if there's invalid input the
output will emit some of
Hi,
I’ve found something that may be a regression in git rebase implementation in
2.18.0.
First I spotted it on macOS but I can also confirm it happening on Linux.
Git 2.19.0.rc0.48.gb9dfa238d is affected too.
In order to trigger it, a repo layout similar to the following is required:
files/
Hello there,
I was looking for the possibility of sorting the output of the command "git
diff --stat" by the number of modifications. Currently, the output of this
command show the modified files by alphabetic order.
I didn't find a "builtin" option which allows to sort the files by number of
Hi,
On Thu, 23 Aug 2018, Jonathan Nieder wrote:
> Ævar Arnfjörð Bjarmason wrote:
>
> [...]
> >> Since all operations that make new objects (e.g., "git commit") add
> >> the new objects to the corresponding index, this mapping is possible
> >> for all objects in the object store.
> >
> > Are we
On Tue, Aug 28 2018, Edward Thomson wrote:
> On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason
> wrote:
>> If we instead had something like clean/smudge filters:
>>
>> [extensions]
>> objectFilter = sha256-to-sha1
>> compatObjectFormat = sha1
>> [objectFilter
Johannes Schindelin writes:
>> I do recall discouraging you from including irrelevant rant/whine in
>> the log message a few times in the recent past, and also I do recall
>> you never listening to me. Don't make me an excuse.
>
> Junio, I would really appreciate less emotional, and more
On Thu, Aug 23 2018, Ævar Arnfjörð Bjarmason wrote:
>> Transition plan
>> ---
>
> One thing that's not covered in this document at all, which I feel is
> missing, is how we're going to handle references to old commit IDs in
> commit messages, bug trackers etc. once we go through the
Am 28.08.2018 um 11:52 schrieb Ævar Arnfjörð Bjarmason:
> It's annoying not to be able to put comments and empty lines in the
> skipList, when e.g. keeping a big central list of commits to skip in
> /etc/gitconfig, which was my motivation for 1362df0d41 ("fetch:
> implement fetch.fsck.*",
On Tue, Aug 28, 2018 at 2:50 PM, Ævar Arnfjörð Bjarmason
wrote:
> If we instead had something like clean/smudge filters:
>
> [extensions]
> objectFilter = sha256-to-sha1
> compatObjectFormat = sha1
> [objectFilter "sha256-to-sha1"]
> clean = ...
> smudge =
Am 27.08.2018 um 22:15 schrieb Ævar Arnfjörð Bjarmason:
>
> On Mon, Aug 27 2018, Ævar Arnfjörð Bjarmason wrote:
>
>> From: René Scharfe
>>
>> Object IDs to skip are stored in a shared static oid_array. Lookups do
>> a binary search on the sorted array. The code checks if the object IDs
>> are
On 8/24/2018 2:40 PM, Duy Nguyen wrote:
On Thu, Aug 23, 2018 at 7:33 PM Stefan Beller wrote:
+core.fastIndex::
+ Enable parallel index loading
++
+This can speed up operations like 'git diff' and 'git status' especially
+when the index is very large. When enabled, Git will do the
The Outreachy application period is set to begin on September 10th for
interns participating in the December-March program. Do we want to
participate?
Details on the program are here:
https://www.outreachy.org/communities/cfp/
If we want to, then we need:
1. Volunteers to mentor. This is
On Tue, Aug 28, 2018 at 6:33 AM Johannes Schindelin
wrote:
> On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote:
> > On Tue, Aug 28 2018, Nikolay Kasyanov wrote:
> >
> > > I’ve found something that may be a regression in git rebase
> > > implementation in 2.18.0.
> > > First I spotted it on
In short, I want to be able to do
$ git difftool 5c5a -v2
where -v2 is passed to the tool invoked in the end. I'll elaborate on
why ...
Background.
Some changes are not obvious to spot. One of the best examples I found
is this one:
Hi,
On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote:
> On Tue, Aug 28 2018, Nikolay Kasyanov wrote:
>
> > I’ve found something that may be a regression in git rebase implementation
> > in 2.18.0.
> > First I spotted it on macOS but I can also confirm it happening on Linux.
> > Git
Edward Thomson writes:
> If I'm understanding you correctly, then on the libgit2 side, I'm very much
> opposed to this proposal. We never execute commands, nor do I want to start
> thinking that we can do so arbitrarily. We run in environments where that's
> a non-starter
>
> At present, in
Hi,
Yes, it does fix this behavior. Could you please point me to the thread?
Best,
Nikolay
> On 28. Aug 2018, at 15:33, Johannes Schindelin
> wrote:
>
> Hi,
>
> On Tue, 28 Aug 2018, Ævar Arnfjörð Bjarmason wrote:
>
>> On Tue, Aug 28 2018, Nikolay Kasyanov wrote:
>>
>>> I’ve found something
Jochen Sprickerhof writes:
> When a hunk was split before being edited manually, it does not apply
> anymore cleanly. Apply coalesce_overlapping_hunks() first to make it
> work. Enable test for it as well.
>
> Signed-off-by: Jochen Sprickerhof
> ---
> git-add--interactive.perl | 8
>
On 8/28/2018 1:38 PM, Junio C Hamano wrote:
g...@jeffhostetler.com writes:
From: Jeff Hostetler
This RFC patch series adds structured logging to git. The motivation,
...
Jeff Hostetler (25):
structured-logging: design document
structured-logging: add STRUCTURED_LOGGING=1 to
Hi Derrick,
Derrick Stolee wrote:
> A focused aside, since you brought up the online "standup": it seems the IRC
> channel has been less than ideal, with people trying to participate but
> having nickname issues or being muted. You also describe another issue: the
> timing. Having a real-time
Jonathan Nieder wrote:
> The current IRC experience might be a bit unrepresentative, due to
> https://freenode.net/news/spam-shake:
https://freenode.net/news/spambot-attack may be a better link.
Thanks,
Jonathan
Tiago Botelho writes:
> diff --git a/bisect.c b/bisect.c
> index 4eafc8262..cb80f29c5 100644
> --- a/bisect.c
> +++ b/bisect.c
> @@ -82,15 +82,16 @@ static inline void weight_set(struct commit_list *elem,
> int weight)
> *((int*)(elem->item->util)) = weight;
> }
>
> -static int
Elijah Newren writes:
> - Add a flag to turn off directory rename detection, and set the
> flag for every call from am.c in order to avoid problems like this.
I'd say this is the only practical solution, before you deprecate
the "pipe format-patch output to am -3" style of "git rebase" (and
On Mon, Aug 27, 2018 at 7:32 PM Stefan Beller wrote:
> > Besides some small conflicts on 'pu', like the previous part, it also
> > breaks 'pu' because of API changes. The fix is trivial though, just
> > prepend the_repository as the first argument for the broken function
> > calls.
>
> This
On both AIX 7200-00-01-1543 and FreeBSD 11.2-RELEASE-p2 the
"${var:-"str"}" syntax means something different than what it does
under the bash or dash shells.
Both will consider the start of the new unescaped quotes to be a new
argument to test_expect_success, resulting in the following error:
This makes the vanilla test suite pass without errors on the FreeBSD
system noted in the commit messages.
On AIX things are still horribly broken, but this fixes one more issue
that also affects that system.
Ævar Arnfjörð Bjarmason (2):
tests: fix non-portable "${var:-"str"}" construct
The iconv that comes with a FreeBSD 11.2-RELEASE-p2 box I have access
to doesn't support the SHIFT-JIS encoding. Guard a test added in
e92d62253 ("convert: add round trip check based on
'core.checkRoundtripEncoding'", 2018-04-15) first released with Git
v2.18.0 with a prerequisite that checks for
Stefan Beller writes:
> This is the continuation of f2d48994dc1 (submodule.c: submodule_move_head
> works with broken submodules, 2017-04-18), which tones down the case of
> "broken submodule" in case of a missing git directory of the submodule to
> be only a warning.
After seeing this warning,
Johannes Schindelin wrote:
> On Mon, 27 Aug 2018, Junio C Hamano wrote:
>> Johannes Schindelin writes:
>>> Jonathan Nieder wrote:
Please include this information in the commit message. It's super
helpful to find this kind of information about why a patch does what
it does when
"H.Merijn Brand" writes:
> So, my wish would be to have an option, possibly using -- to pass
> additional command line arguments to git difftool, so that
>
> $ git difftool $commit~1..$commit -- -m -v2
>
> would pass the arguments after -- transparantly to ccdiff (in my case)
At the syntax
Hi,
Johannes Schindelin wrote:
> On Thu, 23 Aug 2018, Jonathan Nieder wrote:
> > Ævar Arnfjörð Bjarmason wrote:
>>> Are we going to need a midx version of these mapping files? How does
>>> midx fit into this picture? Perhaps it's too obscure to worry about...
>>
>> That's a great question! I
Derrick Stolee wrote:
> I'm not super-familiar with how the transition plan specifically needs this
> mapping, but it seems like a good place to put it.
Would you mind reading it through and letting me know your thoughts?
More eyes can't hurt.
Thanks,
Jonathan
g...@jeffhostetler.com writes:
> From: Jeff Hostetler
>
> This RFC patch series adds structured logging to git. The motivation,
> ...
>
> Jeff Hostetler (25):
> structured-logging: design document
> structured-logging: add STRUCTURED_LOGGING=1 to Makefile
> structured-logging: add
Johannes Schindelin writes:
> Hi Tiago,
>
> On Tue, 28 Aug 2018, Tiago Botelho wrote:
>
>> This will enable users to implement bisecting on first parents
>> which can be useful for when the commits from a feature branch
>> that we want to merge are not always tested.
>
> This message is still
On Mon, Aug 27, 2018 at 9:36 PM Junio C Hamano wrote:
> > PS. I notice that v4 does not pad to align entries at 4 byte boundary
> > like v2/v3. This could cause a slight slow down on x86 and segfault on
> > some other platforms.
>
> Care to elaborate?
>
> Long time ago, we used to mmap and read
I'm using windows. Have had it happen on 8.1 and 10.
"git status" shows "nothing to commit, working tree clean". I am using git
version 2.17.1.windows.2
-Original Message-
From: brian m. carlson
Sent: Monday, August 27, 2018 5:58 PM
To: Brennan Conroy
Cc: git@vger.kernel.org
Subject:
On Mon, Aug 27, 2018 at 8:37 PM Stefan Beller wrote:
>
> On Sun, Aug 26, 2018 at 3:03 AM Nguyễn Thái Ngọc Duy
> wrote:
> >
> > This function calls do_diff_cache() which eventually needs to set this
> > "istate" to unpack_options->src_index (*). This is an unfornate fact
>
> unfortunate
>
> >
From: Derrick Stolee
The commit-graph feature is tested in isolation by
t5318-commit-graph.sh and t6600-test-reach.sh, but there are many
more interesting scenarios involving commit walks. Many of these
scenarios are covered by the existing test suite, but we need to
maintain coverage when the
Previously, the sed command for generating manpage-base-url.xsl
was printed to the console when being run.
For the purpose of silencing it, define a $(QUIET) variable which
contains an '@' if verbose mode isn't enabled and which is empty
otherwise. This just silences the command invocation
On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote:
> > Due to the simplicity of the current code and our inlining, the compiler
> > can usually figure this out for now. So I wouldn't expect this patch to
> > actually improve performance right away. But as that discussion shows,
> >
When a file contains lines that look like conflict markers, 'git
rerere' may fail not be able to record a conflict resolution.
Emphasize that in the man page, and mention a possible workaround for
the issue.
Suggested-by: Junio C Hamano
Signed-off-by: Thomas Gummerer
---
Compared to v1, this
4af3220 ("rerere: teach rerere to handle nested conflicts",
2018-08-05) introduced slightly better behaviour if the user commits
conflict markers and then gets another conflict in 'git rerere'.
However this is just a heuristic to punt on such conflicts better, and
doesn't deal with any unmatched
On 8/28/2018 5:36 PM, Jonathan Nieder wrote:
Without this change, the build breaks with clang:
For some reason, it didn't fail with GCC for me, but this is an
obviously correct change to make. Thanks!
libgit/ref-filter.pic.o: multiple definition of 'filter_refs'
libgit/commit-reach.pic.o:
On 8/28/2018 5:21 PM, Jeff King wrote:
On Sun, Aug 26, 2018 at 08:56:21PM +, brian m. carlson wrote:
Due to the simplicity of the current code and our inlining, the compiler
can usually figure this out for now. So I wouldn't expect this patch to
actually improve performance right away. But
> > > - echo "gitdir:
> > > ../../../.git/modules/sub3/modules/dirdir/subsub"
> > > >./sub3/dirdir/subsub/.git_expect
> > > + echo "gitdir:
> > > ../../../.git/modules/sub3/modules/dirdir%2fsubsub"
> > > >./sub3/dirdir/subsub/.git_expect
> >
> > One interesting thing about
Tim Schumacher writes:
> Previously, the sed command for generating manpage-base-url.xsl
> was printed to the console when being run.
>
> For the purpose of silencing it, define a $(QUIET) variable which
> contains an '@' if verbose mode isn't enabled and which is empty
> otherwise. This just
On 2018-08-27 06:13 PM, Stas Bekman wrote:
[...]
> I now know how get the filenames for "clean/smudge" filters. Can you
> please help with the same for "textconv". %f doesn't work - it gets
> stuck there waiting for stdin, the following seems to pass, but I'm not
> sure it's correct:
On a closer
On Tue, Aug 28, 2018 at 4:14 PM Ævar Arnfjörð Bjarmason
wrote:
> On Fri, Aug 24 2018, Eric Sunshine wrote:
> > Shortening the names makes them ugly and often unreadable. That's not
> > a complaint with this patch; just a general observation regarding
> > 8-byte limitation with this platform's
Hello,
A trivial enhancement request:
All commands which require that the author is set (and complain if
it is not set) should accept the option --author.
At least the command stash does not accept this option. We are using
git version 2.17.1 (Ubuntu 18.04).
Thanks for the great work!
Best
On Tue, Aug 28, 2018 at 5:31 PM Derrick Stolee wrote:
> On 8/28/2018 4:41 PM, Stefan Beller wrote:
> > On Tue, Aug 28, 2018 at 1:33 PM Derrick Stolee via GitGitGadget
> > wrote:
> >> + GIT_TEST_COMMIT_GRAPH=0 &&
> >> + test_must_fail git merge -m final G
> > This
> "r" it is! I forgot about it. But this is for local variable or
> argument names only right? The field name (in diff_options for
> example) should stay something more descriptive like repo, I think.
Yea I agree, we should have more descriptive things in long lived structs.
Thanks,
Stefan
Junio C Hamano writes:
> Johannes Schindelin writes:
>
>> I would have preferred to reuse the already existing commits generated in
>> the `setup` phase rather than generating yet another batch, and to not
>> introduce an inconsistent way to present a commit graph (compare your
>> diagram with
Callers don't expect library function find_worktree() to die(); they
expect it to return the named worktree if found, or NULL if not.
Although find_worktree() itself never invokes die(), it calls
real_pathdup() with 'die_on_error' incorrectly set to 'true', thus will
die() indirectly if the
This is a pure code movement to avoid having to forward-declare the
function when new callers are subsequently added.
Signed-off-by: Eric Sunshine
---
builtin/worktree.c | 28 ++--
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/builtin/worktree.c
For consistency with "add -f -f" and "move -f -f" which override
the lock on a worktree, allow "remove -f -f" to do so, as well, as a
convenience.
Signed-off-by: Eric Sunshine
---
Documentation/git-worktree.txt | 1 +
builtin/worktree.c | 11 ++-
t/t2028-worktree-move.sh
For cleanliness, "git worktree prune" deletes the .git/worktrees
directory if it is empty after pruning is complete.
For consistency, make "git worktree remove " likewise delete
.git/worktrees if it is empty after the removal.
Signed-off-by: Eric Sunshine
---
builtin/worktree.c | 8
For safety, "git worktree add " will refuse to add a new
worktree at if is already associated with a worktree
entry, even if is missing (for instance, has been deleted or
resides on non-mounted removable media or network share). The typical
way to re-create a worktree at in such a situation is
This series started as a fix for a bug reported by Peff[1] in which the
"database" of worktrees could be corrupted (or at least become
internally inconsistent) by having multiple worktree entries associated
with the same path.
Peff's particular use-case for git-worktree is Documentation/doc-diff
For consistency with "add -f -f", which allows a missing but locked
worktree path to be re-used, allow "move -f -f" to override a lock,
as well, as a convenience.
Signed-off-by: Eric Sunshine
---
Documentation/git-worktree.txt | 3 +++
builtin/worktree.c | 13 +
prune_worktrees() and delete_git_dir() both remove worktree
administrative entries from .git/worktrees, and their implementations
are nearly identical. The only difference is that prune_worktrees() is
also capable of removing a bogus non-worktree-related file from
.git/worktrees.
Simplify by
A given path should only ever be associated with a single registered
worktree. This invariant is enforced by refusing to create a new
worktree at a given path if that path already exists. For example:
$ git worktree add -q --detach foo
$ git worktree add -q --detach foo
fatal: 'foo'
Certain conditions must be met for a path to be a valid candidate as the
location of a new worktree; for instance, the path must not exist or
must be an empty directory. Although the number of conditions is small,
new conditions will soon be added so factor out the existing checks into
a separate
1 - 100 of 160 matches
Mail list logo