Re: Git tag: pre-receive hook issue

2015-07-19 Thread Jacob Keller
On Sun, Jul 19, 2015 at 12:55 AM, Gaurav Chhabra varuag.chha...@gmail.com wrote: @Junio: So from your detailed explanation (and Jake's comment), i understand that since my ref wasn't updated on remote so querying the same using git describe resulted in failure, and hence, code was not entering

Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Schindelin
Hi, On 2015-07-19 08:54, Johannes Sixt wrote: Am 18.07.2015 um 17:21 schrieb Ben Walton: test_expect_success clone ssh://$tuah/home/user/repo test_clone_url ssh://$tuah/home/user/repo $ehost /home/user/repo diff --git a/t/t9500-gitweb-standalone-no-errors.sh

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Gaurav Chhabra
@Junio: So from your detailed explanation (and Jake's comment), i understand that since my ref wasn't updated on remote so querying the same using git describe resulted in failure, and hence, code was not entering the IF block. Correct? Also, while i was reading your replies, i was just thinking

Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Sixt
Am 19.07.2015 um 09:37 schrieb Johannes Schindelin: On 2015-07-19 08:54, Johannes Sixt wrote: Am 18.07.2015 um 17:21 schrieb Ben Walton: - sed -e s/CHANGE_ME/change_me/ file file+ - mv -f file+ file + perl -pi -e s/CHANGE_ME/change_me/ file This is problematic. On

Re: [PATCH 2/2] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Sixt
Am 18.07.2015 um 17:21 schrieb Ben Walton: The space following the last / in a sed command caused Solaris' xpg4/sed to fail, claiming the program was garbled and exit with status 2: % echo 'foo' | /usr/xpg4/bin/sed -e 's/foo/bar/ ' sed: command garbled: s/foo/bar/ % echo $? 2 Fix this by

Re: [PATCH] userdiff: add support for Fountain documents

2015-07-19 Thread Zoë Blade
On 17 Jul 2015, at 23:43, Junio C Hamano gits...@pobox.com wrote: * Although uppercase is recommended for Scene Headings to increase readability, it is not required. * A line beginning with any of the following, followed by either a dot or a space, is considered a Scene Heading (unless

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Gaurav Chhabra
The only thing we wanted to check was whether a ref is a tag. :) Rest other things are working fine (except for the commits=$new_sha1 thing which Junio already pointed out and corrected). I will correct the pre-receive hook. The only mystery that remains is about the current nonsensical code

[PATCH 1/2] bash prompt: test untracked files status indicator with untracked dirs

2015-07-19 Thread SZEDER Gábor
The next commit will tweak the way __git_ps1() decides whether to display the untracked files status indicator in the presence of untracked directories. Add tests to make sure it doesn't change current behavior, in particular that an empty untracked directory doesn't trigger the untracked files

[PATCH 2/2] bash prompt: faster untracked status indicator with untracked directories

2015-07-19 Thread SZEDER Gábor
If the untracked status indicator is enabled, __git_ps1() looks for untracked files by running 'git ls-files'. This can be perceptibly slow in case of an untracked directory containing lot of files, because it lists all files found in the untracked directory only to be redirected into /dev/null

[PATCH] userdiff: add support for Fountain documents

2015-07-19 Thread Zoë Blade
Add support for Fountain, a plain text screenplay format. Git facilitates not just programming specifically, but creative writing in general, so it makes sense to also support other plain text documents besides source code. In the structure of a screenplay specifically, scenes are roughly

[PATCH v6 21/45] builtin-am: implement --rebasing mode

2015-07-19 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 v6 13/45] builtin-am: implement --skip

2015-07-19 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(). Helped-by: Stefan Beller sbel...@google.com Signed-off-by: Paul Tan pyoka...@gmail.com ---

[PATCH v6 12/45] builtin-am: don't parse mail when resuming

2015-07-19 Thread Paul Tan
Since 271440e (git-am: make it easier after fixing up an unapplicable patch., 2005-10-25), when git am is run again after being paused, the current mail message will not be re-parsed, but instead the contents of the state directory's patch, msg and author-script files will be used as-is instead.

[PATCH v6 10/45] builtin-am: refuse to apply patches if index is dirty

2015-07-19 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 in builtin/am.c. Signed-off-by: Paul Tan pyoka...@gmail.com --- builtin/am.c | 45 + 1 file changed,

[PATCH v6 20/45] builtin-am: implement --3way, am.threeWay

2015-07-19 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 d96a275 (git-am: add am.threeWay config variable, 2015-06-04), the setting am.threeWay configures if

[PATCH v6 24/45] builtin-am: implement -u/--utf8

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the -u,--utf8 option. If set, the -u option will be passed to git-mailinfo to re-code the commit log message and authorship in the charset specified by i18n.commitencoding. If unset, the -n option will be passed to

[PATCH v6 17/45] builtin-am: exit with user friendly message on failure

2015-07-19 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

[PATCH v6 11/45] builtin-am: implement --resolved/--continue

2015-07-19 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 v6 22/45] builtin-am: bypass git-mailinfo when --rebasing

