.
Reported-by: Junio C Hamano
Helped-by: Jeff King
Signed-off-by: Paul Tan
---
builtin/am.c | 9 ++-
t/t4153-am-resume-override-opts.sh | 144 +
2 files changed, 150 insertions(+), 3 deletions(-)
create mode 100755 t/t4153-am-resume-
On Wed, Jul 29, 2015 at 1:09 AM, Junio C Hamano wrote:
> Paul Tan writes:
>
>> diff --git a/t/t4153-am-resume-override-opts.sh
>> b/t/t4153-am-resume-override-opts.sh
>> new file mode 100755
>> index 000..c49457c
>> --- /dev/null
>> +++ b/t/t4153-am
On Fri, Jul 31, 2015 at 4:40 AM, Matthieu Moy wrote:
> The previous code broke for example
>
> git pull --upload-pack 'echo --foo'
>
> Reported-by: Joey Hess
> Fix-suggested-by: Junio C Hamano
> Signed-off-by: Matthieu Moy
Thanks for cleaning up my mess! ><
Regards,
Paul
--
To unsubscribe f
On Sat, Aug 1, 2015 at 12:04 AM, Junio C Hamano wrote:
> Paul Tan writes:
>
>> I think I will introduce a format_patch() function that takes a single
>> commit-ish so that we can use tag names to name the patches:
>>
>> # Given a single commit $commit, formats the f
On Tue, Aug 4, 2015 at 6:18 AM, Junio C Hamano wrote:
> - I think pt/am-builtin is more or less ready, but the fix to the
>issue that options given to 'git am' when restarting were
>rejected must be queued on that topic before we can start
>thinking of merging it to 'master' for the n
n() that does the above so that we can
save a few lines of code, and make the die() messages consistent.
Helped-by: Torsten Bögershausen
Helped-by: Jeff King
Helped-by: Johannes Schindelin
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
git-compat-util.h | 1 +
foreign patch support: introduce patch_format, 2009-05-27)) to
allow the user to choose between the different patch formats.
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
builtin/am.c | 107 +--
1 file changed, 104 insertions(+), 3
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
will refuse to apply patches if the index is dirty. Re-implement this
behavior in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 45 +
1 file changed, 45 insertions
"\r\n". To support this,
implement strbuf_getline_crlf(), which will remove both '\n' and "\r\n"
from the end of the line.
Helped-by: Junio C Hamano
Helped-by: Eric Sunshine
Helped-by: Johannes Schindelin
Signed-off-by: Pau
o that we can save
a few lines of code and make the die() messages consistent.
Helped-by: Jeff King
Helped-by: Johannes Schindelin
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
git-compat-util.h | 1 +
wrapper.c | 21 +
2 files changed, 22 insertions(+)
di
will refresh the index before applying patches.
Re-implement this behavior.
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
builtin/am.c | 72 +++-
1 file changed, 71 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
the last failure
from being lost, git-am will not rewind HEAD back to the original
commit if HEAD moved since the last failure. Re-implement this through
safe_to_abort().
Helped-by: Stefan Beller
Signed-off-by: Paul Tan
---
Notes:
v7
* Add a free(curr_branch) so we don't leak m
lse.
Signed-off-by: Paul Tan
---
builtin/am.c | 31 ---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index d4b4b86..0875e69 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -80,6 +80,9 @@ struct am_state {
/* num
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
supported resuming from a failed patch application by skipping the
current patch. Re-implement this feature by introducing am_skip().
Helped-by: Stefan Beller
Signed-off-by: Paul Tan
---
builtin/am.c | 123
.
Signed-off-by: Paul Tan
---
builtin/am.c | 59 ++-
1 file changed, 58 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
index d82d07e..3c2ec15 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -80,7 +80,8 @@ static int
ring cleanup to git-rebase.sh.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 30 ++
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index a5d5e8c..440a653 100644
--- a/builtin/am.c
+++
setting is true. Since we do not run commit-tree, we
re-implement this behavior by handling the commit.gpgsign setting
ourselves.
Helped-by: Stefan Beller
Signed-off-by: Paul Tan
---
builtin/am.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin
config setting, which
controls whether --keep-cr is on by default.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 29 +++--
1 file changed, 23 insertions(+), 6 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index 8e97839
directly without
spawning a new process.
Helped-by: Junio C Hamano
Helped-by: Jeff King
Helped-by: Johannes Schindelin
Signed-off-by: Paul Tan
---
builtin/am.c | 317 +++
1 file changed, 317 insertions(+)
diff --git a/builtin/am.c b
mailinfo.scissors (and perhaps through other settings in
the future), to be safe we make an explicit distinction between
SCISSORS_UNSET, SCISSORS_TRUE and SCISSORS_FALSE.
Signed-off-by: Paul Tan
---
builtin/am.c | 48
1 file changed, 48 insertions(+)
diff
ebase/am, 2006-12-08)
* "git rerere clear" when --skip-ing. Since f131dd4 (rerere: record (or
avoid misrecording) resolved, skipped or aborted rebase/am,
2006-12-08)
* "git rerere clear" when --abort-ing. Since 3e5057a (git am --abort,
2008-07-16)
Re-implement the above i
d
as-is instead.
Re-implement this in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 34 +-
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index fd26721..ec579a6 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@
die_user_resolve() function.
Since cc12005 (Make git rebase interactive help match documentation.,
2006-05-13), git-am supports the --resolvemsg option which is used by
git-rebase to override the message printed out when git-am fails.
Re-implement this option.
Signed-off-by: Paul Tan
-implement this option in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 68dca2e..8e97839 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -98,6 +98,7 @@ struct am_state {
i
-off-by: Paul Tan
---
builtin/am.c | 8
1 file changed, 8 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 84d3e05..1561580 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -108,6 +108,7 @@ struct am_state {
int scissors; /* enum scissors_type */
struct
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am
supported the --signoff option which will append a signoff at the end of
the commit messsage. Re-implement this feature in parse_mail() by
calling append_signoff() if the option is set.
Signed-off-by: Paul Tan
---
Notes
, by checking if
stdin is not a tty and there is no resume command given.
Re-implement the above two safety checks.
Signed-off-by: Paul Tan
---
builtin/am.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 6c24d07..d4b4b86 100644
--- a/builtin
builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 24
1 file changed, 24 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 7d7f91d..f0e3aab 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -456,6 +456,27 @@ static void am_destroy(const struct am_state *state
git-mailinfo, which disables the re-encoding.
Since d84029b (--utf8 is now default for 'git-am', 2007-01-08), --utf8
is specified by default in git-am.sh.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 11 +++
1 file changed, 11 insertion
x27;s functionality has been re-implemented in
builtin/am.c, remove this redirection, and retire git-am.sh into
contrib/examples/.
Signed-off-by: Paul Tan
---
Makefile| 1 -
builtin/am.c| 15 ---
git-am.sh => contrib/examples/g
would list the paths that needed
3-way fallback, so that the user can review them more carefully to spot
mismerges.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan
---
Notes:
v7
* As support for am.threeWay was removed in master, this patch now
does not implement
e commit itself.
The above 3 commits introduced a separate parse_mail() code path in
git-am.sh's --rebasing mode that bypasses git-mailinfo. Re-implement
this code path in builtin/am.c as parse_mail_rebase().
Signed-off-by: Paul Tan
---
Notes:
v7
* Since a5481a6 (convert "enum
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),
git-am.sg will invoke the pre-applypatch hook after applying the patch
to the index, but before a commit is made. Should the hook exit with a
non-zero status, git am will exit.
Re-implement this in builtin/am.c.
Signed-off-by: Paul
xplicitly recognizes such a stray directory, and allows the
user to remove it with am --abort.
Re-implement this feature in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 17 +
1 file changed, 17 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index a02c84e..
contents of the
$state_dir/rewritten file.
Re-implement this in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 55 +++
1 file changed, 55 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 18611fa..dbec9fc 100644
--- a/builtin
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07),
git-am.sh will invoke the post-applypatch hook after the patch is
applied and a commit is made. The exit code of the hook is ignored.
Re-implement this in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 2 ++
1 file
Since eb2151b (rebase: support automatic notes copying, 2010-03-12),
git-am.sh supported automatic notes copying in --rebasing mode by
invoking "git notes copy" once it has finished applying all the patches.
Re-implement this feature in builtin/am.c.
Signed-off-by: Paul Tan
---
bu
Since a79ec62 (git-am: Add --ignore-date option, 2009-01-24), git-am.sh
supported the --ignore-date option, and would use the current timestamp
instead of the one provided in the patch if the option was set.
Re-implement this option in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 6
file path.
Signed-off-by: Paul Tan
---
cache-tree.c | 29 +
cache-tree.h | 1 +
2 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/cache-tree.c b/cache-tree.c
index 32772b9..feace8b 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -592,7 +592,7 @@ static
StGit patches.
Re-implement this in builtin/am.c.
Helped-by: Eric Sunshine
Signed-off-by: Paul Tan
---
builtin/am.c | 132 ++-
1 file changed, 131 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
index 33d1f24..d82d07e
.
When --resolved-ing in --interactive mode, we need to take care to
update the patch with the contents of the index, such that the correct
patch will be displayed when the patch is viewed in interactive mode.
Re-implement the above in builtin/am.c
Signed-off-by: Paul Tan
---
builtin/am.c | 105
check to see if the committer ident has been
configured, or a default one can be constructed, before even starting to
apply patches.
Re-implement this in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/builtin/am.c b/builtin/am.
ns in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 45 +
1 file changed, 45 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 727cfb8..f842f69 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -106,6 +106,7 @@ struct am_state {
formats, 2009-05-27), git-am.sh was able to auto-detect mercurial
patches by checking if the file begins with the line:
# HG changeset patch
Re-implement the above in builtin/am.c.
Helped-by: Stefan Beller
Signed-off-by: Paul Tan
---
Notes:
v7
* Since a5481a6 (convert
message:
The -b/--binary option has been a no-op for long time, and it
will be removed. Please do not use it anymore.
will be printed.
Re-implement this in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/builtin/am.c b
sense for the user to run am --resolved when there is
no session in progress, we error out in this case.
Signed-off-by: Paul Tan
---
builtin/am.c | 72 +++-
1 file changed, 71 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin
that are created
from making the commits.
Signed-off-by: Paul Tan
---
builtin/am.c | 55 +++
1 file changed, 51 insertions(+), 4 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index 1f198e4..a2811b6 100644
--- a/builtin/am.c
+++ b/builtin
.
Re-implement these two options in builtin/am.c.
Signed-off-by: Paul Tan
---
builtin/am.c | 50 ++
1 file changed, 50 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 528b2c9..68dca2e 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -68,6
: Johannes Schindelin
Signed-off-by: Paul Tan
---
builtin/am.c | 177 +++
1 file changed, 177 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index fd32caf..ac172c4 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -6,9 +6,171 @@
prefix = setup_git_directory();
trace_repo_setup(prefix);
setup_work_tree();
This redirection should be removed when all the features of git-am.sh
have been re-implemented in builtin/am.c.
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
Makefile | 1 +
builtin.h| 1
advantage of git's internal caches.
This patch series rewrites git-am.sh into C builtin/am.c, and is part of my
GSoC project to rewrite git-pull and git-am into C builtins[1].
[1] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1
Paul Tan (45):
wrapper: implement xopen()
wrapper: im
h a solid use case, instead of implementing potentially undesirable behavior
and having to support it.
Paul Tan (3):
test_terminal: redirect child process' stdin to a pty
am: let command-line options override saved options
am: let --signoff override --no-signoff
built
t_terminal's stdin should be redirected to a source with large amount
of data to ensure that the child's stdin is not closed, e.g.
test_terminal git am --3way
Cc: Jeff King
Signed-off-by: Paul Tan
---
t/test-terminal.perl | 25 -
1 file changed, 20
.
Noticed-by: Junio C Hamano
Helped-by: Junio C Hamano
Helped-by: Jeff King
Signed-off-by: Paul Tan
---
builtin/am.c | 16 ++--
t/t4153-am-resume-override-opts.sh | 82 ++
2 files changed, 94 insertions(+), 4 deletions(-)
creat
signoff to the commit message when
resuming if so.
Signed-off-by: Paul Tan
---
builtin/am.c | 28 +---
t/t4153-am-resume-override-opts.sh | 20
2 files changed, 45 insertions(+), 3 deletions(-)
diff --git a/builtin/am.c b/bu
h a solid use case, instead of implementing potentially undesirable behavior
and having to support it.
Paul Tan (3):
test_terminal: redirect child process' stdin to a pty
am: let command-line options override saved options
am: let --signoff override --no-signoff
built
From: Remi Lespinet
Add the am.threeWay configuration variable to use the -3 or --3way
option of git am by default. When am.threeway is set and not desired
for a specific git am command, the --no-3way option can be used to
override it.
Signed-off-by: Remi Lespinet
Signed-off-by: Paul Tan
he command we are wrapping terminate before copy_stdin() finishes
writing all of its data to un-stall it.
Signed-off-by: Paul Tan
---
t/test-terminal.perl | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/t/test-terminal.perl b/t/test-terminal.perl
i
On Fri, Aug 7, 2015 at 5:29 PM, Johannes Schindelin
wrote:
>> diff --git a/builtin/am.c b/builtin/am.c
>> index 0961304..8c95aec 100644
>> --- a/builtin/am.c
>> +++ b/builtin/am.c
>> @@ -2265,6 +2284,9 @@ int cmd_am(int argc, const char **argv, const
>> char *prefix)
>>
>> if (resume
On Wed, Aug 12, 2015 at 11:06 AM, Paul Tan wrote:
> It's not present in this diff context, but this hunk modifies the code
> path where in_progress is true. In other words, we only check for
> SIGNOFF_EXPLICIT if
..we are resuming.
(Ugh, butter fingers)
Thanks,
Paul
--
To unsubsc
On Fri, Aug 7, 2015 at 6:15 AM, Eric Sunshine wrote:
> An alternative would be to have git-am detect that it is being tested
> and pretend that isatty() returns true.
I would vastly prefer a solution that would work for everything, for
all the C code and scripts, instead of implementing a workaro
d the
read_tree() function, which overwrites all entries in the index,
including the stat info.
Fix this by using unpack_trees() instead to merge the tree into the
index, so that the stat info from the index is kept.
Reported-by: Linus Torvalds
Signed-off-by: Johannes Schindelin
Signed-off-by: Pau
instead to merge the tree into the
index, so that the stat info from the index is kept.
Reported-by: Linus Torvalds
Helped-by: Junio C Hamano
Signed-off-by: Johannes Schindelin
Signed-off-by: Paul Tan
---
builtin/am.c| 49 -
t/t4151-am-
On Tue, Aug 18, 2015 at 5:36 PM, Matthieu Moy
wrote:
> I don't remember the details of the regression we had with the shell
> version, but that would probably deserve an additional test to enforce
> the "Hopefully there will be no regressions" part of your message.
Actually, technically, I think
haves.
While we are fixing the write_file() calls, fix the writing of the
"dirtyindex" file as well -- we should be creating an empty file to
match the behavior of git-am.sh.
Reported-by: SZEDER Gábor
Signed-off-by: Paul Tan
---
builtin/am.c | 30 +++---
1
On Wed, Sep 2, 2015 at 1:43 AM, Karthik Nayak wrote:
> On Tue, Sep 1, 2015 at 10:25 PM, Matthieu Moy
> wrote:
>> Hi,
>>
>> The Google Summer of Code 2015 is officially over. We had two students
>> (Paul and Karthik), and both of them passed. 100 % success :-).
>>
>
> Congrats Paul :)
Thanks, you
On Wed, Sep 2, 2015 at 12:55 AM, Matthieu Moy
wrote:
> I consider this GSoC as a great success and a pleasant experience.
> Congratulation to Paul and Karthik, and a warm "thank you" to everybody
> who contributed: administrators, mentors, reviewers, and obviously
> Junio! (not to mention Google,
Hi,
Thanks for handling this.
On Sun, Sep 6, 2015 at 12:56 PM, Junio C Hamano wrote:
> Linus noticed that the recently reimplementated "git am -s" defines
s/reimplementated/reimplemented/ ?
> the trailer block too rigidly, resulting an unnecessary blank line
s/resulting an/resulting in an/ ?
On Sun, Sep 6, 2015 at 12:56 PM, Junio C Hamano wrote:
> diff --git a/builtin/am.c b/builtin/am.c
> index 634f7a7..e7828e5 100644
> --- a/builtin/am.c
> +++ b/builtin/am.c
> @@ -1191,6 +1191,33 @@ static void NORETURN die_user_resolve(const struct
> am_state *state)
> exit(128);
> }
>
>
Hi,
On Fri, May 29, 2015 at 5:52 AM, Junio C Hamano wrote:
> Junio C Hamano writes:
>
>> * pt/pull-tests (2015-05-18) 8 commits
>> - t5520: check reflog action in fast-forward merge
>> - t5521: test --dry-run does not make any changes
>> - t5520: test --rebase failure on unborn branch with in
round.
[1] http://thread.gmane.org/gmane.comp.version-control.git/269236
Paul Tan (8):
t5520: prevent field splitting in content comparisons
t5520: test no merge candidates cases
t5520: test for failure if index has unresolved entries
t5520: test work tree fast-forward when fetch updates
fail in mysterious ways.
Replace the above 2 forms with:
test "$(cat file)" = expected
as quoting the command substitution will prevent field splitting.
Signed-off-by: Paul Tan
---
t/t5520-pull.sh | 70 -
1 file c
run, and will print
these advices, if the user is in the middle of a merge or has unmerged
files in the index.
Signed-off-by: Paul Tan
---
Notes:
v5:
* use "test_commit"
t/t5520-pull.sh | 19 +++
1 file changed, 19 insertions(+)
diff --git a/t/t5520-p
gered for each of these cases.
Signed-off-by: Paul Tan
---
t/t5520-pull.sh | 55 +++
1 file changed, 55 insertions(+)
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 5e4db67..4a2c0a1 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
When testing a fast-forward merge with git-pull, check to see if the
reflog action is "pull" with the arguments passed to git-pull.
While we are in the vicinity, remove the empty line as well.
Signed-off-by: Paul Tan
---
Notes:
v5:
* Loosen up the pattern used for
fails and prints out the
user-friendly error message in such a case.
Signed-off-by: Paul Tan
---
t/t5520-pull.sh | 9 +
1 file changed, 9 insertions(+)
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 872d765..90728e0 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -217,6 +217,15
Test that when --dry-run is provided to git-pull, it does not make any
changes, namely:
* --dry-run gets passed to git-fetch, so no FETCH_HEAD will be created
and no refs will be fetched.
* The index and work tree will not be modified.
Signed-off-by: Paul Tan
---
t/t5521-pull-options.sh
staged changes. Implement a test to ensure that this check is
triggered.
Signed-off-by: Paul Tan
---
Notes:
v5:
* Move test_i18ngrep into subshell
t/t5520-pull.sh | 15 +++
1 file changed, 15 insertions(+)
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index
-friendly advice is printed upon
failure.
Signed-off-by: Paul Tan
---
t/t5520-pull.sh | 21 +
1 file changed, 21 insertions(+)
diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh
index 265c693..872d765 100755
--- a/t/t5520-pull.sh
+++ b/t/t5520-pull.sh
@@ -183,6 +183,27
Hi,
On Tue, May 19, 2015 at 3:21 AM, Junio C Hamano wrote:
> Paul Tan writes:
>
>> This series rewrites git-pull.sh into a C builtin, thus improving its
>> performance and portability. It is part of my GSoC project to rewrite
>> git-pull
>> and git-am into bui
On Sat, May 30, 2015 at 3:29 PM, Paul Tan wrote:
> Hi,
> Okay, I'm trying this out in the next re-roll. I do agree that this
> patch series should not touch anything in t/ at all.
>
> One problem(?) is that putting builtins/pull.o in the BUILTIN_OBJS and
> leaving git-pull
Hi Johannes,
On Tue, May 19, 2015 at 9:04 PM, Johannes Schindelin
wrote:
> On 2015-05-18 17:06, Paul Tan wrote:
>> +/**
>> + * Given a refspec, returns the merge branch. Returns NULL if the refspec
>> src
>> + * does not refer to a branch.
>> + *
>> +
On Sun, May 31, 2015 at 4:18 PM, Paul Tan wrote:
> On Tue, May 19, 2015 at 9:04 PM, Johannes Schindelin
> wrote:
>> Also, I wonder if something like this would do the job:
>> spec = parse_fetch_refspec(1, &refspec);
>> if (spec->dst)
>>
To enable unambiguous parsing of abbreviated options, bundled short
options, separate form options and to provide consistent usage help, use
git-rev-parse --parseopt for option parsing. With this, simplify the
option parsing code.
Signed-off-by: Paul Tan
---
Notes:
v2
* Don'
is the last required behavior change for my rewrite of
git-pull.sh to C.
Paul Tan (2):
pull: handle git-fetch's options as well
pull: use git-rev-parse --parseopt for option parsing
Documentation/git-pull.txt | 3 --
git-pull.sh| 128 +++--
e to come after
git-merge's and git-rebase's options on the command line. Update the
documentation to reflect this.
Signed-off-by: Paul Tan
---
Notes:
Improve git-pull's option parsing
Previous versions:
[v1] http://thread.gmane.org/gmane.comp.version-control.gi
On Fri, May 29, 2015 at 7:05 AM, Eric Sunshine wrote:
> On Wed, May 27, 2015 at 9:33 AM, Paul Tan wrote:
>> @@ -128,13 +190,32 @@ static void am_next(struct am_state *state)
>> */
>> +/**
>> + * parse_options() callback that validates and sets opt->value to the
&g
Hi,
On Tue, Jun 2, 2015 at 9:37 PM, Matthieu Moy
wrote:
> Remi Lespinet writes:
>
>> +if test "$(git config --bool --get am.threeWay)" = true
>> +then
>> +threeway=t
>> +fi
>
> I think you missed Paul's remark on this:
>
> http://article.gmane.org/gmane.comp.version-control.git/270150
>
> No
Hi,
Some comments which may not necessarily be correct.
On Wed, Jun 3, 2015 at 5:55 AM, Kevin Daudt wrote:
> rebase learned to stash changes when it encounters a dirty work tree, but
> git pull --rebase does not.
>
> Only verify if the working tree is dirty when rebase.autostash is not
> enabled
This series rewrites git-pull.sh into a C builtin, thus improving its
performance and portability. It is part of my GSoC project to rewrite git-pull
and git-am into builtins[1].
[1] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1
Paul Tan (19):
parse-options-cb: implement parse_opt_pass_s
ay() parse-options callback, which
will reconstruct all the provided command-line options into an
argv_array, such that it can be passed to another git command. This is
useful for passing command-line options that can be specified multiple
times.
Signed-off-by: Paul Tan
---
Notes:
v2
se-options callback, which will
reconstruct the command-line option into an strbuf, such that it can be
passed to another git command.
Helped-by: Johannes Schindelin
Signed-off-by: Paul Tan
---
Notes:
v2
* Previously implemented as a static function in builtin/pull.c. It now
, --strategy-option: since ee2c795 (Teach git-pull to pass
-X to git-merge, 2009-11-25)
* -S, --gpg-sign: since ea230d8 (pull: add the --gpg-sign option.,
2014-02-10)
Signed-off-by: Paul Tan
---
Notes:
v2
* Use opt_parse_pass_strbuf(), opt_parse_pass_argv_array()
arse the heads in FETCH_HEAD for merging, and implementing
die_no_merge_candidates(), which will be called when FETCH_HEAD has no
heads for merging.
Helped-by: Johannes Schindelin
Signed-off-by: Paul Tan
---
Notes:
v2
* Switched to using fprintf_ln() which will append the trailing ne
Since b10ac50 (Fix pulling into the same branch., 2005-08-25), git-pull,
upon detecting that git-fetch updated the current head, will
fast-forward the working tree to the updated head commit.
Re-implement this behavior.
Signed-off-by: Paul Tan
---
builtin/pull.c | 30
handled by die_resolve_conflict(), we introduce a new function
die_conclude_merge() for printing a different error message for when
there are no unmerged files but the merge has not been finished.
Signed-off-by: Paul Tan
---
advice.c | 8
advice.h | 1 +
builtin/pull.c | 9 ++
en re-implemented in
builtin/pull.c, remove this redirection, and retire the old git-pull.sh
into contrib/examples/.
Signed-off-by: Paul Tan
---
Makefile| 1 -
builtin/pull.c | 7 ---
git-pull.sh => contrib/examples/git-pull.sh | 0
When we have a null-terminated array, it would be useful to convert it
or append it to an argv_array for further manipulation.
Implement argv_array_pushv() which will push a null-terminated array of
strings on to an argv_array.
Signed-off-by: Paul Tan
---
Documentation/technical/api-argv
introducing the option callback
handler parse_opt_passthru(). This callback is used to pass the
"--progress" or "--no-progress" command-line switch to git-fetch and
git-merge.
Signed-off-by: Paul Tan
---
Notes:
v2
* Use parse_opt_pass_strbuf().
t this behavior.
Helped-by: Junio C Hamano
Signed-off-by: Paul Tan
---
Notes:
v2
* Don't use strbuf_rtrim().
builtin/pull.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/builtin/pull.c b/builtin/pull.c
index f0d4710..c44cc90 100644
--- a/builtin/pull.c
1 - 100 of 611 matches
Mail list logo