On Fri, Mar 10, 2017 at 04:52:07AM +, mash wrote:
> Maybe you can reuse the diff tests. I'll do another microproject then.
Yeah, definitely. If there are more tests required, then I will reuse
your ones!
>
> mash
>
> The original message doesn't seem to cc the mailing list:
Thanks! It was r
Hey, I have already worked on this, and I made the change inside
sha1_name.c.
The final version of my patch is here[1].
> Handling the dash in sha1_name:get_sha1_basic is not an issue but
> git
> was designed with the dash in mind for options not for this weird
> short-hand so as long as there's
Hey Shuyang,
On Thu, Mar 09, 2017 at 09:47:12AM -0800, Stefan Beller wrote:
> > The "-" shorthand that stands for "the branch we were previously on",
> > like we did for "git merge -" sometime after we introduced "git checkout -".
> > Now I am introducing this shorthand to branch delete, i.e.
> > "
provided as argument was unknown to
handle_revision_opt().
Signed-off-by: Siddharth Kannan
---
revision.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index b37dbec..5674a9a 100644
--- a/revision.c
+++ b/revision.c
@@ -2016,8 +2016,6 @@ static
provided as argument was unknown to
handle_revision_opt().
Signed-off-by: Siddharth Kannan
---
revision.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index b37dbec..5674a9a 100644
--- a/revision.c
+++ b/revision.c
@@ -2016,8 +2016,6 @@ static
Swap the condition and bodies of an "if (A) do_A else do_B" in
setup_revisions() to "if (!A) do_B else do A", to make the change in
the the next step easier to read.
No behaviour change is intended in this step.
Signed-off-by: Siddharth Kannan
---
revision.c | 6 +++--
been removed.
This patch also adds a test to check that revert recognizes the "-" shorthand.
Signed-off-by: Siddharth Kannan
---
builtin/revert.c| 2 --
t/t3514-revert-shorthand.sh | 25 +
2 files changed, 25 insertions(+), 2 deletions(-)
cre
rent : this function calls revision.c:get_sha1
This patch also adds a test for checking that the shorthand works properly
Signed-off-by: Siddharth Kannan
---
builtin/merge.c | 2 --
t/t3035-merge-hyphen-shorthand.sh | 33 +
2 files changed,
this
patch. This is something that needs to be fixed later by making changes deeper
down the callchain.
Signed-off-by: Siddharth Kannan
---
sha1_name.c | 5 +++
t/t4214-log-shorthand.sh | 106 +++
2 files changed, 111 insertions(+)
cre
n.siddhart...@gmail.com
[2]: vpqbmu768on@anie.imag.fr
[3]: xmqq1sv1euob@gitster.mtv.corp.google.com
Siddharth Kannan (6):
revision.c: do not update argv with unknown option
revision.c: swap if/else blocks
revision.c: args starting with "-" might be a revision
sha1_name
on to the next argument.
This patch prepares the addition of "-" as a shorthand for "previous branch".
Signed-off-by: Siddharth Kannan
---
revision.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/revision.c b/revision.c
index 8d4ddae..5470c33 10064
On 21 February 2017 at 02:00, Junio C Hamano wrote:
> Siddharth Kannan writes:
> > So, is it okay to stop with just supporting "-" and not support things
> > like "-@{yesterday}"?
>
> If the approach to turn "-" into "@{-1}" at that sp
; is not an ideal final state, is probably an acceptable milestone to
> stop at.
So, is it okay to stop with just supporting "-" and not support things
like "-@{yesterday}"?
Matthieu's comments on the matter:
Siddharth Kannan writes:
> As per Matthieu'
Hey Junio and Matthieu,
On 17 February 2017 at 00:19, Junio C Hamano wrote:
> Matthieu Moy writes:
>
>> Siddharth Kannan writes:
>>
>>> This is as per our discussion[1]. The patches and commit messages are based
>>> on
>>> J
Hey Matthieu,
On 16 February 2017 at 23:52, Matthieu Moy wrote:
>
> Indeed, I misread the patch. The explanation could be a little bit more
> "tired-reviewer-proof" by not using a past tone, perhaps
>
> 1. setup_revision, which is changed to ...
Oh, okay! Sorry about the confusion!
Yes, I used
ill have to keep that part intact even in this solution. (I am not too
sure about this. If this is the preferred solution, then I will dig deeper and
find the right place as I did for the first part of this patch)
Matthieu: Thanks a lot for your comments on the tests! test_commit has made the
test
provided as argument was unknown to
handle_revision_opt().
Signed-off-by: Siddharth Kannan
---
revision.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/revision.c b/revision.c
index b37dbec..5674a9a 100644
--- a/revision.c
+++ b/revision.c
@@ -2016,8 +2016,6 @@ static
on to the next argument.
This patch prepares the addition of "-" as a shorthand for "previous branch".
Signed-off-by: Siddharth Kannan
---
revision.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/revision.c b/revision.c
index 8d4ddae..5470c33 10064
ds in this list are not of the rm-variety, (i.e a command that
would delete something), this change does not make it easier for people to
delete. (eg: "git branch -d -" is *not* enabled by this patch)
Signed-off-by: Siddharth Kannan
---
Instead of replacing the whole string, we would e
Swap the condition and bodies of an "if (A) do_A else do_B" in
setup_revisions() to "if (!A) do_B else do_A", to make the change in
the the next step easier to read.
No behaviour change is intended in this step.
Signed-off-by: Siddharth Kannan
---
revision.c | 6 +++--
remove code that does this shorthand stuff for
other commands as per Matthieu's comments)
--
Best Regards,
Siddharth Kannan.
On Sat, Feb 11, 2017 at 01:08:09PM -0800, Junio C Hamano wrote:
> Siddharth Kannan writes:
>
> > Um, I am sorry, but I feel that decrementing left, and incrementing it
> > again is
> > also confusing.
>
> Yes, but it is no more confusing than your original "
Hey Matthieu,
On Sun, Feb 12, 2017 at 10:48:56AM +0100, Matthieu Moy wrote:
> Siddharth Kannan writes:
>
> > sha1_name.c | 5
> > t/t4214-log-shorthand.sh | 73
> >
> > 2 files changed, 78 inserti
die("bad revision '%s'", arg);
> @@ -2255,8 +2261,6 @@ int setup_revisions(int argc, const char **argv, struct
> rev_info *revs, struct s
> append_prune_data(&prune_data, argv + i);
> break;
> }
> - else
> - got_rev_arg = 1;
> }
>
> if (prune_data.nr) {
Thanks Junio, for the time you spent analysing and writing the above version of
the patch!
Regards,
- Siddharth Kannan
ds in this list are not of the rm-variety, (i.e a command that
would delete something), this change does not make it easier for people to
delete. (eg: "git branch -d -" is *not* enabled by this patch)
Signed-off-by: Siddharth Kannan
---
sha1_name.c | 5
t/t4214-l
s starting
with "-" and once for arguments that didn't start with "-". Now, it will be
called once per argument.
This patch prepares the addition of "-" as a shorthand for "previous branch".
Signed-off-by: Siddharth Kannan
---
revision.c | 12
pqh944eof7@anie.imag.fr/#t
[2]:
https://public-inbox.org/git/can-3qhozn_wyvqbvdu_c1h4vuoat5fobfl7k+femnpqkxjw...@mail.gmail.com/
[3]: https://travis-ci.org/icyflame/git/builds/200431159
Siddharth Kannan (2):
revision.c: args starting with "-" might be a revision
sha1_name: teach get_sha1
On 9 February 2017 at 17:55, Matthieu Moy wrote:
>
>> [...]
>> As you might notice, in this list, most commands are not of the `rm` variety,
>> i.e. something that would delete stuff.
>
> OK, I think I'm convinced.
I am glad! :)
>
> Keep the arguments in mind when polishing the commit message.
On 9 February 2017 at 15:45, Matthieu Moy wrote:
>
> A non-quoted but yet important part of my initial email was:
>
> | So, as much as possible, I'd like to avoid being an org admin this
> | year. It's not a lot of work (much, much less than being a mentor!),
> | but if I manage to get some time t
Hello Matthieu,
On 8 February 2017 at 20:10, Matthieu Moy wrote:
> In a previous discussion, I made an analogy with "cd -" (which is the
> source of inspiration of this shorthand AFAIK): "-" did not magically
> become "the last visited directory" for all Unix commands, just for
> "cd". And in thi
Teach revision.c:setup_revisions that an argument starting with "-" can be an
argument also. `left` variable needs to be incremented only when the supplied
arg is neither an argument, nor an option.
Teach sha1_name.c:get_sha1_1 that "-" is equivalent to "@{-1}"
S
On Mon, Feb 06, 2017 at 03:09:47PM -0800, Junio C Hamano wrote:
> The focus of GSoC being mentoring those who are new to the open
> source development, and hopefully retain them in the community after
> GSoC is over, we do expect microprojects to be suitable for those
> who are new to the codebase.
n will be a lot more involved, of course, and I
> think it will be larger than a reasonable microproject for people
> new to the codebase.
So true :) I had spent a fair bit of time already on my previous patch,
and I thought I might as well complete my research into this, and send
this write-up to the mailing list, so that I could write a patch some
time later. In case you would prefer for me to not work on this
anymore because I am new to the codebase, I will leave it at this.
- Siddharth Kannan
Hey Pranit,
On Sun, Feb 05, 2017 at 02:45:46AM +0530, Pranit Bauva wrote:
> Hey Siddharth,
>
> On Sat, Feb 4, 2017 at 8:01 PM, Siddharth Kannan
> wrote:
> > The error_on_missing_default_upstream helper function learned to
> > take op_prep argument with 15a147e618 ("r
Hey Junio,
On Sun, Feb 05, 2017 at 04:15:03PM -0800, Junio C Hamano wrote:
> Siddharth Kannan writes:
>
> > @@ -158,6 +158,51 @@ static void cmd_log_init_finish(int argc, const char
> > **argv, const char *prefix,
> >
> > if (quiet)
> >
ick: allow "-" as
abbreviation of '@{-1}', 2013-09-05) and 4e8115ff (merge: allow "-" as a
short-hand for "previous branch", 2011-04-07)
(c) and (d) have been implemented by using the strbuf API, growing it to the
right size and placing "@{-1}"
nt is no longer used. Remove it.
Signed-off-by: Siddharth Kannan
---
Thanks a lot for the review, Pranit and Junio! I have made the appropriate
changes, and the edit to the file inside contrib/examples/ has been removed from
this patch.
git-parse-remote.sh | 3 +--
git-rebase.sh | 2 +-
nt is no longer used. Remove it.
Signed-off-by: Siddharth Kannan
---
Thanks a lot, Pranit and Junio for your reviews on the first version of this
patch. I have changed the messages accordingly.
contrib/examples/git-pull.sh | 2 +-
git-parse-remote.sh | 3 +--
git-rebase.sh
ropriately
Signed-off-by: Siddharth Kannan
---
The contrib/examples/git-pull.sh file also has a variable op_prep which is used
in one of the messages shown the user. Should I remove this variable as well?
contrib/examples/git-pull.sh | 2 +-
git-parse-remote.sh | 3 +--
git-rebase.sh
39 matches
Mail list logo