[PATCH 1/2] Documentation/git-worktree: fix duplicated 'from'

2015-08-04 Thread Patrick Steinhardt
Signed-off-by: Patrick Steinhardt p...@pks.im --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 3387e2f..566ca92 100644 --- a/Documentation/git-worktree.txt +++

[PATCH 2/2] Documentation/git-worktree: fix reference to 'locked' file

2015-08-04 Thread Patrick Steinhardt
The documentation of git-worktree refers to the 'locked' file as 'lock'. Fix this to say 'locked' instead. Signed-off-by: Patrick Steinhardt p...@pks.im --- Documentation/git-worktree.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/git-worktree.txt

[PATCH v9 05/11] ref-filter: support printing N lines from tag annotation

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com 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. Mentored-by: Christian Couder

[PATCH v9 02/11] ref-filter: introduce ref_formatting_state

2015-08-04 Thread Karthik Nayak
Introduce a ref_formatting_state which will eventually hold the values of modifier atoms. Implement this within ref-filter. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak karthik@gmail.com ---

[PATCH v9 10/11] tag.c: implement '--format' option

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Implement the '--format' option provided by 'ref-filter'. This lets the user list tags as per desired format similar to the implementation in 'git for-each-ref'. Add tests and documentation for the same. Mentored-by: Christian Couder

[PATCH v9 08/11] tag.c: use 'ref-filter' data structures

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Make 'tag.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'tag.c' to use 'ref-filter' APIs. This is a temporary step before porting 'tag.c' to use 'ref-filter' completely.

[PATCH v9 06/11] ref-filter: add support to sort by version

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Add support to sort by version using the v:refname and version:refname option. This is achieved by using the 'versioncmp()' function as the comparing function for qsort. This option is included to support sorting by versions in `git tag -l` which will