2015-07-19 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 v6 08/45] builtin-am: apply patch with git-apply

2015-07-19 Thread Paul Tan
Implement applying the patch to the index using git-apply. 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

[PATCH v6 16/45] builtin-am: implement -q/--quiet

2015-07-19 Thread Paul Tan
Since 0e987a1 (am, rebase: teach quiet option, 2009-06-16), git-am supported the --quiet option, 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 the stream when state-quiet is false.

[PATCH v6 15/45] builtin-am: reject patches when there's a session in progress

2015-07-19 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 v6 18/45] builtin-am: implement -s/--signoff

2015-07-19 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 in parse_mail() by calling append_signoff() if the option is set. Signed-off-by: Paul Tan

[PATCH v6 14/45] builtin-am: implement --abort

2015-07-19 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 through am_abort(). Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), to prevent commits made since

[PATCH v6 28/45] builtin-am: implement --[no-]scissors

2015-07-19 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 in builtin/am.c. Since the default setting of --scissors in git-mailinfo can be configured with

[PATCH v6 29/45] builtin-am: pass git-apply's options to git-apply

2015-07-19 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 v6 30/45] builtin-am: implement --ignore-date

2015-07-19 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 v6 02/45] wrapper: implement xfopen()

2015-07-19 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 2/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Ben Walton
The space following the last / in a sed command caused Solaris' xpg4/sed to fail, claiming the program was garbled and exit with status 2: % echo 'foo' | /usr/xpg4/bin/sed -e 's/foo/bar/ ' sed: command garbled: s/foo/bar/ % echo $? 2 Fix this by simply removing the unnecessary space.

Adapt some tests to work around broken Solaris tools

2015-07-19 Thread Ben Walton
This series is a respin of the previous submission, taking feedback into account. -- 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 http://vger.kernel.org/majordomo-info.html

