= 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 gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v4
that we can
save a few lines of code, and make the die() messages consistent.
Helped-by: Torsten Bögershausen tbo...@web.de
Helped-by: Jeff King p...@peff.net
Signed-off-by: Paul Tan pyoka...@gmail.com
---
git-compat-util.h | 1 +
wrapper.c | 25 +
2 files changed
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 gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v4
* The term patch was overloaded to mean the RFC2822 mail
directly without
spawning a new process.
Helped-by: Junio C Hamano gits...@pobox.com
Helped-by: Jeff King p...@peff.net
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v4
* The word patch was overloaded to mean the RFC2822
by \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 gits...@pobox.com
Helped-by: Eric Sunshine sunsh...@sunshineco.com
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Paul Tan
of git's internal caches.
This WIP patch series rewrites git-am.sh into optimized 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 (44):
wrapper: implement xopen()
wrapper: implement
On Thu, Jun 25, 2015 at 9:40 PM, Paul Tan pyoka...@gmail.com wrote:
On Wed, Jun 24, 2015 at 11:10 PM, Johannes Schindelin
johannes.schinde...@gmx.de wrote:
+ else if (l1.len l2.len l3.len is_email(paths-items-string))
+ ret = PATCH_FORMAT_MBOX;
Maybe we can do better than
On Thu, Jun 25, 2015 at 12:36 AM, Johannes Schindelin
johannes.schinde...@gmx.de wrote:
On 2015-06-18 13:25, Paul Tan wrote:
diff --git a/builtin/am.c b/builtin/am.c
index 7b97ea8..d6434e4 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -94,6 +126,105 @@ static int read_state_file(struct
On Wed, Jun 24, 2015 at 11:10 PM, Johannes Schindelin
johannes.schinde...@gmx.de wrote:
Hi Paul,
On 2015-06-18 13:25, Paul Tan wrote:
diff --git a/builtin/am.c b/builtin/am.c
index e9a3687..7b97ea8 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -121,6 +121,96 @@ static void am_destroy
On Wed, Jun 24, 2015 at 11:59 PM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
3. I'm over-thinking this and you just want the struct strbufs in the
struct am_state to be switched to char*s?
Yes, everybody interacts with am_state, and these fields
On Wed, Jun 24, 2015 at 10:59 PM, Johannes Schindelin
johannes.schinde...@gmx.de wrote:
diff --git a/builtin/am.c b/builtin/am.c
index dbc8836..af68c51 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -6,6 +6,158 @@
#include cache.h
#include builtin.h
#include exec_cmd.h
+#include
C Hamano wrote:
Paul Tan pyoka...@gmail.com writes:
With the above fields, it is clear that the above fields are
per-message thing. So the loop to process multiple messages is
conceptually:
set up the entire am_state (for things like cur=1, last=N)
for each message
On Fri, Jun 19, 2015 at 5:02 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
+static int is_email(const char *filename)
+{
+ struct strbuf sb = STRBUF_INIT;
+ FILE *fp = xfopen(filename, r);
+ int ret = 1;
+
+ while (!strbuf_getline(sb, fp
Hi Junio,
On Tue, Jun 16, 2015 at 5:03 PM, Paul Tan pyoka...@gmail.com wrote:
This reverts commit d25e51596be9271ad833805a3d6f9012dc24ee79, removing
git-mailsplit's --no-inbody-headers option.
While --no-inbody-headers was introduced to prevent commit messages from
being munged by git
On Fri, Jun 19, 2015 at 4:26 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
@@ -0,0 +1,28 @@
+/*
+ * Builtin git am
+ *
+ * Based on git-am.sh by Junio C Hamano.
+ */
+#include cache.h
+#include builtin.h
+#include exec_cmd.h
+
+int cmd_am(int argc
On Fri, Jun 19, 2015 at 4:13 AM, Junio C Hamano gits...@pobox.com wrote:
I didn't look carefully, but does that mean 04/19 has the what if
you start from a subdirectory and are still using the scripted one?
issue we discussed recently for am?
It does, but git-pull.sh does not care about the
On Fri, Jun 19, 2015 at 4:43 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
diff --git a/builtin/am.c b/builtin/am.c
index dbc8836..af68c51 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -6,6 +6,158 @@
#include cache.h
#include builtin.h
#include
On Fri, Jun 19, 2015 at 5:28 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
If a file is unchanged but stat-dirty, git-apply may erroneously fail to
apply patches, thinking that they conflict with a dirty working tree.
As such, since 2a6f08a (am: refresh
On Fri, Jun 19, 2015 at 5:10 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
+ /* commit message and metadata */
+ struct strbuf author_name;
+ struct strbuf author_email;
+ struct strbuf author_date;
+ struct strbuf msg;
Same comment
On Fri, Jun 19, 2015 at 11:09 PM, Junio C Hamano gits...@pobox.com wrote:
You do realize that strbuf internally does alloc/free so as a solution to
fragmentation issue you are at the mercy of the same alloc/free, don't you?
Yes, of course, but it has the alloc variable to keep track of the
size
Implement do_commit(), which commits the index which contains the
results of applying the patch, along with the extracted commit message
and authorship information.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 51 +++
1 file
Implement applying the patch to the index using git-apply.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 57 -
1 file changed, 56 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
index d6434e4..296a5fc
of code and make the die() messages consistent.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
git-compat-util.h | 1 +
wrapper.c | 18 ++
2 files changed, 19 insertions(+)
diff --git a/git-compat-util.h b/git-compat-util.h
index bc77d77..4e69110 100644
--- a/git-compat
();
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 gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* Style
that we can
save a few lines of code, and make the die() messages consistent.
Helped-by: Torsten Bögershausen tbo...@web.de
Helped-by: Jeff King p...@peff.net
Signed-off-by: Paul Tan pyoka...@gmail.com
---
git-compat-util.h | 1 +
wrapper.c | 25 +
2 files changed
foreign patch support: introduce patch_format, 2009-05-27)) to
allow the user to choose between the different patch formats.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* Moved the TODO comment to the previous patch
builtin/am.c | 104
-implemented in
builtin/pull.c, remove this redirection, and retire the old git-pull.sh
into contrib/examples/.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Makefile| 1 -
builtin/pull.c | 7 ---
git-pull.sh = contrib/examples/git
-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/builtin/pull.c b/builtin/pull.c
index 492bb0e..98caffe 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -169,6 +169,25
Re-implement the behavior introduced by f9189cf (pull --rebase: exit
early when the working directory is dirty, 2008-05-21).
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 77 +-
1 file changed, 76 insertions(+), 1 deletion
setting is true. Since we do not run commit-tree, we
re-implement this behavior by handling the commit.gpgsign setting
ourselves.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/builtin/am.c b/builtin/am.c
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 by calling
append_signoff() if the option is set.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin
directly without
spawning a new process.
Helped-by: Junio C Hamano gits...@pobox.com
Helped-by: Jeff King p...@peff.net
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* Style fixes
builtin/am.c | 232 +++
1 file changed
to rewrite git-pull and git-am into C builtins[1].
[1] https://gist.github.com/pyokagan/1b7b0d1f4dab6ba3cef1
Paul Tan (31):
wrapper: implement xopen()
wrapper: implement xfopen()
am: implement skeletal builtin am
am: implement patch queue mechanism
am: split out mbox/maildir patches with git
-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 98
1 file changed, 98 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index e9a3687..7b97ea8 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -121,6 +121,96 @@ static void
for applying and committing a patch is not implemented yet.
* am_destroy(), which is finally called when we successfully applied all
the patches in the queue, to clean up by removing the state directory
and its contents.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 168
, 2009-08-04)
* --exclude, since 77e9e49 (am: pass exclude down to apply, 2011-08-03)
* --include, since 58725ef (am: support --include option, 2012-03-28)
Re-implement support for these options in builtin/am.c.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 46
-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 6623b49..608a2da 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -130,6 +130,8 @@ struct am_state {
/* override error message when patch
file path.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
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
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 pyoka...@gmail.com
---
builtin/am.c | 147 +--
1 file changed
Since 017678b (am/mailinfo: Disable scissors processing by default,
2009-08-26), git-am supported the --[no-]scissors option, passing it to
git-mailinfo.
Re-implement support for this option.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
There are tests for mailinfo --scissors
since 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().
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 95
, 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 pyoka...@gmail.com
---
Notes:
NOTE: there's no test for this
builtin/am.c | 19 +--
1 file changed, 17 insertions(+), 2 deletions
-rebase.sh.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index e154c87..9afa3bb 100644
--- a/builtin/am.c
+++ b/builtin
this behavior.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 20
1 file changed, 20 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index dfb6f7e..a7efe85 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -13,6 +13,7 @@
#include cache-tree.h
#include
config setting, which
controls whether --keep-cr is on by default.
Re-implement the above in builtin/am.c.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 30 --
1 file changed, 24 insertions(+), 6 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
.
Re-implement these two options in builtin/am.c.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 51 +++
1 file changed, 51 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index bbef91f..b73549f 100644
--- a/builtin/am.c
+++ b
to the stream when state-quiet is false.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 36 +---
1 file changed, 33 insertions(+), 3 deletions(-)
diff --git a/builtin/am.c b/builtin/am.c
index 4adc487..5f38264 100644
--- a/builtin/am.c
+++ b/builtin/am.c
no 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 pyoka...@gmail.com
---
builtin/am.c | 55 ++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/builtin
.
The above 3 commits introduced a separate parse_patch() code path in
git-am.sh's --rebasing mode that bypasses git-mailinfo. Re-implement
this code path in builtin/am.c as parse_patch_rebase().
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 155
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 pyoka...@gmail.com
this option in builtin/am.c.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
No test for am.messageid
builtin/am.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index b73549f..4cec380 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -113,6
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().
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/am.c | 121
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.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
Note: no tests for this
builtin/am.c | 46
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 pyoka...@gmail.com
---
builtin/am.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/builtin/am.c b/builtin/am.c
index 0d7e37c..bbef91f
the 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 pyoka
of the
merge head and the current branch.
This is re-implemented in run_rebase() where fork_point is not used if
it is the merge base returned by get_octopus_merge_base().
Helped-by: Stefan Beller sbel...@google.com
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Paul Tan pyoka
Tweak the error messages printed by die_no_merge_candidates() to take
into account that we may be rebasing against rather than merging
with.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/builtin
sbel...@google.com
Helped-by: Duy Nguyen pclo...@gmail.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v4
* Fixed the use-after-free. Thanks Duy for catching it.
builtin/pull.c | 35 ++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff
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 pyoka...@gmail.com
---
advice.c | 8
advice.h | 1 +
builtin/pull.c
On Tue, Jun 16, 2015 at 1:54 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
The scripted Porcelain is spawned after applying patches 1-3 from
here, when you do not have _GIT_USE_BUILTIN_AM exported. Haven't
RUN_SETUP code did its thing by that time?
Ah
Implement the fetch + merge functionality of git-pull, by first running
git-fetch with the repo and refspecs provided on the command line, then
running git-merge on FETCH_HEAD to merge the fetched refs into the
current branch.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan
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.
Helped-by: Stefan Beller sbel...@google.com
Signed-off-by: Paul Tan
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 pyoka...@gmail.com
---
Documentation
callback, which will
reconstruct the command-line option into an char* string, such that it
can be passed to another git command.
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Helped-by: Junio C Hamano gits...@pobox.com
Helped-by: Stefan Beller sbel...@google.com
Signed-off-by: Paul Tan
.
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
, and implementing
die_no_merge_candidates(), which will be called when FETCH_HEAD has no
heads for merging.
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 113
for tests that depend on a working git-pull implementation.
This redirection should be removed when all the features of git-pull.sh
have been re-implemented in builtin/pull.c.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Makefile | 1 +
builtin.h
to pass
-Xoption 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 pyoka...@gmail.com
---
builtin/pull.c | 75 ++
1 file changed, 75 insertions(+)
diff --git
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 pyoka...@gmail.com
---
builtin/pull.c | 30
by introducing pull_into_void() which will be
called instead of run_merge() if HEAD is invalid.
Helped-by: Stephen Robin stephen.ro...@gmail.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git
-fetch if --dry-run is
set. Re-implement this behavior.
Signed-off-by: Ramsay Jones ram...@ramsay1.demon.co.uk
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 95 ++
1 file changed, 95 insertions(+)
diff --git a/builtin/pull.c
to pass the --[no-]progress
command line options to git-fetch and git-merge.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 36
1 file changed, 36 insertions(+)
diff --git a/builtin/pull.c b/builtin
Since b814da8 (pull: add pull.ff configuration, 2014-01-15), git-pull.sh
would lookup the configuration value of pull.ff, and set the flag
--ff if its value is true, --no-ff if its value is false and
--ff-only if its value is only.
Re-implement this behavior.
Signed-off-by: Paul Tan pyoka
On Wed, Jun 17, 2015 at 7:18 AM, Ramsay Jones
ram...@ramsay1.demon.co.uk wrote:
Hi Paul,
If you need to re-roll your patches on the 'pt/pull-builtin' branch,
could you please squash this into the patch which corresponds to
commit 191241e5.
Thanks. I must have been half-asleep because the
On Wed, Jun 17, 2015 at 9:54 PM, Duy Nguyen pclo...@gmail.com wrote:
I think Coverity caught this correctly.
** CID 1306846: Memory - illegal accesses (USE_AFTER_FREE)
/builtin/pull.c: 287 in config_get_rebase()
not munge commit log message,
2008-04-16), as git-am bypasses git-mailinfo and gets the commit message
directly from the commit ID in the patch.
git-am is the only user of --no-inbody-headers, and this option is not
documented. As such, it should be removed.
Signed-off-by: Paul Tan pyoka
in the patch, the resulting commit will have the wrong author date.
Fix this by using gmtime() instead, which uses UTC instead of the user's
time zone.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
git-am.sh | 6 +++---
t/t4150-am.sh | 23 +++
2 files changed, 26
.
Based-on-patch-by: Chris Packham judge.pack...@gmail.com
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v2
* Just pass the filename directly to perl. Hmm, I think we should add a
-- in front so that filenames that start
On Fri, Jun 12, 2015 at 1:45 AM, Stefan Beller sbel...@google.com wrote:
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan pyoka...@gmail.com wrote:
@@ -138,13 +202,33 @@ static void am_next(struct am_state *state)
*/
static void am_run(struct am_state *state)
{
- while (state-cur = state
On Fri, Jun 12, 2015 at 1:39 AM, Stefan Beller sbel...@google.com wrote:
On Thu, Jun 11, 2015 at 3:21 AM, Paul Tan pyoka...@gmail.com wrote:
Notes:
v2
* Declare struct am_state as static
builtin/am.c | 164
+++
1 file
-line.
Based-on-patch-by: Chris Packham judge.pack...@gmail.com
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v2
* Pass the filename directly to perl instead.
git-am.sh | 3 ++-
t/t4150-am.sh | 10 ++
2 files changed, 12
to be able to extract the commit author, date and message
from such a patch.
Based-on-patch-by: Chris Packham judge.pack...@gmail.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
t/t4150-am.sh | 22 ++
1 file changed, 22 insertions(+)
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index
this series file, is able to detect it as
an StGit series and apply all the patches in the series.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
t/t4150-am.sh | 17 +
1 file changed, 17 insertions(+)
diff --git a/t/t4150-am.sh b/t/t4150-am.sh
index 51962e4..7aad8f8 100755
--- a/t
://thread.gmane.org/gmane.comp.version-control.git/256502
Paul Tan (5):
t4150: test applying StGit patch
am: teach StGit patch parser how to read from stdin
t4150: test applying StGit series
am: use gmtime() to parse mercurial patch date
am: teach mercurial patch parser how to read from stdin
git
On Mon, Jun 15, 2015 at 6:08 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
diff --git a/git.c b/git.c
index 44374b1..42328ed 100644
--- a/git.c
+++ b/git.c
@@ -370,6 +370,7 @@ static int run_builtin(struct cmd_struct *p, int argc,
const char **argv
On Tue, Jun 16, 2015 at 1:14 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
On Mon, Jun 15, 2015 at 6:08 AM, Junio C Hamano gits...@pobox.com wrote:
Paul Tan pyoka...@gmail.com writes:
diff --git a/git.c b/git.c
index 44374b1..42328ed 100644
--- a/git.c
callback, which will
reconstruct the command-line option into an char* string, such that it
can be passed to another git command.
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Helped-by: Junio C Hamano gits...@pobox.com
Helped-by: Stefan Beller sbel...@google.com
Signed-off-by: Paul Tan
, and implementing
die_no_merge_candidates(), which will be called when FETCH_HEAD has no
heads for merging.
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* Tightening up of FETCH_HEAD
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 pyoka...@gmail.com
---
Documentation
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.
Helped-by: Stefan Beller sbel...@google.com
Signed-off-by: Paul Tan
for tests that depend on a working git-pull implementation.
This redirection should be removed when all the features of git-pull.sh
have been re-implemented in builtin/pull.c.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* style fixes
to pass the --[no-]progress
command line options to git-fetch and git-merge.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
Notes:
v3
* Re-worded commit message.
builtin/pull.c | 36
1 file changed, 36
and cannot take
advantage of git's internal caches.
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
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 pyoka...@gmail.com
---
advice.c | 8
advice.h | 1 +
builtin/pull.c
-fetch if --dry-run is
set. Re-implement this behavior.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 95 ++
1 file changed, 95 insertions(+)
diff --git a/builtin/pull.c b/builtin/pull.c
index 0442da9..731e2a6 100644
Since b814da8 (pull: add pull.ff configuration, 2014-01-15), git-pull.sh
would lookup the configuration value of pull.ff, and set the flag
--ff if its value is true, --no-ff if its value is false and
--ff-only if its value is only.
Re-implement this behavior.
Signed-off-by: Paul Tan pyoka
Implement the fetch + merge functionality of git-pull, by first running
git-fetch with the repo and refspecs provided on the command line, then
running git-merge on FETCH_HEAD to merge the fetched refs into the
current branch.
Helped-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan
-by: Junio C Hamano gits...@pobox.com
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 22 ++
1 file changed, 22 insertions(+)
diff --git a/builtin/pull.c b/builtin/pull.c
index a2dd0ba..a2c900e 100644
--- a/builtin/pull.c
+++ b/builtin/pull.c
@@ -169,6 +169,25
Tweak the error messages printed by die_no_merge_candidates() to take
into account that we may be rebasing against rather than merging
with.
Signed-off-by: Paul Tan pyoka...@gmail.com
---
builtin/pull.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/builtin
of the
merge head and the current branch.
This is re-implemented in run_rebase() where fork_point is not used if
it is the merge base returned by get_octopus_merge_base().
Helped-by: Stefan Beller sbel...@google.com
Helped-by: Johannes Schindelin johannes.schinde...@gmx.de
Signed-off-by: Paul Tan pyoka
301 - 400 of 600 matches
Mail list logo