First of all, thanks again for spending time on this.
On Sat, Nov 8, 2014 at 12:30 AM, Jeff King wrote:
> On Fri, Nov 07, 2014 at 11:35:59PM -0800, Junio C Hamano wrote:
>
> So just to be clear, the behavior we want is that:
>
> echo foo >some-new-path
> git add some-new-path
> git checkout
pathspec" was a deliberate design choice, not an implementation glitch.
>
> Pardon HTML, misspellings and grammos, typed on a tablet.
>
> On Nov 7, 2014 11:10 PM, "Martin von Zweigbergk"
> wrote:
>>
>> Trying again from plain old gmail which I think does not send a
&g
Trying again from plain old gmail which I think does not send a
multipart content.
On Fri, Nov 7, 2014 at 11:06 PM, Martin von Zweigbergk
wrote:
> Is this also related to "git checkout $rev ." not removing removed files?
> What you say about the difference in implementation betw
On Sun, Dec 8, 2013 at 12:06 PM, John Keeping wrote:
> Commit 15a147e (rebase: use @{upstream} if no upstream specified,
> 2011-02-09) says:
>
> Make it default to 'git rebase @{upstream}'. That is also what
> 'git pull [--rebase]' defaults to, so it only makes sense that
>
I was recently confused by the yoda condition in this block of code from [1]
+ for (i = 0; i < revs.nr; i++)
+ if (&bases->item->object == &revs.commit[i]->object)
+ break; /* found */
+ if (revs.nr <= i)
I think I was particularly surprised because it came so soon after the
"i < revs.nr". I didn
Thanks for taking care of this! Maybe John or I can finally get the
changes to rebase done after this.
A few comments below. Sorry I didn't find time to review the earlier revisions.
On Fri, Oct 25, 2013 at 2:38 PM, Junio C Hamano wrote:
> +
> +where `origin/master` used to point at commits B3,
Sorry about the regression and thanks for report and fixes.
On Thu, Oct 24, 2013 at 9:24 PM, Jeff King wrote:
> On Thu, Oct 24, 2013 at 08:40:13PM -0700, Junio C Hamano wrote:
>
>> Maarten de Vries writes:
>>
>> > Some more info: It used to work as intended. Using a bisect shows it
>> > has been
On Mon, Oct 21, 2013 at 4:24 AM, John Keeping wrote:
> On Sun, Oct 20, 2013 at 10:03:29PM -0700, Martin von Zweigbergk wrote:
>> On Wed, Oct 16, 2013 at 11:53 AM, John Keeping wrote:
>> > Commit 15a147e (rebase: use @{upstream} if no upstream specified,
>
On Wed, Oct 16, 2013 at 11:53 AM, John Keeping wrote:
> Commit 15a147e (rebase: use @{upstream} if no upstream specified,
> 2011-02-09) says:
>
> Make it default to 'git rebase @{upstream}'. That is also what
> 'git pull [--rebase]' defaults to, so it only makes sense that
>
On Wed, Oct 16, 2013 at 11:53 AM, John Keeping wrote:
> Commit 15a147e (rebase: use @{upstream} if no upstream specified,
> 2011-02-09) says:
>
> Make it default to 'git rebase @{upstream}'. That is also what
> 'git pull [--rebase]' defaults to, so it only makes sense that
>
On Sat, Aug 24, 2013 at 9:19 PM, Jonathan Nieder wrote:
> Thomas Ackermann wrote:
>> --- a/Documentation/user-manual.txt
>> +++ b/Documentation/user-manual.txt
>> @@ -1784,17 +1784,6 @@ repository that you pulled from.
>> <>; instead, your branch will just be
>> updated to point to the latest co
On Sun, Jun 23, 2013 at 4:54 PM, Jonathan Nieder wrote:
>
> In other words, HEAD always either points to an unborn or existing
> branch or an existing commit. It's not clear to me what it would
> mean to detach from an unborn branch.
I think it should mean that the next commit would be a root co
On Tue, Jun 18, 2013 at 12:28 AM, Johannes Sixt wrote:
>
> The recently introduced tests used uppercase letters to denote
> cherry-picks of commits having the corresponding lowercase letter names.
> The helper functions also set up tags with the names of the commits.
>
> But this constellation fai
On Thu, Jun 13, 2013 at 3:29 PM, Junio C Hamano wrote:
> Ramkumar Ramachandra writes:
>
> A more troublesome is that nobody seems to check the return value of
> this function. If head-name, onto or orig-head is missing, is that
> an error condition that should make the callers of read_basic_stat
On Thu, Jun 13, 2013 at 11:15 AM, Felipe Contreras
wrote:
> @@ -82,7 +82,7 @@ static int reset_index(const unsigned char *sha1, int
> reset_type, int quiet)
> if (unpack_trees(nr, desc, &opts))
> return -1;
>
> - if (reset_type == MIXED || reset_type == HARD) {
> +
On Sun, Jun 9, 2013 at 9:40 AM, Felipe Contreras
wrote:
> Signed-off-by: Felipe Contreras
> ---
> t/t3425-rebase-topology-merges.sh | 15 ++-
> 1 file changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/t/t3425-rebase-topology-merges.sh
> b/t/t3425-rebase-topology-merges.sh
>
Yes, sorry. I find this whole story quite amusing (albeit distracting
and unnecessary), but sorry for adding to the spam. I'll be quiet now.
On Mon, Jun 10, 2013 at 11:33 AM, Martin Langhoff
wrote:
> On Mon, Jun 10, 2013 at 2:11 PM, Martin von Zweigbergk
> wrote:
>> On Mon, Jun
On Mon, Jun 10, 2013 at 9:58 AM, Felipe Contreras
wrote:
> On Mon, Jun 10, 2013 at 4:05 AM, Stefano Lattarini
> wrote:
>
>>> You need two sides to have an argument.
>
>> I disagree. Unless you mean than, whenever a part behaves in a
>> hostile and aggressive way, the other part should just silen
Signed-off-by: Martin von Zweigbergk
---
t/t3400-rebase.sh | 31 +
t/t3401-rebase-partial.sh | 45 ---
t/t3404-rebase-interactive.sh | 10 +-
t/t3409-rebase-preserve-merges.sh | 53
t/t3425-rebase-topology-merges.sh | 258
Changes since v5:
* Improved test_linear_range
* Changed TODOs to be about consistency, not --topo-order
Martin von Zweigbergk (7):
add simple tests of consistency across rebase types
add tests for rebasing with patch-equivalence present
add tests for rebasing of empty commits
add
Update the following:
- Quote 'setup'
- Remove blank lines within test case body
- Use test_commit instead of custom quick_one
- Create branch "topic" from tag created by test_commit
Signed-off-by: Martin von Zweigbergk
---
t/t3406-rebase-message.sh | 30 +
Signed-off-by: Martin von Zweigbergk
---
t/lib-rebase.sh | 17
t/t3421-rebase-topology-linear.sh | 85 +++
2 files changed, 102 insertions(+)
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 1e0ff28..4b74ae4 100644
--- a/t/lib
Helped-by: Johannes Sixt
Signed-off-by: Martin von Zweigbergk
---
t/lib-rebase.sh | 16
t/t3421-rebase-topology-linear.sh | 78 +++
2 files changed, 94 insertions(+)
create mode 100755 t/t3421-rebase-topology-linear.sh
diff --git
t3406 is supposed to test "messages from rebase operation", so let's
move tests in t3400 that fit that description into 3406. Most of the
functionality they tested, except for the messages, has now been
subsumed by t3420.
Signed-off-by: Martin von Zweigbergk
---
t/t3400-rebase.
Signed-off-by: Martin von Zweigbergk
---
t/t3421-rebase-topology-linear.sh | 129 ++
1 file changed, 129 insertions(+)
diff --git a/t/t3421-rebase-topology-linear.sh
b/t/t3421-rebase-topology-linear.sh
index f19f0d0..e67add6 100755
--- a/t/t3421-rebase
Signed-off-by: Martin von Zweigbergk
---
t/t3401-rebase-partial.sh | 24
t/t3421-rebase-topology-linear.sh | 58 +++
2 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
On Tue, Jun 4, 2013 at 10:18 AM, Junio C Hamano wrote:
> Martin von Zweigbergk writes:
>
>> ---
>> +#TODO: make all flavors of rebase use --topo-order
>> +test_run_rebase success 'e n o' ''
>> +test_run_rebase success 'e n o' -m
>
On Mon, Jun 3, 2013 at 11:15 PM, Johannes Sixt wrote:
> Am 6/4/2013 7:14, schrieb Martin von Zweigbergk:
>> On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano wrote:
>>>> +
>>>> +# checks that the revisions in "$2" represent a linear range with the
>&
On Mon, Jun 3, 2013 at 3:28 PM, Junio C Hamano wrote:
>> +
>> +# checks that the revisions in "$2" represent a linear range with the
>> +# subjects in "$1"
>> +test_linear_range () {
>> + ! { git log --format=%p "$2" | sane_grep " " ;} &&
>
> An interesting way to spell:
>
> test $(git rev
---
t/t3400-rebase.sh | 31 +
t/t3401-rebase-partial.sh | 45 ---
t/t3404-rebase-interactive.sh | 10 +-
t/t3409-rebase-preserve-merges.sh | 53
t/t3425-rebase-topology-merges.sh | 258 ++
5 files changed, 260 ins
Helped-by: Johannes Sixt
---
t/lib-rebase.sh | 15
t/t3421-rebase-topology-linear.sh | 78 +++
2 files changed, 93 insertions(+)
create mode 100755 t/t3421-rebase-topology-linear.sh
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
ind
t3406 is supposed to test "messages from rebase operation", so let's
move tests in t3400 that fit that description into 3406. Most of the
functionality they tested, except for the messages, has now been
subsumed by t3420.
---
t/t3400-rebase.sh | 22 --
t/t3406-rebase-me
---
t/t3421-rebase-topology-linear.sh | 129 ++
1 file changed, 129 insertions(+)
diff --git a/t/t3421-rebase-topology-linear.sh
b/t/t3421-rebase-topology-linear.sh
index 81e3d59..659a7b3 100755
--- a/t/t3421-rebase-topology-linear.sh
+++ b/t/t3421-rebase-topo
Update the following:
- Quote 'setup'
- Remove blank lines within test case body
- Use test_commit instead of custom quick_one
- Create branch "topic" from tag created by test_commit
---
t/t3406-rebase-message.sh | 30 +-
1 file changed, 9 insertions(+), 21 deletio
---
t/lib-rebase.sh | 17
t/t3421-rebase-topology-linear.sh | 85 +++
2 files changed, 102 insertions(+)
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 62b3887..16eeb1c 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -80,3
---
t/t3401-rebase-partial.sh | 24
t/t3421-rebase-topology-linear.sh | 58 +++
2 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 58f4823..7ba1797 100755
--- a/t/
The only change since v4 should be that t3420 was renamed t3421.
Martin von Zweigbergk (7):
add simple tests of consistency across rebase types
add tests for rebasing with patch-equivalence present
add tests for rebasing of empty commits
add tests for rebasing root
add tests for
On Mon, Jun 3, 2013 at 11:05 AM, Junio C Hamano wrote:
> Martin von Zweigbergk writes:
>
>> On Tue, May 28, 2013 at 11:39 PM, Martin von Zweigbergk
>> wrote:
>>> create mode 100755 t/t3420-rebase-topology-linear.sh
>>
>> Just FYI, there's another tes
On Tue, May 28, 2013 at 11:39 PM, Martin von Zweigbergk
wrote:
> create mode 100755 t/t3420-rebase-topology-linear.sh
Just FYI, there's another test case with the same number
(t3420-rebase-autostash) in pu. I don't know how you normally handle
such cases.
--
To unsubscribe from th
---
> The reason is that this check is incomplete:
>
>test_revision_subjects 'd i e u' HEAD~2 HEAD^2 HEAD^ HEAD
Nice catch! This should fix it. I couldn't use the method you
suggested because of how test_revision_subjects works (repeated
revisions are ignored), but this makes the check strict
Update the following:
- Quote 'setup'
- Remove blank lines within test case body
- Use test_commit instead of custom quick_one
- Create branch "topic" from tag created by test_commit
---
t/t3406-rebase-message.sh | 30 +-
1 file changed, 9 insertions(+), 21 deletio
t3406 is supposed to test "messages from rebase operation", so let's
move tests in t3400 that fit that description into 3406. Most of the
functionality they tested, except for the messages, has now been
subsumed by t3420.
---
t/t3400-rebase.sh | 22 --
t/t3406-rebase-me
---
t/t3400-rebase.sh | 31 +
t/t3401-rebase-partial.sh | 45 ---
t/t3404-rebase-interactive.sh | 10 +-
t/t3409-rebase-preserve-merges.sh | 53
t/t3425-rebase-topology-merges.sh | 252 ++
5 files changed, 254 ins
---
t/t3420-rebase-topology-linear.sh | 129 ++
1 file changed, 129 insertions(+)
diff --git a/t/t3420-rebase-topology-linear.sh
b/t/t3420-rebase-topology-linear.sh
index 81e3d59..659a7b3 100755
--- a/t/t3420-rebase-topology-linear.sh
+++ b/t/t3420-rebase-topo
---
t/lib-rebase.sh | 17
t/t3420-rebase-topology-linear.sh | 85 +++
2 files changed, 102 insertions(+)
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 62b3887..16eeb1c 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -80,3
Patches are now expected to be dropped iff they are on upstream. I've
also followed all of Johannes's other suggestions except for the one
about topo-order.
Martin von Zweigbergk (7):
add simple tests of consistency across rebase types
add tests for rebasing with patch-equivalen
Helped-by: Johannes Sixt
---
t/lib-rebase.sh | 15
t/t3420-rebase-topology-linear.sh | 78 +++
2 files changed, 93 insertions(+)
create mode 100755 t/t3420-rebase-topology-linear.sh
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
ind
---
t/t3401-rebase-partial.sh | 24
t/t3420-rebase-topology-linear.sh | 58 +++
2 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 58f4823..7ba1797 100755
--- a/t/
On Wed, May 29, 2013 at 12:57 AM, Johannes Sixt wrote:
> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>> +# a---b---c
>> +# \ \
>> +# d---e \
>> +#\ \ \
>> +# n---o---w---v
>> +# \
On Thu, May 30, 2013 at 5:54 AM, Johannes Sixt wrote:
> Am 30.05.2013 07:30, schrieb Martin von Zweigbergk:
>> On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt wrote:
>>> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>>>> +# f
>>&g
On Wed, May 29, 2013 at 11:40 PM, Felipe Contreras
wrote:
> On Thu, May 30, 2013 at 1:14 AM, Martin von Zweigbergk
> wrote:
>> On Wed, May 29, 2013 at 10:41 PM, Felipe Contreras
>> wrote:
>>> On Thu, May 30, 2013 at 12:30 AM, Martin von Zweigbergk
>>> wrote
On Wed, May 29, 2013 at 10:41 PM, Felipe Contreras
wrote:
> On Thu, May 30, 2013 at 12:30 AM, Martin von Zweigbergk
> wrote:
>> On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt wrote:
>>> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>>>> +# f
>>
On Wed, May 29, 2013 at 12:31 AM, Johannes Sixt wrote:
> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>> +test_run_rebase () {
>> + result=$1
>> + shift
>> + test_expect_$result "rebase $* --onto --root with merge-base does not
>> go to
On Wed, May 29, 2013 at 12:09 AM, Johannes Sixt wrote:
> Am 5/29/2013 8:39, schrieb Martin von Zweigbergk:
>> +# f
>> +# /
>> +# a---b---c---g---h
>> +# \
>> +# d---G---i
> ...
>> +test_run_rebase () {
>> + result=$1
>
After way too long, here is finally a new version of the tests I sent
at: http://thread.gmane.org/gmane.comp.version-control.git/205796.
I have split the test up into two files. They stil take quite some
time to run.
Martin von Zweigbergk (7):
add simple tests of consistency across rebase
---
t/lib-rebase.sh | 17
t/t3420-rebase-topology-linear.sh | 85 +++
2 files changed, 102 insertions(+)
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
index 62b3887..16eeb1c 100644
--- a/t/lib-rebase.sh
+++ b/t/lib-rebase.sh
@@ -80,3
t3406 is supposed to test "messages from rebase operation", so let's
move tests in t3400 that fit that description into 3406. Most of the
functionality they tested, except for the messages, has now been
subsumed by t3420.
---
t/t3400-rebase.sh | 22 --
t/t3406-rebase-me
---
t/t3400-rebase.sh | 31 +
t/t3401-rebase-partial.sh | 45 ---
t/t3404-rebase-interactive.sh | 10 +-
t/t3409-rebase-preserve-merges.sh | 53
t/t3425-rebase-topology-merges.sh | 250 ++
5 files changed, 252 ins
Helped-by: Johannes Sixt
---
t/lib-rebase.sh | 15
t/t3420-rebase-topology-linear.sh | 78 +++
2 files changed, 93 insertions(+)
create mode 100755 t/t3420-rebase-topology-linear.sh
diff --git a/t/lib-rebase.sh b/t/lib-rebase.sh
ind
---
t/t3420-rebase-topology-linear.sh | 129 ++
1 file changed, 129 insertions(+)
diff --git a/t/t3420-rebase-topology-linear.sh
b/t/t3420-rebase-topology-linear.sh
index 40fe264..2429aa8 100755
--- a/t/t3420-rebase-topology-linear.sh
+++ b/t/t3420-rebase-topo
Update the following:
- Quote 'setup'
- Remove blank lines within test case body
- Use test_commit instead of custom quick_one
- Create branch "topic" from tag created by test_commit
---
t/t3406-rebase-message.sh | 30 +-
1 file changed, 9 insertions(+), 21 deletio
---
t/t3401-rebase-partial.sh | 24
t/t3420-rebase-topology-linear.sh | 58 +++
2 files changed, 58 insertions(+), 24 deletions(-)
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 58f4823..7ba1797 100755
--- a/t/
:-)
On Tue, May 28, 2013 at 11:05 PM, Felipe Contreras
wrote:
> On Wed, May 29, 2013 at 12:51 AM, Martin von Zweigbergk
> wrote:
>> On Tue, May 28, 2013 at 10:41 PM, Felipe Contreras
>> wrote:
>
>>> One change splits, the other change fixes, what's wrong with
On Tue, May 28, 2013 at 10:41 PM, Felipe Contreras
wrote:
> On Wed, May 29, 2013 at 12:33 AM, Martin von Zweigbergk
> wrote:
>> As Junio asked in the previous iteration, shouldn't this have been in
>> the first patch?
>
> No, the first patch is splitting the
Actually, are all of 2/8 - 7/8 fixes for things that broke in patch 1/8?
On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras
wrote:
> We don't use the 'rebase-apply'.
>
> Signed-off-by: Felipe Contreras
> ---
> git-rebase--cherrypick.sh | 4
> git-rebase.sh | 5 -
> 2 files c
Same here: should this have been in the first patch? If not, do you
know for how long it has been broken (since which commit)?
On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras
wrote:
> Signed-off-by: Felipe Contreras
> ---
> git-rebase.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git
As Junio asked in the previous iteration, shouldn't this have been in
the first patch?
On Tue, May 28, 2013 at 9:16 PM, Felipe Contreras
wrote:
> We are not in am mode.
>
> Signed-off-by: Felipe Contreras
> ---
> git-rebase--cherrypick.sh | 10 ++
> 1 file changed, 6 insertions(+), 4 d
Hi,
I think I have some patches at home that instead teach 'git am' the
--keep-empty flag. Does that make sense? It's been a while since I
looked at it, but I'll try to take a look tonight (PST).
Martin
On Tue, May 28, 2013 at 6:29 AM, Felipe Contreras
wrote:
> Hi,
>
> I've been analyzing 'git
On Tue, Apr 23, 2013 at 7:02 AM, Ramkumar Ramachandra
wrote:
> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index cc3a9a7..9514e31 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -597,7 +597,7 @@ do_next () {
> fi
>
On Tue, Apr 23, 2013 at 7:01 AM, Ramkumar Ramachandra
wrote:
> Practically speaking, the only reason why a `mkdir $state_dir` would
> fail is because $state_dir already exists.
Would we ever get to this point in the code if it already exists?
Also, I had the feeling that the check it might fail
On Tue, Apr 23, 2013 at 7:01 AM, Ramkumar Ramachandra
wrote:
> When testing if the $dotest directory exists, and if $next is greater
> than $last
When can that happen? If one edits the todo?
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vg
I'm curious what your use case is.
The behavior has been inconvenient for me too, but I have only used it
in test cases; I have no real use case where I wanted to create an
unborn/orphan branch.
On Fri, Feb 8, 2013 at 11:50 AM, Ramkumar Ramachandra
wrote:
> Hi,
>
> Why should I have to `git rm -
On Fri, Feb 1, 2013 at 1:05 PM, Phil Hord wrote:
>
> This is probably right, but it is not exactly the case that caused my itch.
> I think my branch looked like [...]
That also makes sense. I'll add tests for both cases. Your patch makes
both of them pass.
>> # a---b---c
>> # \ \
>> #
I'm working on a re-roll of
http://thread.gmane.org/gmane.comp.version-control.git/205796
and finally got around to including test cases for what you fixed in
this patch. I want to make sure I'm testing what you fixed here. See
questions below.
On Sat, Jan 12, 2013 at 12:46 PM, Phil Hord wrote:
On Thu, Jan 31, 2013 at 8:32 PM, Junio C Hamano wrote:
> Earlier, a230949 (am --rebasing: get patch body from commit, not
> from mailbox, 2012-06-26) learned to regenerate patch body from the
> commit object while rebasing, instead of reading from the rebase-am
> front-end. While doing so, it use
Hi,
I was tempted to ask this before, and the recent thread regarding "add
-u/A" [1] convinced me to.
On Sun, Jan 13, 2013 at 4:35 AM, Nguyễn Thái Ngọc Duy wrote:
> We have two ways of dealing with empty pathspec:
>
> 1. limit it to current prefix
> 2. match the entire working directory
>
> Some
On Sun, Jan 20, 2013 at 1:27 PM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> Matthieu Moy writes:
>>
>>> "git add -u" is one of the only exceptions (with "git grep"). I consider
>>> this as a bug, and think this should be changed. This has been discussed
>>> several times here, but no on
On Wed, Jan 16, 2013 at 10:00 AM, Martin von Zweigbergk
wrote:
> ---
>
> Sorry, I forgot the documentation updates. I hope this looks ok. Can
> you squash this in, Junio? Thanks.
I see the series just entered 'next', so I guess it would have to go
on top then. Perhaps with
---
Sorry, I forgot the documentation updates. I hope this looks ok. Can
you squash this in, Junio? Thanks.
I don't think any documentation update is necessary for the "reset on
unborn branch" patch. Let me know if you think differently.
Documentation/git-reset.txt | 18 +-
bui
I suppose this was meant for everyone. Adding back the others.
On Tue, Jan 15, 2013 at 10:27 AM, Holding, Lawrence (NZ)
wrote:
> Maybe use *argv instead of argv[0]?
Sure. Everywhere? Also in the lines added in patch 17/19 that refer to
both argv[0] and argv[1], such as "argv[1] &&
!get_sha1_tree
part of a loop. To avoid such confusion, remove the
variable and also the 'argc' parameter and check for NULL trailing
argv instead.
Signed-off-by: Martin von Zweigbergk
---
I explained a bit more why I was confused by the current style, but
I'm also perfectly happy if you just dr
mp; !err)
err = f();
(which is equivalent since we only care whether exit code is 0)
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index 2187d64..4e34195 100644
--- a
() out of
read_from_tree for symmetry with the 'else' block, making
read_from_tree() and reset_index() closer in functionality.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 18 +-
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/builtin/reset.c
t; patch by one that just
inlines update_index_refresh()
- Incorporated fixes from Junio's repo
- Provided some motivation for "replace switch by if-else" amd moved
the patch later in the series.
Thanks for reviewing!
Martin von Zweigbergk (19):
reset $pathspec: no need to di
half-way reset
state. As a bonus, we speed up "git reset --keep" a little on the
linux-2.6 repo (best of five, warm cache):
Before After
real0m0.315s0m0.296s
user0m0.290s0m0.280s
sys 0m0.020s0m0.010s
Signed-off-by: Martin von Zweigbergk
By extracting the code for updating the HEAD and ORIG_HEAD symbolic
references to a separate function, we declutter cmd_reset() a bit and
we make it clear that e.g. the four variables {,sha1_}{,old_}orig are
only used by this code.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 39
Now that there is only one caller left to the single-line method
update_index_refresh(), inline it.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index c316d9b
left-overs.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index 97fa9f7..c3eb2eb 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -349,18 +349,11 @@ int cmd_rese
Declutter cmd_reset() a bit by moving out the argument parsing to its
own function.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 70 +++--
1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/builtin/reset.c b/builtin
If writing or committing the new index file fails, we print "Could not
write new index file." followed by "Could not reset index file to
revision $rev.". The first message seems to imply the second, so print
only the first message.
Signed-off-by: Martin von Zweigbergk
---
0m0.130s
sys 0m0.070s0m0.080s
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index c1d6ef2..e8a3e41 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -336,6
ned-off-by: Martin von Zweigbergk
---
builtin/reset.c | 42 ++
1 file changed, 18 insertions(+), 24 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index e8a3e41..c316d9b 100644
--- a/builtin/reset.c
+++ b/builtin/reset.c
@@ -309,19 +309,6 @@ int cmd
x27;s leave it for now.
In the process, we expose and fix the minor UI bug that makes us print
"Could not refresh index" when we fail to write the index file when
invoked with a pathspec. Copy the error message from the pathspec-less
codepath ("Could not write new index file.").
reset $rev" would also be faster).
Timing "git reset" shows that it indeed becomes as fast as
"git reset ." after this patch.
Signed-off-by: Martin von Zweigbergk
---
It seems like a better solution would be for unpack_trees() learn the
same tricks as do_diff_cache(). I
tly referring to HEAD in "git reset HEAD".
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c| 16 -
t/t7106-reset-unborn-branch.sh | 52 ++
2 files changed, 62 insertions(+), 6 deletions(-)
create mode 100755 t/
ive() will resolve to a
tree. This is fine since interactive_reset only needs the parameter to
be a treeish and doesn't use it for display purposes.
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 48 +++-
t/t7102-reset.sh | 8 ++
0m0.093s0m0.080s
user0m0.040s0m0.020s
sys 0m0.050s0m0.050s
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 16 +---
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
index 915cc9f..8cc7c72 100644
--- a/builtin/r
e is dirty so that non-zero indicates an error.
This makes the 4 "disambiguation" test cases in t7102 clearer since
they all used to "fail", 3 of which "failed" due to changes in the
work tree. Now only the ambiguous one fails.
Signed-off-by: Martin von Zweigbergk
) It lets us use
the (arguably clearer) "if (pathspec)" in place of "if (i < argc)".
Signed-off-by: Martin von Zweigbergk
---
builtin/reset.c | 27 ++-
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/builtin/reset.c b/builtin/reset.c
Unstaged changes after reset:
D .gitattributes
D .gitignore
D .mailmap
...
This happens because the check for is_bare_repository() happens after
we branch off into read_from_tree() to reset with paths. Fix by moving
the branching point after the check.
Signed-off-by:
1 - 100 of 212 matches
Mail list logo