[PATCH 3/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Ben Walton
In 99094a7a, a trivial breakage was fixed. This exposed a problem with the test when run on Solaris with xpg4/sed that had gone silently undetected since its introduction in e4bd10b2. Solaris' sed executes the requested substitution but prints a warning about the missing newline at the end of the

[PATCH 1/3] Modify tr expressions so that xpg4/tr handles it on Solaris

2015-07-19 Thread Ben Walton
It seems that xpg4/tr mishandles some strings involving [ not followed by a character class: % echo '[::1]' | /usr/xpg4/bin/tr -d '[]' [::1 % echo '[::1]' | /usr/xpg4/bin/tr -d '[' usr/xpg4/bin/tr: Bad string. This was breaking two tests. To fix the issue, use the octal representations of [ and

Re: [PATCH v2 14/16] vcbuild/readme: Improve layout and reference msvc-build script

2015-07-19 Thread Philip Oakley
From: Philip Oakley philipoak...@iee.org Sent: Sunday, July 19, 2015 9:08 PM This 14/16 is the wrong version accidently left over from a previous draft. Please use the other version with the shorter subject line. Sorry for the noise / mistake. Layout the 'either/or' with more white space to

How to use --cc-cmd in git-send-email?

2015-07-19 Thread Philip Oakley
I've been using git-send-email with repeated individual --cc=email address parameters on the command line. I tried putting all the addresses, one per line, into a file 'cc-cmd', so I could use if for the --cc-cmd option. I then tried to use --cc-cmd='cat cc-cmd' to do the send-email (as a

Re: How to use --cc-cmd in git-send-email?

2015-07-19 Thread Eric Sunshine
On Sun, Jul 19, 2015 at 6:02 PM, Philip Oakley philipoak...@iee.org wrote: I've been using git-send-email with repeated individual --cc=email address parameters on the command line. I tried putting all the addresses, one per line, into a file 'cc-cmd', so I could use if for the --cc-cmd

Re: [PATCH 1/3] Modify tr expressions so that xpg4/tr handles it on Solaris

2015-07-19 Thread Eric Sunshine
On Sun, Jul 19, 2015 at 2:00 PM, Ben Walton bdwal...@gmail.com wrote: It seems that xpg4/tr mishandles some strings involving [ not followed by a character class: % echo '[::1]' | /usr/xpg4/bin/tr -d '[]' [::1 % echo '[::1]' | /usr/xpg4/bin/tr -d '[' usr/xpg4/bin/tr: Bad string. This was

Re: [PATCH v3 4/9] ref-filter: add support to sort by version

2015-07-19 Thread Eric Sunshine
On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak karthik@gmail.com wrote: Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'version_cmp()' function as the comparing function for qsort. To agree with the actual code:

Re: [PATCH v3 1/9] ref-filter: add option to align atoms to the left

2015-07-19 Thread Eric Sunshine
On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak karthik@gmail.com wrote: Add a new atom align and support %(align:X) where X is a number. This will align the preceeding atom value to the left followed by spaces for a total length of X characters. If X is less than the item size, the entire

Re: [PATCH v3 3/9] ref-filter: support printing N lines from tag annotation

2015-07-19 Thread Eric Sunshine
On Sat, Jul 18, 2015 at 3:12 PM, Karthik Nayak karthik@gmail.com wrote: In 'tag.c' we can print N lines from the annotation of the tag using the '-nnum' option. Copy code from 'tag.c' to 'ref-filter' and modify 'ref-filter' to support printing of N lines from the annotation of tags.

Re: [msysGit] [PATCH v2 08/16] engine.pl: ignore invalidcontinue.obj which is known to MSVC

2015-07-19 Thread Eric Sunshine
On Sun, Jul 19, 2015 at 4:08 PM, Philip Oakley philipoak...@iee.org wrote: Commit 4b623d8 (MSVC: link in invalidcontinue.obj for better POSIX compatibility, 2014-03-29) is not processed correctly by the buildsystem. Ignore it. What does not processed correctly mean? For a person reading the

Re: Git tag: pre-receive hook issue

2015-07-19 Thread Jacob Keller
To check whether the ref being updated is a tag, you need to check the 3rd parameter. pre-receive receives in the format old-value new-value ref-name so you need to check each line's 3rd value which is the ref-name being updated. If it's in refs/tags then it's a tag update. If it's not, you can

Re: [msysGit] [PATCH v2 10/16] engine.pl: delete the captured stderr file if empty

2015-07-19 Thread Eric Sunshine
On Sun, Jul 19, 2015 at 4:08 PM, Philip Oakley philipoak...@iee.org wrote: Keep the build clean of extraneous files if it is indeed clean. Otherwise leave the msvc-build-makedryerrors.txt file both as a flag for any CI system or for manual debugging. Note that the file will contain the new

[PATCH v6 36/45] builtin-am: invoke pre-applypatch hook

2015-07-19 Thread Paul Tan
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

[PATCH v6 42/45] builtin-am: implement -i/--interactive

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh supported the --interactive mode. After parsing the patch mail and extracting the patch, commit message and authorship info, an interactive session will begin that allows the user to choose between: * applying the patch *

[PATCH v6 37/45] builtin-am: invoke post-applypatch hook

2015-07-19 Thread Paul Tan
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 pyoka...@gmail.com --- builtin/am.c |

[PATCH v6 31/45] builtin-am: implement --committer-date-is-author-date

2015-07-19 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 v6 35/45] builtin-am: invoke applypatch-msg hook

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am.sh will invoke the applypatch-msg hooks just after extracting the patch message. If the applypatch-msg hook exits with a non-zero status, git-am.sh abort before even applying the patch to the index. Re-implement this in

[PATCH v6 23/45] builtin-am: handle stray state directory

2015-07-19 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 v6 43/45] builtin-am: implement legacy -b/--binary option

2015-07-19 Thread Paul Tan
The -b/--binary option was initially implemented in 087b674 (git-am: --binary; document --resume and --binary., 2005-11-16). The option will pass the --binary flag to git-apply to allow it to apply binary patches. However, in 2b6eef9 (Make apply --binary a no-op., 2006-09-06), --binary was been

[PATCH v6 41/45] builtin-am: support and auto-detect mercurial patches

2015-07-19 Thread Paul Tan
Since 0cfd112 (am: preliminary support for hg patches, 2011-08-29), git-am.sh could convert mercurial patches to an RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state directory for application. Since 15ced75 (git-am foreign patch support: autodetect some patch

[PATCH v6 38/45] builtin-am: rerere support

2015-07-19 Thread Paul Tan
git-am.sh will call git-rerere at the following events: * git rerere when a three-way merge fails to record the conflicted automerge results. Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28) * Since cb6020b (Teach --[no-]rerere-autoupdate option to merge, revert and

[PATCH v6 34/45] builtin-am: support automatic notes copying

2015-07-19 Thread Paul Tan
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 pyoka...@gmail.com ---

[PATCH v6 19/45] cache-tree: introduce write_index_as_tree()

2015-07-19 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 v6 33/45] builtin-am: invoke post-rewrite hook

2015-07-19 Thread Paul Tan
Since 96e1948 (rebase: invoke post-rewrite hook, 2010-03-12), git-am.sh will invoke the post-rewrite hook after it successfully finishes applying all the queued patches. To do this, when parsing a mail to extract its patch and metadata, in --rebasing mode git-am.sh will also store the original

[PATCH v6 40/45] builtin-am: support and auto-detect StGit series files

2015-07-19 Thread Paul Tan
Since c574e68 (git-am foreign patch support: StGIT support, 2009-05-27), git-am.sh is able to read a single StGit series file and, for each StGit patch listed in the file, convert the StGit patch into a RFC2822 mail patch suitable for parsing with git-mailinfo, and queue them in the state

[PATCH v6 09/45] builtin-am: implement committing applied patch

2015-07-19 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. Since 29b6754 (am: remove rebase-apply directory before gc, 2010-02-22), git gc --auto is also invoked to pack the loose objects

[PATCH v6 27/45] builtin-am: support --keep-cr, am.keepcr

2015-07-19 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 v6 44/45] builtin-am: check for valid committer ident

2015-07-19 Thread Paul Tan
When commit_tree() is called, if the user does not have an explicit committer ident configured, it will attempt to construct a default committer ident based on the user's and system's info (e.g. gecos field, hostname etc.) However, if a default committer ident is unable to be constructed,

[PATCH v6 45/45] builtin-am: remove redirection to git-am.sh

2015-07-19 Thread Paul Tan
At the beginning of the rewrite of git-am.sh to C, in order to not break existing test scripts that depended on a functional git-am, a redirection to git-am.sh was introduced that would activate if the environment variable _GIT_USE_BUILTIN_AM was not defined. Now that all of git-am.sh's

[PATCH v6 25/45] builtin-am: implement -k/--keep, --keep-non-patch

2015-07-19 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 v6 26/45] builtin-am: implement --[no-]message-id, am.messageid

2015-07-19 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 v6 39/45] builtin-am: support and auto-detect StGit patches

2015-07-19 Thread Paul Tan
Since c574e68 (git-am foreign patch support: StGIT support, 2009-05-27), git-am.sh supported converting StGit patches into RFC2822 mail patches that can be parsed with git-mailinfo. Implement this by introducing two functions in builtin/am.c: stgit_patch_to_mail() and split_mail_conv().

Re: [PATCH v3 9/9] tag.c: implement '--merged' and '--no-merged' options

2015-07-19 Thread Christian Couder
On Sun, Jul 19, 2015 at 12:00 AM, Karthik Nayak karthik@gmail.com wrote: From: Karthik Nayak karthik@gmail.com Using 'ref-filter' APIs implement the '--merged' and '--no-merged' options into 'tag.c'. The '--merged' option lets the user to only list tags merged into the named commit.

[PATCH v2 07/16] engine.pl: Fix i18n -o option in msvc buildsystem generator

2015-07-19 Thread Philip Oakley
The i18n 5e9637c (i18n: add infrastructure for translating Git with gettext, 2011-11-18) introduced an extra '-o' option into the make file. If the msvc buildsystem is run without NO_GETTEXT being set then this broke the engine.pl code for extracting the git.sln for msvc gui-IDE. The setting of

[PATCH v2 12/16] engine.pl: provide more debug print statements

2015-07-19 Thread Philip Oakley
Assist developers transitioning between the two cultures by including appropriate, but commented out, debug statements. The exception is when an unhandled compiler option is detected, where printing of the full line will supplement the line number and option part. Otherwise the OP has no

[PATCH v2 06/16] engine.pl: Properly accept quoted spaces in filenames

2015-07-19 Thread Philip Oakley
The engine.pl script barfs on the properly quoted spaces in filename options prevalent on Windows. Use shellwords() rather than split() to separate such options. Helped-by: Junio C Hamano gits...@pobox.com Signed-off-by: Philip Oakley philipoak...@iee.org --- Junio's help at

[PATCH v2 02/16] .gitignore: improve MSVC ignore patterns

2015-07-19 Thread Philip Oakley
Add the Microsoft .manifest pattern, and correct the generic 'Debug' and 'Release' directory patterns which were mechanically adjusted way back in c591d5f (gitignore: root most patterns at the top-level directory, 2009-10-26) to allow multi-level projects within the Git suite. Signed-off-by:

[PATCH v2 15/16] msvc-build: add complete Microsoft Visual C compilation script

2015-07-19 Thread Philip Oakley
Implement the README to facilitate cross community development. Include comments for those Windows folks not yet fully familiar with bash commands. This is identical to the msysgit script, except for the 'cd toplevel' step, and comments for the edification of converts from Windows. Original

[PATCH v2 14/16] vcbuild/readme: Improve layout and reference msvc-build script

2015-07-19 Thread Philip Oakley
Layout the 'either/or' with more white space to clarify which alternatives are matched up. Reference the Msysgit build script which automates one sequence of options. Signed-off-by: Philip Oakley philipoak...@iee.org --- compat/vcbuild/README | 27 +++ 1 file changed, 19

[PATCH v2 16/16] config.mak.uname: add MSVC No_SafeExeceptionHandler option

2015-07-19 Thread Philip Oakley
Microsoft flipped the Windows Safe Exception Handling default in VS2013 so that zlib became unacceptable to certain OS versions (Vista and subsequent 32-bit OS's) without the addition of the option -SAFESEH:NO. Provide a switch to disable the Safe Exeption Handler when required. The option

[PATCH v2 08/16] engine.pl: ignore invalidcontinue.obj which is known to MSVC

2015-07-19 Thread Philip Oakley
Commit 4b623d8 (MSVC: link in invalidcontinue.obj for better POSIX compatibility, 2014-03-29) is not processed correctly by the buildsystem. Ignore it. Also split the .o and .obj processing; 'make' does not produce .obj files. Only substitute filenames ending with .o when generating the source .c

[PATCH v2 09/16] engine.pl: name the msvc buildsystem's makedry error file

2015-07-19 Thread Philip Oakley
Save the stderr from the dry MSVC make to a well named file for later review. Use 'msvc-build-makedryerrors.txt' which should be obvious as to its source, and is not ignored by 'git status'. Signed-off-by: Philip Oakley philipoak...@iee.org --- fixed false mode change:- Junio's report (last line

[PATCH v2 10/16] engine.pl: delete the captured stderr file if empty

2015-07-19 Thread Philip Oakley
Keep the build clean of extraneous files if it is indeed clean. Otherwise leave the msvc-build-makedryerrors.txt file both as a flag for any CI system or for manual debugging. Note that the file will contain the new values of the GIT_VERSION and GITGUI_VERSION if they were generated by the make

[PATCH v2 01/16] perl/Makefile: treat a missing PM.stamp as if empty

2015-07-19 Thread Philip Oakley
'make clean', or a 'git clean -dfx' will delete the PM stamp file, so it cannot be a direct target in such clean conditions, resulting in an error. Normally the PM.stamp is recreated by the git/Makefile, except when a dry-run is requested, for example, as used in the msysgit msvc-build script

[PATCH v2 05/16] engine.pl: fix error message (lib-link)

2015-07-19 Thread Philip Oakley
Signed-off-by: Philip Oakley philipoak...@iee.org --- contrib/buildsystems/engine.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/buildsystems/engine.pl b/contrib/buildsystems/engine.pl index 23da787..c8a5258 100755 --- a/contrib/buildsystems/engine.pl +++

[PATCH v2 11/16] engine.pl: add debug line to capture the dry-run

2015-07-19 Thread Philip Oakley
Add a debug suggestion for capturing to file the stdout from the dry-run of the make file used in determining the msvc-build structure for easy debugging. Signed-off-by: Philip Oakley philipoak...@iee.org --- contrib/buildsystems/engine.pl | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v2 03/16] .gitignore: ignore library directories created by MSVC VS2008 buildsystem

2015-07-19 Thread Philip Oakley
Signed-off-by: Philip Oakley philipoak...@iee.org --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 91e75ee..e35c492 100644 --- a/.gitignore +++ b/.gitignore @@ -178,6 +178,7 @@ /gitweb/gitweb.cgi /gitweb/static/gitweb.js

[PATCH v2 04/16] (msvc-build) Vcproj.pm: remove duplicate GUID

2015-07-19 Thread Philip Oakley
Delete the duplicated GUID from the generation code for the Visual Studio .sln project file. The duplicate GUID tended to be allocated to test-svn-fe, which was then ignored by Visual Studio / MSVC, and its omission from the build never noticed. Signed-off-by: Philip Oakley philipoak...@iee.org

[PATCH v2 00/16] Make the msvc-build scripts work again

2015-07-19 Thread Philip Oakley
This updated series fixes the scripts which generated Visual Studio project files. The scripts had bit rotted over the years as other commits changed the git makefile which it post-processes. The series doesn't attempt (yet) to install the Visual Studio compiled product but allows Windows

[PATCH v2 13/16] Vcproj.pm: list git.exe first to be startup project

2015-07-19 Thread Philip Oakley
Visual Studio takes the first listed application/library as the default startup project [1]. Detect the 'git' project and place it the head of the apps list, rather than the tail. Export the apps list before libs list for both the projects and global structures of the .sln file. [1]

[PATCH v3 11/12] t3418: non-interactive rebase --continue with rerere enabled

2015-07-19 Thread Paul Tan
Since 8389b52 (git-rerere: reuse recorded resolve., 2006-01-28), git-am will call git-rerere to re-use recorded merge conflict resolutions if any occur in a threeway merge. Add a test to ensure that git-rerere is called by git-am (which handles the non-interactive rebase). Reviewed-by: Stefan

[PATCH v3 10/12] t4150: tests for am --[no-]scissors

2015-07-19 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. Add tests to ensure that git-am will pass the --scissors option to git-mailinfo, and that --no-scissors will override the configuration setting

[PATCH v3 12/12] t3901: test git-am encoding conversion

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am supported the --utf8 and --no-utf8 options, and if set, would pass the -u flag and the -k flag respectively. git mailinfo -u will re-code the commit log message and authorship info in the charset specified by

[PATCH v3 09/12] t4150: am with post-applypatch hook

2015-07-19 Thread Paul Tan
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. Add tests for this hook. Helped-by: Junio C Hamano gits...@pobox.com Reviewed-by: Stefan Beller

[PATCH v6 01/45] wrapper: implement xopen()

2015-07-19 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 v6 04/45] builtin-am: implement patch queue mechanism