[PATCH v9 07/11] ref-filter: add option to match literal pattern

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Since 'ref-filter' only has an option to match path names add an option for plain fnmatch pattern-matching. This is to support the pattern matching options which are used in `git tag -l` and `git branch -l` where we can match patterns like `git tag -l

[PATCH v9 09/11] tag.c: use 'ref-filter' APIs

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Make 'tag.c' use 'ref-filter' APIs for iterating through refs, sorting and printing of refs. This removes most of the code used in 'tag.c' replacing it with calls to the 'ref-filter' library. Make 'tag.c' use the 'filter_refs()' function provided by

[PATCH v9 11/11] tag.c: implement '--merged' and '--no-merged' options

2015-08-04 Thread Karthik Nayak
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. The '--no-merged' option lets the user to only list tags not merged into the named

[PATCH v9 04/11] ref-filter: add option to filter only tags

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Add a functions called 'for_each_tag_ref_fullpath()' to refs.{c,h} which iterates through each tag ref without trimming the path. Add an option in 'filter_refs()' to use 'for_each_tag_ref_fullpath()' and filter refs. This type checking is done by adding

[PATCH v9 03/11] ref-filter: implement an `align` atom

2015-08-04 Thread Karthik Nayak
Implement an `align` atom which will act as a modifier atom and align any string with or without an %(atom) appearing before a %(end) atom to the right, left or middle. It is followed by `:type,paddinglength`, where the `type` is either left, right or middle and `paddinglength` is the total

[PATCH v9 0/11] Port tag.c over to use ref-filter APIs

2015-08-04 Thread Karthik Nayak
This is part of my GSoC project to unify git tag -l, git branch -l, git for-each-ref. This patch series is continued from: Git (next) https://github.com/git/git/commit/bf5418f49ff0cebc6e5ce04ad1417e1a47c81b61 This series consists of porting tag.c over to using the ref-filter APIs Version 8 can

[PATCH v9 01/11] ref-filter: print output to strbuf for formatting

2015-08-04 Thread Karthik Nayak
Introduce a strbuf `output` which will act as a substitute rather than printing directly to stdout. This will be used for formatting eventually. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

Re: git svn clone fails

2015-08-04 Thread Jörg Schaible
Hmmm. Is this the proper channel to report issues or should I go somewhere else? Jörg Schaible wrote: Hello guys, we have to turn some projects managed by Subversion into a GIT-based solution. However the conversion unfortunately fails with an error: == % ==

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

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

2015-08-04 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 v7 10/45] builtin-am: refuse to apply patches if index is dirty

2015-08-04 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 v7 06/45] builtin-am: auto-detect mbox patches

2015-08-04 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 v7 02/45] wrapper: implement xfopen()

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

2015-08-04 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 v7 14/45] builtin-am: implement --abort

2015-08-04 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 v7 13/45] builtin-am: implement --skip

2015-08-04 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 v7 22/45] builtin-am: bypass git-mailinfo when --rebasing

2015-08-04 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 v7 36/45] builtin-am: invoke pre-applypatch hook

2015-08-04 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 v7 23/45] builtin-am: handle stray state directory

2015-08-04 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 v7 37/45] builtin-am: invoke post-applypatch hook

2015-08-04 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 v7 34/45] builtin-am: support automatic notes copying

2015-08-04 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 v7 30/45] builtin-am: implement --ignore-date

2015-08-04 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 v7 21/45] builtin-am: implement --rebasing mode

2015-08-04 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 v7 32/45] builtin-am: implement -S/--gpg-sign, commit.gpgsign

2015-08-04 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 v7 27/45] builtin-am: support --keep-cr, am.keepcr

2015-08-04 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 v7 07/45] builtin-am: extract patch and commit info with git-mailinfo

2015-08-04 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 v7 28/45] builtin-am: implement --[no-]scissors

2015-08-04 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 v7 38/45] builtin-am: rerere support

2015-08-04 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 v7 12/45] builtin-am: don't parse mail when resuming

2015-08-04 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 v7 17/45] builtin-am: exit with user friendly message on failure

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

2015-08-04 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 v7 31/45] builtin-am: implement --committer-date-is-author-date

2015-08-04 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 v7 18/45] builtin-am: implement -s/--signoff

2015-08-04 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 v7 15/45] builtin-am: reject patches when there's a session in progress

2015-08-04 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 v7 35/45] builtin-am: invoke applypatch-msg hook

2015-08-04 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 v7 24/45] builtin-am: implement -u/--utf8

2015-08-04 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 v7 45/45] builtin-am: remove redirection to git-am.sh

2015-08-04 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 v7 20/45] builtin-am: implement --3way

2015-08-04 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 v7 40/45] builtin-am: support and auto-detect StGit series files

2015-08-04 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 v7 43/45] builtin-am: implement legacy -b/--binary option

2015-08-04 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 v7 11/45] builtin-am: implement --resolved/--continue

2015-08-04 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 v7 09/45] builtin-am: implement committing applied patch

2015-08-04 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 v7 44/45] builtin-am: check for valid committer ident

2015-08-04 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 v7 29/45] builtin-am: pass git-apply's options to git-apply

2015-08-04 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 v7 42/45] builtin-am: implement -i/--interactive

2015-08-04 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 v7 41/45] builtin-am: support and auto-detect mercurial patches

2015-08-04 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 v7 03/45] builtin-am: implement skeletal builtin am

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

2015-08-04 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 v7 00/45] Make git-am a builtin

2015-08-04 Thread Paul Tan
This is a re-roll of [v6]. The changes are as follows: * removed am.threeWay config to match master * renamed am_state's append_signoff field to the shorter signoff to preserve horizontal space. * Fix memory leak in am_abort() (Noticed by Stefan, thanks!) * Rebase onto master, and adjust to

[PATCH v2 0/3] am: let command-line options override saved options

2015-08-04 Thread Paul Tan
Let command-line options override saved options in git-am when resuming This is a re-roll of [v1]. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/274789 When resuming, git-am mistakenly ignores command-line options. For instance, when a patch fails to apply with

[PATCH v2 1/3] test_terminal: redirect child process' stdin to a pty

2015-08-04 Thread Paul Tan
When resuming, git-am detects if we are trying to feed it patches or not by checking if stdin is a TTY. However, the test library redirects stdin to /dev/null. This makes it difficult, for instance, to test the behavior of git am -3 when resuming, as git-am will think we are trying to feed it

[PATCH v2 2/3] am: let command-line options override saved options

2015-08-04 Thread Paul Tan
When resuming, git-am mistakenly ignores command-line options. For instance, when a patch fails to apply with git am patch, subsequently running git am --3way would not cause git-am to fall back on attempting a threeway merge. This occurs because by default the --3way option is saved as false,

[PATCH v2 3/3] am: let --signoff override --no-signoff

2015-08-04 Thread Paul Tan
After resolving a conflicting patch, a user may wish to sign off the patch to declare that the patch has been modified. As such, the user will expect that running git am --signoff --continue will append the signoff to the commit message. However, the --signoff option is only taken into account

[PATCH v2 0/3] am: let command-line options override saved options

2015-08-04 Thread Paul Tan
Let command-line options override saved options in git-am when resuming This is a re-roll of [v1]. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/274789 When resuming, git-am mistakenly ignores command-line options. For instance, when a patch fails to apply with

[PATCH] git-am: add am.threeWay config variable

2015-08-04 Thread Paul Tan
From: Remi Lespinet remi.lespi...@ensimag.grenoble-inp.fr Add the am.threeWay configuration variable to use the -3 or --3way option of git am by default. When am.threeway is set and not desired for a specific git am command, the --no-3way option can be used to override it. Signed-off-by: Remi

Re: [git-p4] import with labels fails when commit is not transferred

2015-08-04 Thread Luke Diamand
On 04/07/15 04:27, Luke Diamand wrote: Sorry for not replying earlier, and thanks for taking the time to investigate this! It's a pretty subtle corner case: I think a test case would be useful. I'm going to try to put something together, unless you beat me to it! (I think

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-08-04 Thread Sebastian Schuberth
On Tue, Aug 4, 2015 at 6:34 AM, Lukas Fleischer lfleisc...@lfos.de wrote: I am currently on vacation and cannot bisect or debug this but I am pretty confident that this patch changes the behaviour of directory name guessing. With Git 2.4.6, cloning http://foo.bar/foo.git/ results in a

[PATCH v3 4/6] clone: do not use port number as dir name

2015-08-04 Thread Patrick Steinhardt
If the URI contains a port number and the URI's path component is empty we fail to guess a sensible directory name. E.g. cloning a repository 'ssh://example.com:/' we guess a directory name '' where we would want the hostname only, e.g. 'example.com'. Fix this by stripping trailing port

[PATCH v3 1/6] tests: fix broken chains in t1509-root-worktree

2015-08-04 Thread Patrick Steinhardt
Signed-off-by: Patrick Steinhardt p...@pks.im --- t/t1509-root-worktree.sh | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/t/t1509-root-worktree.sh b/t/t1509-root-worktree.sh index b6977d4..0c80129 100755 --- a/t/t1509-root-worktree.sh +++ b/t/t1509-root-worktree.sh @@

[PATCH v3 2/6] tests: fix cleanup after tests in t1509-root-worktree

2015-08-04 Thread Patrick Steinhardt
During cleanup we do a simple 'rm /*' to remove leftover files from previous tests. As 'rm' errors out when there is anything it cannot delete and there are directories present at '/' it will throw an error, causing the '' chain to fail. Fix this by explicitly removing the files. Signed-off-by:

[PATCH v3 0/6] fix repo name when cloning a server's root

2015-08-04 Thread Patrick Steinhardt
This is the third version of this patch series. It aims to improve guessing directory names such that we do not include authentication data and port numbers in them. This version drops the patches exposing 'parse_connect_url()' and instead does the stripping of authentification data and port

[PATCH v3 6/6] clone: add tests for cloning with empty path

2015-08-04 Thread Patrick Steinhardt
Test behavior of `git clone` when working with an empty path component. This may be the case when cloning a file system's root directory or from a remote server's root. Signed-off-by: Patrick Steinhardt p...@pks.im --- t/t1509-root-worktree.sh | 43 +++ 1

[PATCH v3] remote: add get-url subcommand

2015-08-04 Thread Ben Boeckel
Expanding `insteadOf` is a part of ls-remote --url and there is no way to expand `pushInsteadOf` as well. Add a get-url subcommand to be able to query both as well as a way to get all configured urls. Signed-off-by: Ben Boeckel maths...@gmail.com --- Documentation/git-remote.txt | 10

допоможіть сайту нашої школи http://154school.kiev.ua/ - будь ласка, відкрийте його для перегляду однієї-двох сторінок,

2015-08-04 Thread admin
Доброго дня, будь ласка, просимо переглянути наш шкільний сайт, якщо це не важко для вас, http://154school.kiev.ua/ - будь ласка, відкрийте його для перегляду однієї-двох сторінок, і на будь-якій сторінці один раз натисніть на рекламний банер, який вам найбільш цікавий, це Ваша допомога, щоб ми

[PATCH] git_open_noatime: return with errno=0 on success

2015-08-04 Thread Clemens Buchacher
In read_sha1_file_extended we die if read_object fails with a fatal error. We detect a fatal error if errno is non-zero and is not ENOENT. If the object could not be read because it does not exist, this is not considered a fatal error and we want to return NULL. Somewhere down the line,

[PATCH 07/10] branch.c: use 'ref-filter' data structures

2015-08-04 Thread Karthik Nayak
Make 'branch.c' use 'ref-filter' data structures and make changes to support the new data structures. This is a part of the process of porting 'branch.c' to use 'ref-filter' APIs. This is a temporary step before porting 'branch.c' to use 'ref-filter' completely. As this is a temporary step, most

[PATCH 03/10] branch: bump get_head_description() to the top

2015-08-04 Thread Karthik Nayak
This is a preperatory patch for 'roll show_detached HEAD into regular ref_list'. This patch moves get_head_descrition() to the top so that it can be used in print_ref_item(). Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu

[PATCH 05/10] branch: move 'current' check down to the presentation layer

2015-08-04 Thread Karthik Nayak
We check if given ref is the current branch in print_ref_list(). Move this check to print_ref_item() where it is checked right before printing. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy

[PATCH 06/10] branch: drop non-commit error reporting

2015-08-04 Thread Karthik Nayak
Remove the error reporting variable to make the code easier to port over to using ref-filter APIs. Based-on-patch-by: Jeff King p...@peff.net Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr Signed-off-by: Karthik Nayak

[PATCH 0/10] Port branch.c to ref-filter.

2015-08-04 Thread Karthik Nayak
This is part of my GSoC project to unify git tag -l, git branch -l, git for-each-ref. This patch series is continued from: Git (next) https://github.com/git/git/commit/bf5418f49ff0cebc6e5ce04ad1417e1a47c81b61 This series consists of porting branch.c over to using the ref-filter APIs. This does

[PATCH 04/10] branch: roll show_detached HEAD into regular ref_list

2015-08-04 Thread Karthik Nayak
Remove show_detached() and make detached HEAD to be rolled into regular ref_list by adding REF_DETACHED_HEAD as a kind of branch and supporting the same in append_ref(). This eliminates the need for an extra function and helps in easier porting of branch.c to use ref-filter APIs. Before

[PATCH 09/10] branch: add '--points-at' option

2015-08-04 Thread Karthik Nayak
Add the '--points-at' option provided by 'ref-filter'. The option lets the user to list only branches which points at the given object. Add documentation and tests for the same. Mentored-by: Christian Couder christian.cou...@gmail.com Mentored-by: Matthieu Moy matthieu@grenoble-inp.fr

[PATCH 08/10] branch.c: use 'ref-filter' APIs

2015-08-04 Thread Karthik Nayak
Make 'branch.c' use 'ref-filter' APIs for iterating through refs sorting. This removes most of the code used in 'branch.c' replacing it with calls to the 'ref-filter' library. Make 'branch.c' use the 'filter_refs()' function provided by 'ref-filter' to filter out tags based on the options set.

[PATCH 02/10] branch: refactor width computation

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Remove unnecessary variables from ref_list and ref_item which were used for width computation. This is to make ref_item similar to ref-filter's ref_array_item. This will ensure a smooth port of branch.c to use ref-filter APIs in further patches.

Re: [PATCH 0/10] Port branch.c to ref-filter.

2015-08-04 Thread Karthik Nayak
There are nine patches in the series. Have put 0/10 by mistake. -- Regards, Karthik Nayak -- 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 01/10] ref-filter: add option to filter only branches

2015-08-04 Thread Karthik Nayak
From: Karthik Nayak karthik@gmail.com Add an option in 'filter_refs()' to use 'for_each_branch_ref()' and filter refs. This type checking is done by adding a 'FILTER_REFS_BRANCHES' in 'ref-filter.h'. Add an option in 'ref_filter_handler()' to filter different types of branches by calling

Re: [PATCH] git-p4: fix faulty paths for case insensitive systems

2015-08-04 Thread Lars Schneider
Thank you for your reply. Your t8919 test case looks exactly like the right thing. Unfortuantly I don’t have Internet access for the next two weeks. Afterwards I will provide a proper test cases for the patch. You are correct about the speed. All these initial “p4 dirs” calls make the clone

Re: fetching from an hg remote fails with bare git repositories

2015-08-04 Thread Taylor Braun-Jones
On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller sbel...@google.com wrote: On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones tay...@braun-jones.org wrote: Fetching from an hg remote fails with bare git repositories. Non-bare repositories work fine. Steps to reproduce: mkdir /tmp/hgrepo cd

Re: [PATCH v2 0/3] am: let command-line options override saved options

2015-08-04 Thread Junio C Hamano
Paul Tan pyoka...@gmail.com writes: Let command-line options override saved options in git-am when resuming This is a re-roll of [v1]. Previous versions: [v1] http://thread.gmane.org/gmane.comp.version-control.git/274789 When resuming, git-am mistakenly ignores command-line options. For

Re: [PATCH v4] clone: simplify string handling in guess_dir_name()

2015-08-04 Thread Jeff King
On Tue, Aug 04, 2015 at 09:31:18AM +0200, Sebastian Schuberth wrote: On Tue, Aug 4, 2015 at 6:34 AM, Lukas Fleischer lfleisc...@lfos.de wrote: I am currently on vacation and cannot bisect or debug this but I am pretty confident that this patch changes the behaviour of directory name

Re: fetching from an hg remote fails with bare git repositories

2015-08-04 Thread Mike Hommey
On Tue, Aug 04, 2015 at 05:27:13PM -0400, Taylor Braun-Jones wrote: On Tue, Aug 4, 2015 at 2:56 PM, Stefan Beller sbel...@google.com wrote: On Tue, Aug 4, 2015 at 10:45 AM, Taylor Braun-Jones tay...@braun-jones.org wrote: Fetching from an hg remote fails with bare git repositories. Non-bare

Re: [PATCH 2/4] submodule: implement `module_name` as a builtin helper

2015-08-04 Thread Stefan Beller
The series consists of 2 patches only actually. The next patches have not been sent as they are heavy WIP. -- 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 v6 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
When submodule is a linked worktree, git diff --submodule and other calls which directly access the submodule's object database do not correctly calculate its path. Fix it by changing the git_path_submodule() behavior, to use either common or per-worktree directory. Do it similarly as for parent

[PATCH v6 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-04 Thread Max Kirillov
Functions which directly operate submodule's object database do not handle the case when the submodule is linked worktree (which are introduced in c7b3a3d2fe). Instead of fixing the path calculation use already existing git_path_submodule() function, with intention to modify only that function

[PATCH v6 0/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
Fixed the pointer declaration spacing issue and updated commit messages. The 1/2 refactoring still might leave some cases behind. I could grep only function connect_work_tree_and_git_dir() which, as far as I can see, involved in moving repositories. Have not touched it because correct moving

[PATCH v7 2/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
When submodule is a linked worktree, git diff --submodule and other calls which directly access the submodule's object database do not correctly calculate its path. Fix it by changing the git_path_submodule() behavior, to use either common or per-worktree directory. Do it similarly as for parent

Re: [PATCH] git-p4: fix faulty paths for case insensitive systems

2015-08-04 Thread Luke Diamand
On 02/08/15 16:15, larsxschnei...@gmail.com wrote: From: Lars Schneider larsxschnei...@gmail.com Hi, I want to propose this patch as it helped us to migrate a big source code base successfully from P4 to Git. I am sorry that I don't provide a test case, yet. Case sensitivity is a pretty

[PATCH v7 1/2] submodule refactor: use git_path_submodule() in add_submodule_odb()

2015-08-04 Thread Max Kirillov
Functions which directly operate submodule's object database do not handle the case when the submodule is linked worktree (which are introduced in c7b3a3d2fe). Instead of fixing the path calculation use already existing git_path_submodule() function without changing overall behavior. Then it will

[PATCH v7 0/2] path: implement common_dir handling in git_path_submodule()

2015-08-04 Thread Max Kirillov
Emphasized that 1/2 does not change behavior. Max Kirillov (2): submodule refactor: use git_path_submodule() in add_submodule_odb() path: implement common_dir handling in git_path_submodule() cache.h | 1 + path.c | 24

fetching from an hg remote fails with bare git repositories

2015-08-04 Thread Taylor Braun-Jones
Fetching from an hg remote fails with bare git repositories. Non-bare repositories work fine. Steps to reproduce: mkdir /tmp/hgrepo cd /tmp/hgrepo hg init echo foo foo.txt hg add foo.txt hg commit -m add foo.txt foo.txt git clone hg::/tmp/hgrepo/ /tmp/gitrepo cd /tmp/gitrepo/ git fetch # WORKS

Re: [PATCH 2/2] Documentation/git-worktree: fix reference to 'locked' file

2015-08-04 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 8:27 AM, Patrick Steinhardt p...@pks.im wrote: The documentation of git-worktree refers to the 'locked' file as 'lock'. Fix this to say 'locked' instead. Thanks for the patch. This is already fixed in 'next' by 2e73ab6 (Documentation/git-worktree: fix incorrect reference

Re: [PATCH 1/2] Documentation/git-worktree: fix duplicated 'from'

2015-08-04 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 8:27 AM, Patrick Steinhardt p...@pks.im wrote: Signed-off-by: Patrick Steinhardt p...@pks.im --- diff --git a/Documentation/git-worktree.txt b/Documentation/git-worktree.txt index 3387e2f..566ca92 100644 --- a/Documentation/git-worktree.txt +++

Re: [PATCH v3 6/6] clone: add tests for cloning with empty path

2015-08-04 Thread Eric Sunshine
On Tue, Aug 4, 2015 at 7:29 AM, Patrick Steinhardt p...@pks.im wrote: Test behavior of `git clone` when working with an empty path component. This may be the case when cloning a file system's root directory or from a remote server's root. A few minor, mostly style-related, comments below...

  1   2   >