[PATCH/WIP v3 09/31] am: commit applied patch

2015-06-18 Thread Paul Tan
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

[PATCH/WIP v3 08/31] am: apply patch with git-apply

2015-06-18 Thread Paul Tan
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

[PATCH/WIP v3 02/31] wrapper: implement xfopen()

2015-06-18 Thread Paul Tan
A common usage pattern of fopen() is to check if it succeeded, and die() if it failed: FILE *fp = fopen(path, w); if (!fp) die_errno(_(could not open '%s' for writing), path); Implement a wrapper function xfopen() for the above, so that we can save a few lines of

[PATCH/WIP v3 03/31] am: implement skeletal builtin am

2015-06-18 Thread Paul Tan
For the purpose of rewriting git-am.sh into a C builtin, implement a skeletal builtin/am.c that redirects to $GIT_EXEC_PATH/git-am if the environment variable _GIT_USE_BUILTIN_AM is not defined. Since in the Makefile git-am.sh takes precedence over builtin/am.c, $GIT_EXEC_PATH/git-am will contain

[PATCH/WIP v3 01/31] wrapper: implement xopen()

2015-06-18 Thread Paul Tan
A common usage pattern of open() is to check if it was successful, and die() if it was not: int fd = open(path, O_WRONLY | O_CREAT, 0777); if (fd 0) die_errno(_(Could not open '%s' for writing.), path); Implement a wrapper function xopen() that does the above so

[PATCH/WIP v3 05/31] am: split out mbox/maildir patches with git-mailsplit