2015-07-19 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

[PATCH v6 03/45] builtin-am: implement skeletal builtin am

2015-07-19 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 v6 05/45] builtin-am: split out mbox/maildir patches with git-mailsplit

2015-07-19 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 v6 06/45] builtin-am: auto-detect mbox patches

2015-07-19 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 in builtin/am.c. RFC 2822 requires that lines are terminated by

[PATCH v6 07/45] builtin-am: extract patch and commit info with git-mailinfo

2015-07-19 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 v6 00/45] Make git-am a builtin

2015-07-19 Thread Paul Tan
This patch series depends on pt/pull-builtin. This is a re-roll of [v5]. The changes are as follows: * Compacted the struct am_state declaration, so there are no ugly newlines between every field. * Removed unnecessary assert()s. * Simplified if (x) free(x) to just free(x) * Only alloc

[PATCH v2 14/16] vcbuild/readme: Improve layout

2015-07-19 Thread Philip Oakley
Layout the 'either/or' with more white space to clarify which alternatives are matched up. A revised copy of the Msysgit msvc-build script which automates this README is introduced in the next commit. Signed-off-by: Philip Oakley philipoak...@iee.org --- compat/vcbuild/README | 25

Re: [PATCH 3/3] Fix sed usage in tests to work around broken xpg4/sed on Solaris

2015-07-19 Thread Johannes Sixt
Am 19.07.2015 um 20:00 schrieb Ben Walton: - sed -e s/CHANGE_ME/change_me/ file file+ + perl -pne s/CHANGE_ME/change_me/ file file+ Did you mean '-lpe' or better '-pe' here? -- Hannes -- To unsubscribe from this list: send the line unsubscribe git in the body of a message to

[PATCH v3 02/12] t4150: am fails if index is dirty

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am will ensure that the index is clean before applying the patch. This is to prevent changes unrelated to the patch from being committed. Add a test for this check. Reviewed-by: Stefan Beller sbel...@google.com Reviewed-by:

[PATCH v3 07/12] t4150: am with applypatch-msg hook

2015-07-19 Thread Paul Tan
Since d1c5f2a (Add git-am, applymbox replacement., 2005-10-07), git-am will invoke the applypatch-msg hooks just after extracting the patch message. If the applypatch-msg hook exits with a non-zero status, git-am abort before even applying the patch to the index. Add tests for this hook.

[PATCH v3 05/12] t4150: am --resolved fails if index has no changes

2015-07-19 Thread Paul Tan
Since 6d28644 (git-am: do not allow empty commits by mistake., 2006-02-23), git-am --resolved will check to see if the index has any changes to prevent the user from creating an empty commit by mistake. Add a test for this. Reviewed-by: Stefan Beller sbel...@google.com Reviewed-by: Johannes

[PATCH v3 00/12] Improve git-am test coverage

2015-07-19 Thread Paul Tan
This is a very minor re-roll of [v2] that adds in the missing !MINGW prereq in t3901. Thanks Johannes Schindelin and Johannes Sixt for the reviews last round. Interdiff below. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/273254 [v2]

[PATCH v3 08/12] t4150: am with pre-applypatch hook

2015-07-19 Thread Paul Tan
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. Add tests for this hook. Helped-by: Junio C Hamano

[PATCH v3 03/12] t4151: am --abort will keep dirty index intact

2015-07-19 Thread Paul Tan
Since 7b3b7e3 (am --abort: keep unrelated commits since the last failure and warn, 2010-12-21), git-am --abort will not touch the index if on the previous invocation, git-am failed because the index is dirty. This is to ensure that the user's modifications to the index are not discarded. Add a

[PATCH v3 04/12] t4150: am refuses patches when paused

2015-07-19 Thread Paul Tan
Since c95b138 (Fix git-am safety checks, 2006-09-15), when there is a session in progress, git-am will check the command-line arguments and standard input to ensure that the user does not pass it any patches. Add a test for this. Reviewed-by: Stefan Beller sbel...@google.com Reviewed-by:

  1   2   >