2015-06-18 Thread Paul Tan
git-am.sh supports mbox, stgit and mercurial patches. Re-implement support for splitting out mbox/maildirs using git-mailsplit, while also implementing the framework required to support other patch formats in the future. Re-implement support for the --patch-format option (since a5a6755 (git-am

[PATCH v4 19/19] pull: remove redirection to git-pull.sh

2015-06-18 Thread Paul Tan
At the beginning of the rewrite of git-pull.sh to C, we introduced a redirection to git-pull.sh if the environment variable _GIT_USE_BUILTIN_PULL was not defined in order to not break test scripts that relied on a functional git-pull. Now that all of git-pull's functionality has been

[PATCH v4 14/19] pull: set reflog message

2015-06-18 Thread Paul Tan
f947413 (Use GIT_REFLOG_ACTION environment variable instead., 2006-12-28) established git-pull's method for setting the reflog message, which is to set the environment variable GIT_REFLOG_ACTION to the evaluation of pull${1+ $*} if it has not already been set. Re-implement this behavior.

[PATCH v4 17/19] pull --rebase: exit early when the working directory is dirty

2015-06-18 Thread Paul Tan
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

[PATCH/WIP v3 31/31] am: implement -S/--gpg-sign, commit.gpgsign

2015-06-18 Thread Paul Tan
Since 3b4e395 (am: add the --gpg-sign option, 2014-02-01), git-am.sh supported the --gpg-sign option, and would pass it to git-commit-tree, thus GPG-signing the commit object. Re-implement this option in builtin/am.c. git-commit-tree would also sign the commit by default if the commit.gpgsign

[PATCH/WIP v3 18/31] am: implement am --signoff

2015-06-18 Thread Paul Tan
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 ---

Re: Git completion not using ls-remote to auto-complete during push

2015-06-18 Thread SZEDER Gábor
Quoting Robert Dailey rcdailey.li...@gmail.com I do the following: $ git push origin :topic If I stop halfway through typing 'topic' and hit TAB, auto-completion does not work if I do not have a local branch by that name (sometimes I delete my local branch first, then I push to delete it

Re: Using clean/smudge filters with difftool

2015-06-18 Thread Florian Aspart
2015-06-18 15:26 GMT+02:00 John Keeping j...@keeping.me.uk: [Please don't top-post on this list.] On Thu, Jun 18, 2015 at 03:15:38PM +0200, Florian Aspart wrote: 2015-06-18 14:31 GMT+02:00 Michael J Gruber g...@drmicha.warpmail.net: Florian Aspart venit, vidit, dixit 16.06.2015 16:11: Hi

RE: co-authoring commits

2015-06-18 Thread Jason Pyeron
-Original Message- From: Theodore Ts'o Sent: Wednesday, June 17, 2015 6:52 PM On Wed, Jun 17, 2015 at 10:26:32PM +0200, Tuncer Ayaz wrote: By allowing multiple authors, you don't have to decide who's the primary author, as in such situations usually there is no primary at

Re: Using clean/smudge filters with difftool

2015-06-18 Thread Michael J Gruber
Florian Aspart venit, vidit, dixit 16.06.2015 16:11: Hi everyone, I created a clean filter to apply on some files before commiting them. The filter works correctly when I commit the file and is also applied when I usethe iff command line tool. However, when using difftool with meld, the

Re: Using clean/smudge filters with difftool

2015-06-18 Thread Florian Aspart
Hi Michael, yes in this case difftool compares an uncleaned working tree file with a cleaned blob. I did not try the smudge filter to see if it applied in difftool. I think the problem comes from the way difftool is feeded, since I also had this problem when setting an external tool for the diff

Re: Visualizing merge conflicts after the fact (using kdiff3)

2015-06-18 Thread Michael J Gruber
Johannes Schindelin venit, vidit, dixit 16.06.2015 11:43: Hi Eric, On 2015-06-16 03:17, Eric Raible wrote: I'm running 1.9.5.msysgit.1, but this is a general git question... Upon returning from a vacation, I was looking at what people had been up to, and discovered on merge in which a

Re: [PATCH 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-18 Thread Johannes Schindelin
Hi Junio, On 2015-06-17 19:33, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: +test_expect_failure 'rebase --continue removes CHERRY_PICK_HEAD' ' +git checkout -b commit-to-skip +for double in X 3 1 +do +seq 5 | sed s/$double// seq

[PATCH/WIP v3 07/31] am: extract patch, message and authorship with git-mailinfo

2015-06-18 Thread Paul Tan
For the purpose of applying the patch and committing the results, implement extracting the patch data, commit message and authorship from an e-mail message using git-mailinfo. git-mailinfo is run as a separate process, but ideally in the future, we should be be able to access its functionality

[PATCH/WIP v3 00/31] Make git-am a builtin

2015-06-18 Thread Paul Tan
This patch series depends on pt/pull-builtin for OPT_PASSTHRU_ARGV() and argv_array_pushv(). This is a re-roll of [WIP v3]. Thanks Junio and Stefan for the reviews last round. The biggest addition this round would be the support for git-rebase. Here's a small unscientific benchmark that rebases

[PATCH/WIP v3 06/31] am: detect mbox patches

2015-06-18 Thread Paul Tan
Since 15ced75 (git-am foreign patch support: autodetect some patch formats, 2009-05-27), git-am.sh is able to autodetect mbox, stgit and mercurial patches through heuristics. Re-implement support for autodetecting mbox/maildir files. Helped-by: Eric Sunshine sunsh...@sunshineco.com

[PATCH/WIP v3 04/31] am: implement patch queue mechanism

2015-06-18 Thread Paul Tan
git-am applies a series of patches. If the process terminates abnormally, we want to be able to resume applying the series of patches. This requires the session state to be saved in a persistent location. Implement the mechanism of a patch queue, represented by 2 integers -- the index of the

Re: Visualizing merge conflicts after the fact (using kdiff3)

2015-06-18 Thread Johannes Schindelin
Hi Micha, On 2015-06-18 14:26, Michael J Gruber wrote: Johannes Schindelin venit, vidit, dixit 16.06.2015 11:43: To list all the merge commits in the current branch, I would use the command-line: ```bash git rev-list --author=My Colleague --parents HEAD | sed -n 's/ .* .*//p' ```

[PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Alexander Kuleshov
We can pass -o/--output-directory to the format-patch command to store patches not in the working directory. This patch introduces format.outputDirectory configuration option for same purpose. The case of usage of this configuration option can be convinience to not pass everytime

[PATCH/WIP v3 28/31] am: pass git-apply's options to git-apply

2015-06-18 Thread Paul Tan
git-am.sh recognizes some of git-apply's options, and would pass them to git-apply: * --whitespace, since 8c31cb8 (git-am: --whitespace=x option., 2006-02-28) * -C, since 67dad68 (add -C[NUM] to git-am, 2007-02-08) * -p, since 2092a1f (Teach git-am to pass -p option down to git-apply,

[PATCH/WIP v3 30/31] am: implement --committer-date-is-author-date

2015-06-18 Thread Paul Tan
Since 3f01ad6 (am: Add --committer-date-is-author-date option, 2009-01-22), git-am.sh implemented the --committer-date-is-author-date option, which tells git-am to use the timestamp recorded in the email message as both author and committer date. Re-implement this option in builtin/am.c.

[PATCH/WIP v3 19/31] cache-tree: introduce write_index_as_tree()

2015-06-18 Thread Paul Tan
A caller may wish to write a temporary index as a tree. However, write_cache_as_tree() assumes that the index was read from, and will write to, the default index file path. Introduce write_index_as_tree() which removes this limitation by allowing the caller to specify its own index_state and index

[PATCH/WIP v3 20/31] am: implement 3-way merge

2015-06-18 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the --3way option, and if set, would attempt to do a 3-way merge if the initial patch application fails. Since 5d86861 (am -3: list the paths that needed 3-way fallback, 2012-03-28), in a 3-way merge git-am.sh

[PATCH/WIP v3 27/31] am: implement --[no-]scissors

2015-06-18 Thread Paul Tan
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, but

[PATCH/WIP v3 14/31] am: implement --abort

2015-06-18 Thread Paul Tan
Since 3e5057a (git am --abort, 2008-07-16), git-am supported the --abort option that will rewind HEAD back to the original commit. Re-implement this feature through am_abort(). Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), to prevent commits made

[PATCH/WIP v3 15/31] am: don't accept patches when there's a session in progress

2015-06-18 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am would error out if the user gave it mbox(s) on the command-line, but there was a session in progress. Since c95b138 (Fix git-am safety checks, 2006-09-15), git-am would detect if the user attempted to feed it a mbox via stdin,

[PATCH/WIP v3 21/31] am: --rebasing

2015-06-18 Thread Paul Tan
Since 3041c32 (am: --rebasing, 2008-03-04), git-am.sh supported the --rebasing option, which is used internally by git-rebase to tell git-am that it is being used for its purpose. It would create the empty file $state_dir/rebasing to help completion scripts tell if the ongoing operation is am or

[PATCH/WIP v3 10/31] am: refresh the index at start

2015-06-18 Thread Paul Tan
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 the index at start and --resolved, 2011-08-15), git-am will refresh the index before applying patches. Re-implement

[PATCH/WIP v3 26/31] am: support --keep-cr, am.keepcr

2015-06-18 Thread Paul Tan
Since ad2c928 (git-am: Add command line parameter `--keep-cr` passing it to git-mailsplit, 2010-02-27), git-am.sh supported the --keep-cr option and would pass it to git-mailsplit. Since e80d4cb (git-am: Add am.keepcr and --no-keep-cr to override it, 2010-02-27), git-am.sh supported the am.keepcr

[PATCH/WIP v3 24/31] am: implement -k/--keep, --keep-non-patch

2015-06-18 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the -k/--keep option to pass the -k option to git-mailsplit. Since f7e5ea1 (am: learn passing -b to mailinfo, 2012-01-16), git-am.sh supported the --keep-non-patch option to pass the -b option to git-mailsplit.

[PATCH/WIP v3 16/31] am: implement quiet option

2015-06-18 Thread Paul Tan
Since 0e987a1 (am, rebase: teach quiet option, 2009-06-16), git-am supported the --quiet option and GIT_QUIET environment variable, and when told to be quiet, would only speak on failure. Re-implement this by introducing the say() function, which works like fprintf_ln(), but would only write to

[PATCH/WIP v3 12/31] am: implement --resolved/--continue

2015-06-18 Thread Paul Tan
Since 0c15cc9 (git-am: --resolved., 2005-11-16), git-am supported resuming from a failed patch application. The user will manually apply the patch, and the run git am --resolved which will then commit the resulting index. Re-implement this feature by introducing am_resolve(). Since it makes no

[PATCH/WIP v3 22/31] am: don't use git-mailinfo if --rebasing

2015-06-18 Thread Paul Tan
Since 5e835ca (rebase: do not munge commit log message, 2008-04-16), git am --rebasing no longer gets the commit log message from the patch, but reads it directly from the commit identified by the From header line. Since 43c2325 (am: use get_author_ident_from_commit instead of mailinfo when

[PATCH/WIP v3 29/31] am: implement --ignore-date

2015-06-18 Thread Paul Tan
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 ---

[PATCH/WIP v3 25/31] am: implement --[no-]message-id, am.messageid

2015-06-18 Thread Paul Tan
Since a078f73 (git-am: add --message-id/--no-message-id, 2014-11-25), git-am.sh supported the --[no-]message-id options, and the am.messageid setting which specifies the default option. --[no-]message-id tells git-am whether or not the -m option should be passed to git-mailinfo. Re-implement

[PATCH/WIP v3 13/31] am: implement --skip

2015-06-18 Thread Paul Tan
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

[PATCH/WIP v3 11/31] am: refuse to apply patches if index is dirty

2015-06-18 Thread Paul Tan
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

[PATCH/WIP v3 23/31] am: handle stray state directory

2015-06-18 Thread Paul Tan
Should git-am terminate unexpectedly between the point where the state directory is created, but the next and last files are not written yet, a stray state directory will be left behind. As such, since b141f3c (am: handle stray $dotest directory, 2013-06-15), git-am.sh explicitly recognizes such

[PATCH/WIP v3 17/31] am: exit with user friendly message on patch failure

2015-06-18 Thread Paul Tan
Since ced9456 (Give the user a hint for how to continue in the case that git-am fails because it requires user intervention, 2006-05-02), git-am prints additional information on how the user can re-invoke git-am to resume patch application after resolving the failure. Re-implement this through the

Re: [PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-18 Thread Matthieu Moy
Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: I've some more tests, maybe I should put them all in this post ? Yes, please post as much as you have. Ideally, this should be automatically tested, but if you don't have time to write the automated tests, at least having a track of

[PATCH v2 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-18 Thread Johannes Schindelin
When rev-list's --cherry option does not detect that a patch has already been applied upstream, an interactive rebase would offer to reapply it and consequently stop at that patch with a failure, mentioning that the diff is empty. Traditionally, a `git rebase --continue` simply skips the commit

[PATCH v2 0/2] rebase -i: Fix left-behind CHERRY_PICK_HEAD

2015-06-18 Thread Johannes Schindelin
These patches fix a bug that bites me often enough when rebasing Git for Windows. The symptom is that .git/CHERRY_PICK_HEAD is left behind after skipping an already-merged patch with `git rebase --continue` instead of `git rebase --skip`. I always prefer the former invocation because the latter

[PATCH v2 2/2] rebase -i: do not leave a CHERRY_PICK_HEAD file behind

2015-06-18 Thread Johannes Schindelin
When skipping commits whose changes were already applied via `git rebase --continue`, we need to clean up said file explicitly. The same is not true for `git rebase --skip` because that will execute `git reset --hard` as part of the skip handling in git-rebase.sh, even before

Re: Using clean/smudge filters with difftool

2015-06-18 Thread John Keeping
[Please don't top-post on this list.] On Thu, Jun 18, 2015 at 03:15:38PM +0200, Florian Aspart wrote: 2015-06-18 14:31 GMT+02:00 Michael J Gruber g...@drmicha.warpmail.net: Florian Aspart venit, vidit, dixit 16.06.2015 16:11: Hi everyone, I created a clean filter to apply on some files

[PATCH v4 15/19] pull: teach git pull about --rebase

2015-06-18 Thread Paul Tan
Since cd67e4d (Teach 'git pull' about --rebase, 2007-11-28), if the --rebase option is set, git-rebase is run instead of git-merge. Re-implement this by introducing run_rebase(), which is called instead of run_merge() if opt_rebase is a true value. Since c85c792 (pull --rebase: be cleverer with

[PATCH v4 18/19] pull --rebase: error on no merge candidate cases

2015-06-18 Thread Paul Tan
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

[PATCH v4 16/19] pull: configure --rebase via branch.name.rebase or pull.rebase

2015-06-18 Thread Paul Tan
Since cd67e4d (Teach 'git pull' about --rebase, 2007-11-28), fetch+rebase could be set by default by defining the config variable branch.name.rebase. This setting can be overriden on the command line by --rebase and --no-rebase. Since 6b37dff (pull: introduce a pull.rebase option to enable

[PATCH v4 11/19] pull: check if in unresolved merge state

2015-06-18 Thread Paul Tan
Since d38a30d (Be more user-friendly when refusing to do something because of conflict., 2010-01-12), git-pull will error out with user-friendly advices if the user is in the middle of a merge or has unmerged files. Re-implement this behavior. While the has unmerged files case can be handled by

Re: Using clean/smudge filters with difftool

2015-06-18 Thread Florian Aspart
2015-06-18 16:11 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 03:51:25PM +0200, Florian Aspart wrote: 2015-06-18 15:26 GMT+02:00 John Keeping j...@keeping.me.uk: [Please don't top-post on this list.] On Thu, Jun 18, 2015 at 03:15:38PM +0200, Florian Aspart wrote:

Re: Using clean/smudge filters with difftool

2015-06-18 Thread Florian Aspart
2015-06-18 16:28 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 04:17:52PM +0200, Florian Aspart wrote: 2015-06-18 16:11 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 03:51:25PM +0200, Florian Aspart wrote: 2015-06-18 15:26 GMT+02:00 John Keeping

Re: Git completion not using ls-remote to auto-complete during push

2015-06-18 Thread Robert Dailey
On Thu, Jun 18, 2015 at 6:29 AM, SZEDER Gábor sze...@ira.uka.de wrote: Quoting Robert Dailey rcdailey.li...@gmail.com I do the following: $ git push origin :topic If I stop halfway through typing 'topic' and hit TAB, auto-completion does not work if I do not have a local branch by that name

Bug report: `git revert` on empty commit fails silently

2015-06-18 Thread Alistair Lynn
Hello gitters Steps to reproduce: $ git commit --allow-empty -m ‘test’ $ git revert HEAD The latter fails silently, leaving HEAD pointing at the commit created by the first command. A subsequent `git commit --allow-empty` has the revert message as the default commit message when starting the

Re: [PATCH] mergetools: add config option to disable auto-merge

2015-06-18 Thread Mike Rappazzo
On Thu, Jun 18, 2015 at 4:43 AM David Aguilar dav...@gmail.com wrote: On Wed, Jun 17, 2015 at 10:27:58PM -0400, Mike Rappazzo wrote: I feel that the auto-merge takes away the context of the changes. I use araxis merge as my mergetool of choice. I almost always immediately undo the

Re: Using clean/smudge filters with difftool

2015-06-18 Thread John Keeping
On Thu, Jun 18, 2015 at 04:17:52PM +0200, Florian Aspart wrote: 2015-06-18 16:11 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 03:51:25PM +0200, Florian Aspart wrote: 2015-06-18 15:26 GMT+02:00 John Keeping j...@keeping.me.uk: [Please don't top-post on this list.]

Re: Using clean/smudge filters with difftool

2015-06-18 Thread John Keeping
On Thu, Jun 18, 2015 at 03:51:25PM +0200, Florian Aspart wrote: 2015-06-18 15:26 GMT+02:00 John Keeping j...@keeping.me.uk: [Please don't top-post on this list.] On Thu, Jun 18, 2015 at 03:15:38PM +0200, Florian Aspart wrote: 2015-06-18 14:31 GMT+02:00 Michael J Gruber

Re: [PATCH 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-18 Thread Johannes Schindelin
Hi Junio, On 2015-06-18 18:00, Junio C Hamano wrote: Johannes Schindelin johannes.schinde...@gmx.de writes: + git diff seq-onto I am puzzled with this diff; what is this about? Is it a remnant from an earlier debugging session, or is it making sure seq-onto is a valid tree-ish? The

Re: Visualizing merge conflicts after the fact (using kdiff3)

2015-06-18 Thread Junio C Hamano
Michael J Gruber g...@drmicha.warpmail.net writes: This type of request comes up often (for a reason). I'm wondering whether we could support it more systematically, either by exposing the steps above as a command, or by storing the unresolved merge somewhere (leveraging stash or rerere).

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Patrick Palka
On Thu, Jun 18, 2015 at 11:50 AM, Junio C Hamano gits...@pobox.com wrote: Patrick Palka patr...@parcs.ath.cx writes: Currently the diff-highlight script does not try to highlight hunks that have different numbers of removed/added lines. But we can be a little smarter than that, without

[PATCH v3 0/2] rebase -i: Fix left-behind CHERRY_PICK_HEAD

2015-06-18 Thread Johannes Schindelin
These patches fix a bug that bites me often enough when rebasing Git for Windows. The symptom is that .git/CHERRY_PICK_HEAD is left behind after skipping an already-merged patch with `git rebase --continue` instead of `git rebase --skip`. I always prefer the former invocation because the latter

[PATCH v3 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-18 Thread Johannes Schindelin
When rev-list's --cherry option does not detect that a patch has already been applied upstream, an interactive rebase would offer to reapply it and consequently stop at that patch with a failure, mentioning that the diff is empty. Traditionally, a `git rebase --continue` simply skips the commit

[PATCH v3 2/2] rebase -i: do not leave a CHERRY_PICK_HEAD file behind

2015-06-18 Thread Johannes Schindelin
When skipping commits whose changes were already applied via `git rebase --continue`, we need to clean up said file explicitly. The same is not true for `git rebase --skip` because that will execute `git reset --hard` as part of the skip handling in git-rebase.sh, even before

Re: Using clean/smudge filters with difftool

2015-06-18 Thread John Keeping
On Thu, Jun 18, 2015 at 05:39:18PM +0200, Florian Aspart wrote: 2015-06-18 16:28 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 04:17:52PM +0200, Florian Aspart wrote: 2015-06-18 16:11 GMT+02:00 John Keeping j...@keeping.me.uk: On Thu, Jun 18, 2015 at 03:51:25PM +0200,

Re: Git completion not using ls-remote to auto-complete during push

2015-06-18 Thread SZEDER Gábor
Quoting Robert Dailey rcdailey.li...@gmail.com: On Thu, Jun 18, 2015 at 6:29 AM, SZEDER Gábor sze...@ira.uka.de wrote: Quoting Robert Dailey rcdailey.li...@gmail.com I do the following: $ git push origin :topic If I stop halfway through typing 'topic' and hit TAB, auto-completion does not

Re: [PATCH 1/2] t3404: demonstrate CHERRY_PICK_HEAD bug

2015-06-18 Thread Junio C Hamano
Johannes Schindelin johannes.schinde...@gmx.de writes: + git diff seq-onto I am puzzled with this diff; what is this about? Is it a remnant from an earlier debugging session, or is it making sure seq-onto is a valid tree-ish? The idea is to verify that we end up with the same tree

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Junio C Hamano
Alexander Kuleshov kuleshovm...@gmail.com writes: diff --git a/Documentation/config.txt b/Documentation/config.txt index fd2036c..8f6f7ed 100644 --- a/Documentation/config.txt +++ b/Documentation/config.txt @@ -1247,6 +1247,10 @@ format.coverLetter:: format-patch is invoked, but in

Re: [PATCH] request-pull: short sha handling, manual update

2015-06-18 Thread Petr Stodulka
Hi folks, can you someone look at it? Or were these troubles mentioned somewhere earlier and I miss that? On 2.6.2015 16:14, Petr Stodulka wrote: request-pull prints incorrectly warn messages about not found commits and man pages don't say anything about todays changed behaviour. People are

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Junio C Hamano
Patrick Palka patr...@parcs.ath.cx writes: Currently the diff-highlight script does not try to highlight hunks that have different numbers of removed/added lines. But we can be a little smarter than that, without introducing much magic and complexity. In the case of unevenly-sized hunks, we

Re: [PATCH] strbuf: stop out-of-boundary warnings from Coverity

2015-06-18 Thread Junio C Hamano
Duy Nguyen pclo...@gmail.com writes: The last resort is simply filter out a whole class of warnings. Probably good enough if both patches look equally ugly. -- 8 -- Subject: [PATCH] strbuf: kill strbuf_slopbuf, in favor of A lot of out-of-bound access warnings on scan.coverity.com is

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 05:23:56PM -0400, Jeff King wrote: +# Return the individual diff-able items of the hunk, but with any +# diff or color prefix/suffix for each line split out (we assume that the +# prefix/suffix for each line will be the same). +sub split_hunk { + my ($prefix,

Re: Bug report: `git revert` on empty commit fails silently

2015-06-18 Thread Junio C Hamano
Alistair Lynn alist...@othernation.com writes: $ git commit --allow-empty -m ‘test’ $ git revert HEAD The latter fails silently, leaving HEAD pointing at the commit created by the first command. I do not necessarily think it is a bug to ignore reverting a no-op. revert a no-op should

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 09:49:19PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: ... I think you could also argue that because of whitespace-highlighting, colorized diffs are fundamentally going to have colors intermingled with the content and should not be parsed this

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Junio C Hamano
Jeff King p...@peff.net writes: ... I think you could also argue that because of whitespace-highlighting, colorized diffs are fundamentally going to have colors intermingled with the content and should not be parsed this way. Painting of whitespace breakages is asymmetric [*1*]. If you

Re: co-authoring commits

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 11:25:44PM +0200, Jakub Narębski wrote: Author and committer include datetime in the contents of the field, which is used by Git for heuristics limiting walk. Coauthor would have the same date as author, isn't it? If, after long and involved discussion, we didn't add

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 02:46:36PM -0700, Junio C Hamano wrote: If I were designing from scratch, I would consider making -o - output to stdout, and letting it override a previous -o (or vice versa). We could still do that (and make --stdout an alias for that), but I don't know if it is

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Junio C Hamano
Patrick Palka patr...@parcs.ath.cx writes: I have this nagging feeling that it is just as likely that two uneven hunks align at the top as they align at the bottom, so while this might not hurt it may not be the right approach for a better solution, in the sense that when somebody really

Re: [PATCH/RFC v4 07/10] send-email: reduce dependancies impact on parse_address_line

2015-06-18 Thread Matthieu Moy
Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr writes: I've some more tests, maybe I should put them all in this post ? Yes, please post as much as you have. Ideally, this should be automatically tested, but if you don't

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 11:08:16AM -0700, Junio C Hamano wrote: So as I said, I do not think it would hurt to have this as an incremental improvement (albeit going in a possibly wrong direction). Of course, it is a separate question if this change makes the output worse, by comparing

Re: Git completion not using ls-remote to auto-complete during push

2015-06-18 Thread Robert Dailey
On Thu, Jun 18, 2015 at 10:55 AM, SZEDER Gábor sze...@ira.uka.de wrote: Quoting Robert Dailey rcdailey.li...@gmail.com: On Thu, Jun 18, 2015 at 6:29 AM, SZEDER Gábor sze...@ira.uka.de wrote: Quoting Robert Dailey rcdailey.li...@gmail.com I do the following: $ git push origin :topic If

Re: [PATCH/WIP v3 04/31] am: implement patch queue mechanism

2015-06-18 Thread Stefan Beller
On Thu, Jun 18, 2015 at 4:25 AM, Paul Tan pyoka...@gmail.com wrote: +/** + * Reads the contents of `file`. The third argument can be used to give a hint I would avoid `third` here. (I needed to count twice to be sure which argument you were referring to, as I was confused.) Also how do you

Re: [PATCH] Improve contrib/diff-highlight to highlight unevenly-sized hunks

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 12:28:58PM -0400, Patrick Palka wrote: By the way, what would it take to get something like this script into git proper? It is IMHO immensely useful even in its current form, yet because it's not baked into the application hardly anybody knows about it. I think if we

[PATCH v5 05/19] fsck (receive-pack): Allow demoting errors to warnings

2015-06-18 Thread Johannes Schindelin
For example, missing emails in commit and tag objects can be demoted to mere warnings with git config receive.fsck.missingemail=warn The value is actually a comma-separated list. In case that the same key is listed in multiple receive.fsck.msg-id lines in the config, the latter

[PATCH v5 07/19] fsck: Make fsck_ident() warn-friendly

2015-06-18 Thread Johannes Schindelin
When fsck_ident() identifies a problem with the ident, it should still advance the pointer to the next line so that fsck can continue in the case of a mere warning. Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- fsck.c | 49 +++-- 1

[PATCH v5 04/19] fsck: Offer a function to demote fsck errors to warnings

2015-06-18 Thread Johannes Schindelin
There are legacy repositories out there whose older commits and tags have issues that prevent pushing them when 'receive.fsckObjects' is set. One real-life example is a commit object that has been hand-crafted to list two authors. Often, it is not possible to fix those issues without disrupting

[PATCH v5 06/19] fsck: Report the ID of the error/warning

2015-06-18 Thread Johannes Schindelin
Some legacy code has objects with non-fatal fsck issues; To enable the user to ignore those issues, let's print out the ID (e.g. when encountering missingemail, the user might want to call `git config --add receive.fsck.missingemail=warn`). Signed-off-by: Johannes Schindelin

[PATCH v5 15/19] fsck: Document the new receive.fsck.msg-id options

2015-06-18 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin johannes.schinde...@gmx.de --- Documentation/config.txt | 14 ++ 1 file changed, 14 insertions(+) diff --git a/Documentation/config.txt b/Documentation/config.txt index 3e37b93..306ab7a 100644 --- a/Documentation/config.txt +++

[PATCH v5 14/19] fsck: Allow upgrading fsck warnings to errors

2015-06-18 Thread Johannes Schindelin
The 'invalid tag name' and 'missing tagger entry' warnings can now be upgraded to errors by specifying `invalidtagname` and `missingtaggerentry` in the receive.fsck.msg-id config setting. Incidentally, the missing tagger warning is now really shown as a warning (as opposed to being reported with

[PATCH v5 19/19] fsck: support ignoring objects in `git fsck` via fsck.skiplist

2015-06-18 Thread Johannes Schindelin
Identical to support in `git receive-pack for the config option `receive.fsck.skiplist`, we now support ignoring given objects in `git fsck` via `fsck.skiplist` altogether. This is extremely handy in case of legacy repositories where it would cause more pain to change incorrect objects than to

[PATCH v5 18/19] fsck: git receive-pack: support excluding objects from fsck'ing

2015-06-18 Thread Johannes Schindelin
The optional new config option `receive.fsck.skiplist` specifies the path to a file listing the names, i.e. SHA-1s, one per line, of objects that are to be ignored by `git receive-pack` when `receive.fsckObjects = true`. This is extremely handy in case of legacy repositories where it would cause

[PATCH v5 16/19] fsck: Support demoting errors to warnings

2015-06-18 Thread Johannes Schindelin
We already have support in `git receive-pack` to deal with some legacy repositories which have non-fatal issues. Let's make `git fsck` itself useful with such repositories, too, by allowing users to ignore known issues, or at least demote those issues to mere warnings. Example: `git -c

[PATCH v5 17/19] fsck: Introduce `git fsck --quick`

2015-06-18 Thread Johannes Schindelin
This option avoids unpacking each and all objects, and just verifies the connectivity. In particular with large repositories, this speeds up the operation, at the expense of missing corrupt blobs and ignoring unreachable objects, if any. Signed-off-by: Johannes Schindelin

Re: [PATCH v3 0/2] rebase -i: Fix left-behind CHERRY_PICK_HEAD

2015-06-18 Thread Johannes Schindelin
On 2015-06-18 21:45, Junio C Hamano wrote: This round looks good, except one trivial nit (below), which I'll locally squash-in a fix for. Thanks, Dscho -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v3 0/2] rebase -i: Fix left-behind CHERRY_PICK_HEAD

2015-06-18 Thread Junio C Hamano
Thanks. This round looks good, except one trivial nit (below), which I'll locally squash-in a fix for. diff --git a/t/t3404-rebase-interactive.sh b/t/t3404-rebase-interactive.sh index fb1b571..6938e5e 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -1052,7

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Jeff King
On Thu, Jun 18, 2015 at 10:13:37AM -0700, Junio C Hamano wrote: -static const char *set_outdir(const char *prefix, const char *output_directory) +static const char *set_outdir(const char *prefix, const char *output_directory, + const char

Re: [PATCH] format-patch: introduce format.outputDirectory configuration

2015-06-18 Thread Junio C Hamano
Junio C Hamano gits...@pobox.com writes: Jeff King p...@peff.net writes: This change looks ugly and unnecessary. All the machinery after and including the point set_outdir() is called, including reopen_stdout(), work on output_directory variable and only that variable. Wouldn't it work

Re: [PATCH v4 00/19] Make git-pull a builtin

2015-06-18 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: This is a re-roll of [v3]. It squashes in Ramsay's patch fix some sparse warnings, and fixes the use-before-free reported by Duy. Thanks a lot for dealing with my mess :-). Other than that, there are no other changes as I'm working on the git-am side of

  1   2   >