* Re: What's cooking in git.git (Oct 2011, #06; Tue, 18)
From: Junio C Hamano @ 2011-10-18 18:09 UTC (permalink / raw)
To: Phil Hord; +Cc: git
In-Reply-To: <7vmxcygs1m.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Phil Hord <phil.hord@gmail.com> writes:
>
>> On Tue, Oct 18, 2011 at 3:50 AM, Junio C Hamano <gitster@pobox.com> wrote:
>>> What's cooking in git.git (Oct 2011, #06; Tue, 18)
>>> --------------------------------------------------
>> [...]
>>> * ph/transport-with-gitfile (2011-10-11) 5 commits
>>> (merged to 'next' on 2011-10-12 at 6d58417)
>>> + Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
>>> (merged to 'next' on 2011-10-06 at 891b8b6)
>>> + Add test showing git-fetch groks gitfiles
>>> + Teach transport about the gitfile mechanism
>>> + Learn to handle gitfiles in enter_repo
>>> + enter_repo: do not modify input
>>>
>>> Will merge to 'master' in the fifth wave.
>>
>> Do you want a re-roll of this with your is_bundle() changes added in?
>> I do like them better.
>
> Hmm, you may be right. I'll try to queue an update on top of the series
> and see what happens.
Actually there is nothing that needs re-rolling. We can just make the
jc/unseekable-bundle topic graduate at the same time as this one, and let
the merge remove the is_gitfile() helper that becomes unnecessary.
^ permalink raw reply
* Re: git-p4.skipSubmitEdit
From: Luke Diamand @ 2011-10-18 17:53 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: L. A. Linden Levy, git
In-Reply-To: <20111018004500.GA31768@arf.padd.com>
On 18/10/11 01:45, Pete Wyckoff wrote:
> alevy@mobitv.com wrote on Mon, 12 Sep 2011 10:12 -0700:
>> I agree with almost all your points. I have answered them each in-line
>> below.
>>
>> On Mon, 2011-09-12 at 03:34 -0400, Luke Diamand wrote:
>>> On 08/09/11 21:40, L. A. Linden Levy wrote:
>>>> Hi All,
>>>>
>>>> I have been using git-p4 for a while and it has allowed me to completely
>>>> change the way I develop and still be able to use perforce which my
>>>> company has for its main VCS. One thing that was driving me nuts was
>>>> that "git p4 submit" cycles through all of my individual commits and
>>>> asks me if I want to change them. The way I develop I often am checking
>>>> in 20 to 50 different small commits each with a descriptive git comment.
>>>> I felt like I was doing double duty by having emacs open on every commit
>>>> into perforce. So I modified git-p4 to have an option to skip the
>>>> editor. This option coupled with git-p4.skipSubmitEditCheck will make
>>>> the submission non-interactive for "git p4 submit".
>>>
>>>
>>> Sorry - I've not had a chance to look at this before now. But a couple
>>> of comments:
>>>
>>> - Is there a line wrap problem in the patch? It doesn't seem to want
>>> to apply for me.
>>
>> Probably. Below are the results from following the patch submission
>> instructions.
>
> Sorry I sat on this for a month. It is a good idea. Your
> patches were good in content, but they didn't apply well due to
> being line-wrapped and having one duplicate.
>
> Reading the code, though, I decided that the whole
> skipSubmitEdit* checking was a bit convoluted even before you got
> to it. So I moved it all to a separate function. And added a
> unit test.
>
> Tell me if you think this is okay instead. If I got a bit too
> wordy in the doc, please help with that too.
Looks good, one minor nit (see below) and a comment.
Ack.
Luke
>
> -- Pete
>
> --- 8< ---
>
> Subject: [PATCH] git-p4: introduce skipSubmitEdit
>
> Add a configuration variable to skip invoking the editor in the
> submit path.
>
> The existing variable skipSubmitEditCheck continues to make sure
> that the submit template was indeed modified by the editor; but,
> it is not considered is skipSubmitEdit is true.
>
> Reported-by: Loren A. Linden Levy<lindenle@gmail.com>
> Signed-off-by: Pete Wyckoff<pw@padd.com>
> ---
> contrib/fast-import/git-p4 | 60 +++++++++++++++++++----------
> contrib/fast-import/git-p4.txt | 19 ++++++++-
> t/t9804-skip-submit-edit.sh | 82 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 137 insertions(+), 24 deletions(-)
> create mode 100755 t/t9804-skip-submit-edit.sh
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index f885d70..abd6778 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -847,6 +847,39 @@ class P4Submit(Command, P4UserMap):
>
> return template
>
> + def edit_template(self, template_file):
> + """Invoke the editor to let the user change the submission
> + message. Return true if okay to continue with the submit."""
> +
> + # if configured to skip the editing part, just submit
> + if gitConfig("git-p4.skipSubmitEdit") == "true":
> + return True
> +
> + # look at the modification time, to check later if the user saved
> + # the file
> + mtime = os.stat(template_file).st_mtime
> +
> + # invoke the editor
> + if os.environ.has_key("P4EDITOR"):
> + editor = os.environ.get("P4EDITOR")
> + else:
> + editor = read_pipe("git var GIT_EDITOR").strip()
> + system(editor + " " + template_file)
This is where we should really check the return code. However, doing so
seems to break lots of the existing tests so it's not as easy as it looks.
> +
> + # If the file was not saved, prompt to see if this patch should
> + # be skipped. But skip this verification step if configured so.
> + if gitConfig("git-p4.skipSubmitEditCheck") == "true":
> + print "return true for skipSubmitEditCheck"
You print a helpful/annoying(?) message here, but not further up at
skipSubmitEdit?
> + return True
> +
> + if os.stat(template_file).st_mtime<= mtime:
> + while True:
> + response = raw_input("Submit template unchanged. Submit anyway? [y]es, [n]o (skip this patch) ")
> + if response == 'y':
> + return True
> + if response == 'n':
> + return False
> +
> def applyCommit(self, id):
> print "Applying %s" % (read_pipe("git log --max-count=1 --pretty=oneline %s" % id))
>
> @@ -1001,7 +1034,7 @@ class P4Submit(Command, P4UserMap):
>
> separatorLine = "######## everything below this line is just the diff #######\n"
>
> - [handle, fileName] = tempfile.mkstemp()
> + (handle, fileName) = tempfile.mkstemp()
> tmpFile = os.fdopen(handle, "w+")
> if self.isWindows:
> submitTemplate = submitTemplate.replace("\n", "\r\n")
> @@ -1009,25 +1042,9 @@ class P4Submit(Command, P4UserMap):
> newdiff = newdiff.replace("\n", "\r\n")
> tmpFile.write(submitTemplate + separatorLine + diff + newdiff)
> tmpFile.close()
> - mtime = os.stat(fileName).st_mtime
> - if os.environ.has_key("P4EDITOR"):
> - editor = os.environ.get("P4EDITOR")
> - else:
> - editor = read_pipe("git var GIT_EDITOR").strip()
> - system(editor + " " + fileName)
>
> - if gitConfig("git-p4.skipSubmitEditCheck") == "true":
> - checkModTime = False
> - else:
> - checkModTime = True
> -
> - response = "y"
> - if checkModTime and (os.stat(fileName).st_mtime<= mtime):
> - response = "x"
> - while response != "y" and response != "n":
> - response = raw_input("Submit template unchanged. Submit anyway? [y]es, [n]o (skip this patch) ")
> -
> - if response == "y":
> + if self.edit_template(fileName):
> + # read the edited message and submit
> tmpFile = open(fileName, "rb")
> message = tmpFile.read()
> tmpFile.close()
> @@ -1039,11 +1056,12 @@ class P4Submit(Command, P4UserMap):
> if self.preserveUser:
> if p4User:
> # Get last changelist number. Cannot easily get it from
> - # the submit command output as the output is unmarshalled.
> + # the submit command output as the output is
> + # unmarshalled.
> changelist = self.lastP4Changelist()
> self.modifyChangelistUser(changelist, p4User)
> -
> else:
> + # skip this patch
> for f in editedFiles:
> p4_revert(f)
> for f in filesToAdd:
> diff --git a/contrib/fast-import/git-p4.txt b/contrib/fast-import/git-p4.txt
> index 52003ae..5044a12 100644
> --- a/contrib/fast-import/git-p4.txt
> +++ b/contrib/fast-import/git-p4.txt
> @@ -202,11 +202,24 @@ able to find the relevant client. This client spec will be used to
> both filter the files cloned by git and set the directory layout as
> specified in the client (this implies --keep-path style semantics).
>
> -git-p4.skipSubmitModTimeCheck
> +git-p4.skipSubmitEdit
>
> - git config [--global] git-p4.skipSubmitModTimeCheck false
> + git config [--global] git-p4.skipSubmitEdit false
>
> -If true, submit will not check if the p4 change template has been modified.
> +Normally, git-p4 invokes an editor after each commit is applied so
> +that you can make changes to the submit message. Setting this
> +variable to true will skip the editing step, submitting the change as is.
> +
> +git-p4.skipSubmitEditCheck
> +
> + git config [--global] git-p4.skipSubmitEditCheck false
> +
> +After the editor is invoked, git-p4 normally makes sure you saved the
> +change description, as an indication that you did indeed read it over
> +and edit it. You can quit without saving to abort the submit (or skip
> +this change and continue). Setting this variable to true will cause
> +git-p4 not to check if you saved the change description. This variable
> +only matters if git-p4.skipSubmitEdit has not been set to true.
>
> git-p4.preserveUser
>
> diff --git a/t/t9804-skip-submit-edit.sh b/t/t9804-skip-submit-edit.sh
> new file mode 100755
> index 0000000..734ccf2
> --- /dev/null
> +++ b/t/t9804-skip-submit-edit.sh
> @@ -0,0 +1,82 @@
> +#!/bin/sh
> +
> +test_description='git-p4 skipSubmitEdit config variables'
> +
> +. ./lib-git-p4.sh
> +
> +test_expect_success 'start p4d' '
> + start_p4d
> +'
> +
> +test_expect_success 'init depot' '
> + (
> + cd "$cli"&&
> + echo file1>file1&&
> + p4 add file1&&
> + p4 submit -d "change 1"
> + )
> +'
> +
> +# this works because EDITOR is set to :
> +test_expect_success 'no config, unedited, say yes' '
> + "$GITP4" clone --dest="$git" //depot&&
> + test_when_finished cleanup_git&&
> + (
> + cd "$git"&&
> + echo line>>file1&&
> + git commit -a -m "change 2"&&
> + echo y | "$GITP4" submit&&
> + p4 changes //depot/...>wc&&
> + test_line_count = 2 wc
> + )
> +'
> +
> +test_expect_success 'no config, unedited, say no' '
> + "$GITP4" clone --dest="$git" //depot&&
> + test_when_finished cleanup_git&&
> + (
> + cd "$git"&&
> + echo line>>file1&&
> + git commit -a -m "change 3 (not really)"&&
> + printf "bad response\nn\n" | "$GITP4" submit
> + p4 changes //depot/...>wc&&
> + test_line_count = 2 wc
> + )
> +'
> +
> +test_expect_success 'skipSubmitEdit' '
> + "$GITP4" clone --dest="$git" //depot&&
> + test_when_finished cleanup_git&&
> + (
> + cd "$git"&&
> + git config git-p4.skipSubmitEdit true&&
> + # will fail if editor is even invoked
> + git config core.editor /bin/false&&
> + echo line>>file1&&
> + git commit -a -m "change 3"&&
> + "$GITP4" submit&&
> + p4 changes //depot/...>wc&&
> + test_line_count = 3 wc
> + )
> +'
> +
> +test_expect_success 'skipSubmitEditCheck' '
> + "$GITP4" clone --dest="$git" //depot&&
> + test_when_finished cleanup_git&&
> + (
> + cd "$git"&&
> + git config git-p4.skipSubmitEditCheck true&&
> + echo line>>file1&&
> + git commit -a -m "change 4"&&
> + "$GITP4" submit&&
> + p4 changes //depot/...>wc&&
> + test_line_count = 4 wc
> + )
> +'
> +
> +
> +test_expect_success 'kill p4d' '
> + kill_p4d
> +'
> +
> +test_done
^ permalink raw reply
* Re: git-p4.skipSubmitEdit
From: Pete Wyckoff @ 2011-10-18 17:35 UTC (permalink / raw)
To: L. A. Linden Levy; +Cc: Luke Diamand, git
In-Reply-To: <1318956684.2717.7.camel@uncle-pecos>
alevy@mobitv.com wrote on Tue, 18 Oct 2011 09:51 -0700:
> This is just fine for me. Like I said initially I did not approach the
> problem from an engineering perspective, I just changed it to prevent
> the patch questions so I could commit faster. Looking forward to seeing
> the update in the repo.
Okay, thanks. I'll see if I get some review comments, and will
gradually shepherd this toward the next release.
-- Pete
^ permalink raw reply
* Re: [PATCH] inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
From: Junio C Hamano @ 2011-10-18 17:32 UTC (permalink / raw)
To: Sebastian Schuberth; +Cc: git, mschub
In-Reply-To: <4E9DA88E.40500@gmail.com>
Sebastian Schuberth <sschuberth@gmail.com> writes:
> GCC 4.6 claims that
>
> error: 'best.len' may be used uninitialized in this function
>
> so silence that warning which is treated as an error by also initializing
> the "len" members of the struct.
>
> Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
> ---
> compat/inet_ntop.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
> index ea249c6..60b5a1d 100644
> --- a/compat/inet_ntop.c
> +++ b/compat/inet_ntop.c
> @@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
> for (i = 0; i < NS_IN6ADDRSZ; i++)
> words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
> best.base = -1;
> + best.len = 0;
> cur.base = -1;
> + cur.len = 0;
It may be just the "taste" thing, but I wonder if
best.base = -1;
best.len = 0;
cur = best;
might be easier on the eyes.
Will queue as-is anyway. Thanks.
> for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
> if (words[i] == 0) {
> if (cur.base == -1)
^ permalink raw reply
* Re: [PATCH 3/3] completion: match ctags symbol names in grep patterns
From: Junio C Hamano @ 2011-10-18 17:14 UTC (permalink / raw)
To: Jonathan Nieder; +Cc: Jeff King, git
In-Reply-To: <20111018075521.GB20976@elie.hsd1.il.comcast.net>
Jonathan Nieder <jrnieder@gmail.com> writes:
> In this new tags/cscope example, one could make an argument that
> running exactly once is similarly better than running as needed (as in
> (ii) above), by pointing out that
>
> make tags TAGS cscope
>
> would have to check for a working "git ls-files" once instead of three
> times.
I tend to agree that once instead of three times is not such an
improvement, especially given how cheap builtin-invocation of ls-files is,
but then once every invocation of $(MAKE) would also be negligible (it is
not once every internal target evaluation).
In any case, here is what I'll queue. I like the fact that your suggestion
avoids an extra "test invocation" that spends cycles to read the full
index without contributing to the end result.
By the way, did anybody know that "git ls-files >/dev/null" is more
expensive than "git ls-files '~/' >/dev/null" as a way to see if there is
ls-files command available?
-- >8 --
Subject: [PATCH] Makefile: ask "ls-files" to list source files if available
The [ce]tags and cscope targets used to run "find" looking for any paths
that match '*.[chS]' to feed the list of source files to downstream xargs.
Use "git ls-files" if it is already available to us, and otherwise use a
tighter "find" expression that does not list directories and does not go
into our .git directory.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Makefile | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 8d6d451..badfb77 100644
--- a/Makefile
+++ b/Makefile
@@ -2115,17 +2115,21 @@ po/git.pot: $(LOCALIZED_C)
pot: po/git.pot
+FIND_SOURCE_FILES = ( git ls-files '*.[hcS]' 2>/dev/null || \
+ $(FIND) . \( -name .git -type d -prune \) \
+ -o \( -name '*.[hcS]' -type f -print \) )
+
$(ETAGS_TARGET): FORCE
$(RM) $(ETAGS_TARGET)
- $(FIND) . -name '*.[hcS]' -print | xargs etags -a -o $(ETAGS_TARGET)
+ $(FIND_SOURCE_FILES) | xargs etags -a -o $(ETAGS_TARGET)
tags: FORCE
$(RM) tags
- $(FIND) . -name '*.[hcS]' -print | xargs ctags -a
+ $(FIND_SOURCE_FILES) | xargs ctags -a
cscope:
$(RM) cscope*
- $(FIND) . -name '*.[hcS]' -print | xargs cscope -b
+ $(FIND_SOURCE_FILES) | xargs cscope -b
### Detect prefix changes
TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\
--
1.7.7.388.g3a4b7
^ permalink raw reply related
* Re: git-p4.skipSubmitEdit
From: L. A. Linden Levy @ 2011-10-18 16:51 UTC (permalink / raw)
To: Pete Wyckoff; +Cc: Luke Diamand, git@vger.kernel.org
In-Reply-To: <20111018004500.GA31768@arf.padd.com>
[-- Attachment #1: Type: text/plain, Size: 11341 bytes --]
Hi Peter,
This is just fine for me. Like I said initially I did not approach the
problem from an engineering perspective, I just changed it to prevent
the patch questions so I could commit faster. Looking forward to seeing
the update in the repo.
Cheers,
Alex
On Mon, 2011-10-17 at 20:45 -0400, Pete Wyckoff wrote:
> alevy@mobitv.com wrote on Mon, 12 Sep 2011 10:12 -0700:
> > I agree with almost all your points. I have answered them each in-line
> > below.
> >
> > On Mon, 2011-09-12 at 03:34 -0400, Luke Diamand wrote:
> > > On 08/09/11 21:40, L. A. Linden Levy wrote:
> > > > Hi All,
> > > >
> > > > I have been using git-p4 for a while and it has allowed me to completely
> > > > change the way I develop and still be able to use perforce which my
> > > > company has for its main VCS. One thing that was driving me nuts was
> > > > that "git p4 submit" cycles through all of my individual commits and
> > > > asks me if I want to change them. The way I develop I often am checking
> > > > in 20 to 50 different small commits each with a descriptive git comment.
> > > > I felt like I was doing double duty by having emacs open on every commit
> > > > into perforce. So I modified git-p4 to have an option to skip the
> > > > editor. This option coupled with git-p4.skipSubmitEditCheck will make
> > > > the submission non-interactive for "git p4 submit".
> > >
> > >
> > > Sorry - I've not had a chance to look at this before now. But a couple
> > > of comments:
> > >
> > > - Is there a line wrap problem in the patch? It doesn't seem to want
> > > to apply for me.
> >
> > Probably. Below are the results from following the patch submission
> > instructions.
>
> Sorry I sat on this for a month. It is a good idea. Your
> patches were good in content, but they didn't apply well due to
> being line-wrapped and having one duplicate.
>
> Reading the code, though, I decided that the whole
> skipSubmitEdit* checking was a bit convoluted even before you got
> to it. So I moved it all to a separate function. And added a
> unit test.
>
> Tell me if you think this is okay instead. If I got a bit too
> wordy in the doc, please help with that too.
>
> -- Pete
>
> --- 8< ---
>
> Subject: [PATCH] git-p4: introduce skipSubmitEdit
>
> Add a configuration variable to skip invoking the editor in the
> submit path.
>
> The existing variable skipSubmitEditCheck continues to make sure
> that the submit template was indeed modified by the editor; but,
> it is not considered is skipSubmitEdit is true.
>
> Reported-by: Loren A. Linden Levy <lindenle@gmail.com>
> Signed-off-by: Pete Wyckoff <pw@padd.com>
> ---
> contrib/fast-import/git-p4 | 60 +++++++++++++++++++----------
> contrib/fast-import/git-p4.txt | 19 ++++++++-
> t/t9804-skip-submit-edit.sh | 82 ++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 137 insertions(+), 24 deletions(-)
> create mode 100755 t/t9804-skip-submit-edit.sh
>
> diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
> index f885d70..abd6778 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -847,6 +847,39 @@ class P4Submit(Command, P4UserMap):
>
> return template
>
> + def edit_template(self, template_file):
> + """Invoke the editor to let the user change the submission
> + message. Return true if okay to continue with the submit."""
> +
> + # if configured to skip the editing part, just submit
> + if gitConfig("git-p4.skipSubmitEdit") == "true":
> + return True
> +
> + # look at the modification time, to check later if the user saved
> + # the file
> + mtime = os.stat(template_file).st_mtime
> +
> + # invoke the editor
> + if os.environ.has_key("P4EDITOR"):
> + editor = os.environ.get("P4EDITOR")
> + else:
> + editor = read_pipe("git var GIT_EDITOR").strip()
> + system(editor + " " + template_file)
> +
> + # If the file was not saved, prompt to see if this patch should
> + # be skipped. But skip this verification step if configured so.
> + if gitConfig("git-p4.skipSubmitEditCheck") == "true":
> + print "return true for skipSubmitEditCheck"
> + return True
> +
> + if os.stat(template_file).st_mtime <= mtime:
> + while True:
> + response = raw_input("Submit template unchanged. Submit anyway? [y]es, [n]o (skip this patch) ")
> + if response == 'y':
> + return True
> + if response == 'n':
> + return False
> +
> def applyCommit(self, id):
> print "Applying %s" % (read_pipe("git log --max-count=1 --pretty=oneline %s" % id))
>
> @@ -1001,7 +1034,7 @@ class P4Submit(Command, P4UserMap):
>
> separatorLine = "######## everything below this line is just the diff #######\n"
>
> - [handle, fileName] = tempfile.mkstemp()
> + (handle, fileName) = tempfile.mkstemp()
> tmpFile = os.fdopen(handle, "w+")
> if self.isWindows:
> submitTemplate = submitTemplate.replace("\n", "\r\n")
> @@ -1009,25 +1042,9 @@ class P4Submit(Command, P4UserMap):
> newdiff = newdiff.replace("\n", "\r\n")
> tmpFile.write(submitTemplate + separatorLine + diff + newdiff)
> tmpFile.close()
> - mtime = os.stat(fileName).st_mtime
> - if os.environ.has_key("P4EDITOR"):
> - editor = os.environ.get("P4EDITOR")
> - else:
> - editor = read_pipe("git var GIT_EDITOR").strip()
> - system(editor + " " + fileName)
>
> - if gitConfig("git-p4.skipSubmitEditCheck") == "true":
> - checkModTime = False
> - else:
> - checkModTime = True
> -
> - response = "y"
> - if checkModTime and (os.stat(fileName).st_mtime <= mtime):
> - response = "x"
> - while response != "y" and response != "n":
> - response = raw_input("Submit template unchanged. Submit anyway? [y]es, [n]o (skip this patch) ")
> -
> - if response == "y":
> + if self.edit_template(fileName):
> + # read the edited message and submit
> tmpFile = open(fileName, "rb")
> message = tmpFile.read()
> tmpFile.close()
> @@ -1039,11 +1056,12 @@ class P4Submit(Command, P4UserMap):
> if self.preserveUser:
> if p4User:
> # Get last changelist number. Cannot easily get it from
> - # the submit command output as the output is unmarshalled.
> + # the submit command output as the output is
> + # unmarshalled.
> changelist = self.lastP4Changelist()
> self.modifyChangelistUser(changelist, p4User)
> -
> else:
> + # skip this patch
> for f in editedFiles:
> p4_revert(f)
> for f in filesToAdd:
> diff --git a/contrib/fast-import/git-p4.txt b/contrib/fast-import/git-p4.txt
> index 52003ae..5044a12 100644
> --- a/contrib/fast-import/git-p4.txt
> +++ b/contrib/fast-import/git-p4.txt
> @@ -202,11 +202,24 @@ able to find the relevant client. This client spec will be used to
> both filter the files cloned by git and set the directory layout as
> specified in the client (this implies --keep-path style semantics).
>
> -git-p4.skipSubmitModTimeCheck
> +git-p4.skipSubmitEdit
>
> - git config [--global] git-p4.skipSubmitModTimeCheck false
> + git config [--global] git-p4.skipSubmitEdit false
>
> -If true, submit will not check if the p4 change template has been modified.
> +Normally, git-p4 invokes an editor after each commit is applied so
> +that you can make changes to the submit message. Setting this
> +variable to true will skip the editing step, submitting the change as is.
> +
> +git-p4.skipSubmitEditCheck
> +
> + git config [--global] git-p4.skipSubmitEditCheck false
> +
> +After the editor is invoked, git-p4 normally makes sure you saved the
> +change description, as an indication that you did indeed read it over
> +and edit it. You can quit without saving to abort the submit (or skip
> +this change and continue). Setting this variable to true will cause
> +git-p4 not to check if you saved the change description. This variable
> +only matters if git-p4.skipSubmitEdit has not been set to true.
>
> git-p4.preserveUser
>
> diff --git a/t/t9804-skip-submit-edit.sh b/t/t9804-skip-submit-edit.sh
> new file mode 100755
> index 0000000..734ccf2
> --- /dev/null
> +++ b/t/t9804-skip-submit-edit.sh
> @@ -0,0 +1,82 @@
> +#!/bin/sh
> +
> +test_description='git-p4 skipSubmitEdit config variables'
> +
> +. ./lib-git-p4.sh
> +
> +test_expect_success 'start p4d' '
> + start_p4d
> +'
> +
> +test_expect_success 'init depot' '
> + (
> + cd "$cli" &&
> + echo file1 >file1 &&
> + p4 add file1 &&
> + p4 submit -d "change 1"
> + )
> +'
> +
> +# this works because EDITOR is set to :
> +test_expect_success 'no config, unedited, say yes' '
> + "$GITP4" clone --dest="$git" //depot &&
> + test_when_finished cleanup_git &&
> + (
> + cd "$git" &&
> + echo line >>file1 &&
> + git commit -a -m "change 2" &&
> + echo y | "$GITP4" submit &&
> + p4 changes //depot/... >wc &&
> + test_line_count = 2 wc
> + )
> +'
> +
> +test_expect_success 'no config, unedited, say no' '
> + "$GITP4" clone --dest="$git" //depot &&
> + test_when_finished cleanup_git &&
> + (
> + cd "$git" &&
> + echo line >>file1 &&
> + git commit -a -m "change 3 (not really)" &&
> + printf "bad response\nn\n" | "$GITP4" submit
> + p4 changes //depot/... >wc &&
> + test_line_count = 2 wc
> + )
> +'
> +
> +test_expect_success 'skipSubmitEdit' '
> + "$GITP4" clone --dest="$git" //depot &&
> + test_when_finished cleanup_git &&
> + (
> + cd "$git" &&
> + git config git-p4.skipSubmitEdit true &&
> + # will fail if editor is even invoked
> + git config core.editor /bin/false &&
> + echo line >>file1 &&
> + git commit -a -m "change 3" &&
> + "$GITP4" submit &&
> + p4 changes //depot/... >wc &&
> + test_line_count = 3 wc
> + )
> +'
> +
> +test_expect_success 'skipSubmitEditCheck' '
> + "$GITP4" clone --dest="$git" //depot &&
> + test_when_finished cleanup_git &&
> + (
> + cd "$git" &&
> + git config git-p4.skipSubmitEditCheck true &&
> + echo line >>file1 &&
> + git commit -a -m "change 4" &&
> + "$GITP4" submit &&
> + p4 changes //depot/... >wc &&
> + test_line_count = 4 wc
> + )
> +'
> +
> +
> +test_expect_success 'kill p4d' '
> + kill_p4d
> +'
> +
> +test_done
--
Alex Linden Levy
Senior Software Engineer
MobiTV, Inc.
6425 Christie Avenue, 5th Floor, Emeryville, CA 94608
phone 510.450.5190 mobile 720.352.8394
email alevy@mobitv.com web www.mobitv.com
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: What's cooking in git.git (Oct 2011, #06; Tue, 18)
From: Junio C Hamano @ 2011-10-18 16:53 UTC (permalink / raw)
To: Phil Hord; +Cc: git
In-Reply-To: <CABURp0po3C9-a4_cGm8gq71=gq2ELzHWBK0y7H=OEcY1=DUdsw@mail.gmail.com>
Phil Hord <phil.hord@gmail.com> writes:
> On Tue, Oct 18, 2011 at 3:50 AM, Junio C Hamano <gitster@pobox.com> wrote:
>> What's cooking in git.git (Oct 2011, #06; Tue, 18)
>> --------------------------------------------------
> [...]
>> * ph/transport-with-gitfile (2011-10-11) 5 commits
>> (merged to 'next' on 2011-10-12 at 6d58417)
>> + Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
>> (merged to 'next' on 2011-10-06 at 891b8b6)
>> + Add test showing git-fetch groks gitfiles
>> + Teach transport about the gitfile mechanism
>> + Learn to handle gitfiles in enter_repo
>> + enter_repo: do not modify input
>>
>> Will merge to 'master' in the fifth wave.
>
> Do you want a re-roll of this with your is_bundle() changes added in?
> I do like them better.
Hmm, you may be right. I'll try to queue an update on top of the series
and see what happens.
Thanks.
^ permalink raw reply
* [PATCH] inet_ntop.c: Work around GCC 4.6's detection of uninitialized variables
From: Sebastian Schuberth @ 2011-10-18 16:25 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano, mschub
GCC 4.6 claims that
error: 'best.len' may be used uninitialized in this function
so silence that warning which is treated as an error by also initializing
the "len" members of the struct.
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
---
compat/inet_ntop.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/compat/inet_ntop.c b/compat/inet_ntop.c
index ea249c6..60b5a1d 100644
--- a/compat/inet_ntop.c
+++ b/compat/inet_ntop.c
@@ -98,7 +98,9 @@ inet_ntop6(const u_char *src, char *dst, size_t size)
for (i = 0; i < NS_IN6ADDRSZ; i++)
words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
best.base = -1;
+ best.len = 0;
cur.base = -1;
+ cur.len = 0;
for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) {
if (words[i] == 0) {
if (cur.base == -1)
--
1.7.7.msysgit.1
^ permalink raw reply related
* Re: Compiling on Windows
From: Sebastian Schuberth @ 2011-10-18 16:07 UTC (permalink / raw)
To: kusmabite; +Cc: Andrew Ardill, Frans Klaver, git
In-Reply-To: <CABPQNSZhWOa5wken4vh6Hcza8EM4VnekE3VUFJNmaEJvWME=ew@mail.gmail.com>
On 18.10.2011 16:02, Erik Faye-Lund wrote:
>> there. Foolishly, I had glossed over the msysgit installers on the
>> project home (I think I thought they were Git for Windows installers).
>
> Yeah, the installer sets up a fully self-contained MSYS-based
> development environment to hack on Git for Windows.
I keep advertizing my mingwGitDevEnv [1] project which aims to become an alternative to the current msysGit net installer [2]. The advantage of mingwGitDevEnv will be that it comes with an mingw-get based environment, i.e. you can very easily update / add new MinGW / MSYS tools directly from upstream.
Just today I reached a state were mingwGitDevEnv can successfully build git.exe, but git-gui etc. are still missing due to a lack of mingw-get compatible Tcl/Tk packages.
[1] https://github.com/sschuberth/mingwGitDevEnv
[2] http://msysgit.googlecode.com/files/msysGit-netinstall-1.7.7-preview20111014.exe
--
Sebastian Schuberth
^ permalink raw reply
* Re: [PATCH 3/3] completion: match ctags symbol names in grep patterns
From: Jeff King @ 2011-10-18 15:04 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vd3duixdg.fsf@alter.siamese.dyndns.org>
On Tue, Oct 18, 2011 at 12:15:23AM -0700, Junio C Hamano wrote:
> > It's debatable whether this belongs in the generic completion code, as
> > it really only works if your project uses ctags. But I find it to be a
> > huge timesaver for finding callsites of functions, especially when
> > coupled with "git jump grep" from the previous patch.
>
> Could you elaborate a bit more on how this would help for finding
> callsites? You are looking at a function and do not want to break its
> callers, so at that point presumably you already know the name of the
> function, no?
>
> Ahh, Ok, you do not necessarily want to type the long function name.
Exactly. Actually, it is often not so much "do not want to type" as
"cannot remember the exact name", but the effect is the same. :)
I use the same completion for "vim -t" which will jump to the
definition.
> By the way, I notice that "make tags" runs "find ." looking for any files
> and directories that match "*.[hcS]" (so do $(ETAGS_TARGET) and cscope),
> without even excluding .git metadirectory.
>
> Perhaps something like this is in order?
> [...]
> +FIND_SOURCE_FILES = git ls-files '*.[hcS]'
Makes sense to me. I doubt it matters much in practice, though, as we
don't tend to have random untracked source files lying around.
My version of ctags will actually do the recursion itself with "ctags
-R", picking out any files with with languages it knows about. But maybe
not all versions do that.
Also, I have often found myself trying to do completion on shell
functions. I wonder if it's worth adding them to the list (again, my
version of ctags understands bourne shell just fine, but I don't know if
all do).
-Peff
^ permalink raw reply
* Re: What's cooking in git.git (Oct 2011, #06; Tue, 18)
From: Phil Hord @ 2011-10-18 14:09 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7vzkgyhh6n.fsf@alter.siamese.dyndns.org>
On Tue, Oct 18, 2011 at 3:50 AM, Junio C Hamano <gitster@pobox.com> wrote:
> What's cooking in git.git (Oct 2011, #06; Tue, 18)
> --------------------------------------------------
[...]
> * ph/transport-with-gitfile (2011-10-11) 5 commits
> (merged to 'next' on 2011-10-12 at 6d58417)
> + Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
> (merged to 'next' on 2011-10-06 at 891b8b6)
> + Add test showing git-fetch groks gitfiles
> + Teach transport about the gitfile mechanism
> + Learn to handle gitfiles in enter_repo
> + enter_repo: do not modify input
>
> Will merge to 'master' in the fifth wave.
Do you want a re-roll of this with your is_bundle() changes added in?
I do like them better.
Phil
^ permalink raw reply
* Re: Compiling on Windows
From: Erik Faye-Lund @ 2011-10-18 14:02 UTC (permalink / raw)
To: Andrew Ardill; +Cc: Frans Klaver, git
In-Reply-To: <CAH5451=VPzkFZyyUUdj+=dXDCHKQbWTTob_=JJFBCwaDsp1n7Q@mail.gmail.com>
On Tue, Oct 18, 2011 at 8:17 AM, Andrew Ardill <andrew.ardill@gmail.com> wrote:
> Thanks for the replies all - I think my main issue was that the wiki
> is down and msysgit has very little use-able documentation otherwise.
> I had cloned the msysgit project, but was lost on what to do from
> there. Foolishly, I had glossed over the msysgit installers on the
> project home (I think I thought they were Git for Windows installers).
>
Yeah, the installer sets up a fully self-contained MSYS-based
development environment to hack on Git for Windows.
> I have now installed everything, and am ready to hack. Perhaps the
> first port of call is adding a README to msysgit :D
Not at all a bad idea!
It'd be awesome if it even worked with the GitHub markup-stuff as
well, since we moved the project there :)
^ permalink raw reply
* Re: [GUILT] handle branches with slashes in guilt-graph
From: Jeff Sipek @ 2011-10-18 13:30 UTC (permalink / raw)
To: Per Cederqvist; +Cc: git, ceder
In-Reply-To: <4E9D57BB.2030707@opera.com>
On Tue, Oct 18, 2011 at 12:40:59PM +0200, Per Cederqvist wrote:
> Avoid sed errors when the branch name contains a slash.
Makes sense. I'll test it and add it to my patch queue.
Thanks,
Jeff.
> Signed-off-by: Per Cederqvist <cederp@opera.com>
>
> --- /usr/bin/guilt-graph~ 2011-01-25 20:15:50.000000000 +0100
> +++ /usr/bin/guilt-graph 2011-10-18 12:30:31.000000000 +0200
> @@ -37,9 +37,10 @@ disp "digraph G {"
>
> current="$top"
>
> +safebranch=`echo "$branch"|sed 's%/%\\\\/%g'`
> while [ "$current" != "$base" ]; do
> pname=`git show-ref | sed -n -e "
> -/^$current refs\/patches\/$branch/ {
> +/^$current refs\/patches\/$safebranch/ {
> s,^$current refs/patches/$branch/,,
> p
> q
--
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)
^ permalink raw reply
* Problems after deleting submodule
From: Howard Miller @ 2011-10-18 11:54 UTC (permalink / raw)
To: git
I included a submodule in my project then decided I didn't like
submodules and deleted it again. I followed the advice of delting
.gitmodules, the bit from .git/config and then git rm'ing the
submodule. Seemed to work. I then copied files with the same directory
name into where the submodule was. However, I can't add them.
Doing git add /path/to/old/submodule - does nothing, files are not
staged, no error messages no nothing.
If I try to git rm /path/to/old/submodule - it just says 'did not
match any files'.
It simply does not seem to want to add anything to the old submodule
location. I had a grep around and could not see any obvious references
in the repo.
I'm a bit stuck... any suggestions for things I can try much appreciated.
^ permalink raw reply
* Repo seems broken after deleting submodule
From: Howard Miller @ 2011-10-18 11:05 UTC (permalink / raw)
To: git
I included a submodule in my project then decided I didn't like
submodules and deleted it again. I followed the advice of delting
.gitmodules, the bit from .git/config and then git rm'ing the
submodule. Seemed to work. I then copied files with the same directory
name into where the submodule was. However, I can't add them.
Doing git add /path/to/old/submodule - does nothing, files are not
staged, no error messages no nothing.
If I try to git rm /path/to/old/submodule - it just says 'did not
match any files'.
I'm a bit stuck... any suggestions for things I can try much appreciated.
^ permalink raw reply
* [GUILT] handle branches with slashes in guilt-graph
From: Per Cederqvist @ 2011-10-18 10:40 UTC (permalink / raw)
To: Jeff Sipek; +Cc: git, ceder
Avoid sed errors when the branch name contains a slash.
Signed-off-by: Per Cederqvist <cederp@opera.com>
--- /usr/bin/guilt-graph~ 2011-01-25 20:15:50.000000000 +0100
+++ /usr/bin/guilt-graph 2011-10-18 12:30:31.000000000 +0200
@@ -37,9 +37,10 @@ disp "digraph G {"
current="$top"
+safebranch=`echo "$branch"|sed 's%/%\\\\/%g'`
while [ "$current" != "$base" ]; do
pname=`git show-ref | sed -n -e "
-/^$current refs\/patches\/$branch/ {
+/^$current refs\/patches\/$safebranch/ {
s,^$current refs/patches/$branch/,,
p
q
^ permalink raw reply
* Re: [PATCH 2/2] gitweb: add a feature to show side-by-side diff
From: Jakub Narebski @ 2011-10-18 10:36 UTC (permalink / raw)
To: Kato Kazuyoshi; +Cc: git, Jakub Narebski
In-Reply-To: <m34nz771mj.fsf@localhost.localdomain>
Jakub Narebski <jnareb@gmail.com> writes:
> Kato Kazuyoshi <kato.kazuyoshi@gmail.com> writes:
>
> > gitweb currently has a feature to show diff but it doesn't support
> > "side-by-side" style. This modification introduces:
> >
> > * The "ds" query parameter to specify the style of diff.
> > * The format_diff_chunk() to reorganize an output of diff.
> > * The diff_nav() for form.
>
> I would state it a bit differently.
>
> I would say that this patch introduces support for side-by-side diff
> in git_patchset_body, and that style of diff is controlled by newly
> introduces 'diff_style' ("ds") parameter.
>
> I would say a bit later that navigation bar got extended to make it
> easy to switch between 'inline' and 'sidebyside' diff.
I think it would be good idea to explain algorithm here, and perhaps
also layout used.
When I was thinking about implementing side-by-side diff in gitweb, I
was always stopped by the problem of aligning changes. In your
solution changes are always aligned to top, which is a simple
solution.
> > +sub format_diff_chunk {
> > + my @chunk = @_;
> > +
> > + my $first_class = $chunk[0]->[0];
> > + my @partial = map { $_->[1] } grep { $_->[0] eq $first_class } @chunk;
> > +
> > + if (scalar @partial < scalar @chunk) {
> > + return join '', ("<div class='chunk'><div class='old'>",
> > + @partial,
> > + "</div>",
> > + "<div class='new'>",
> > + (map {
> > + $_->[1];
> > + } @chunk[scalar @partial..scalar @chunk-1]),
> > + "</div></div>");
> > + } else {
> > + return join '', ("<div class='chunk'><div class='",
> > + ($first_class eq 'add' ? 'new' : 'old'),
> > + "'>",
> > + @partial,
> > + "</div></div>");
> > + }
> > +}
This is I think unnecessary complicated. What you do here is
separating removed and added lines (either can be empty), and putting
removed on left (as "old"), and added on right (as "new").
It means that the following unified diff:
--- a/foo
+++ b/foo
@@ -1,5 +1,4 @@
-foo
-FOO
bar
-baz
+b
+baZ
quux
would be turned into following side by side diff:
foo |
FOO |
bar | bar
baz | b
| baZ
quux | quux
It's a bit strange that context is put line by line, and changed lines
are put in "blocks".
> > @@ -4940,12 +4967,31 @@ sub git_patchset_body {
> >
> > # the patch itself
> > LINE:
> > + my @chunk;
> > while ($patch_line = <$fd>) {
> > chomp $patch_line;
> >
> > next PATCH if ($patch_line =~ m/^diff /);
> >
> > - print format_diff_line($patch_line, \%from, \%to);
> > + my ($class, $line) = format_diff_line($patch_line, \%from, \%to);
> > + if ($is_inline) {
> > + print $line;
> > + } elsif ($class eq 'add' || $class eq 'rem') {
> > + push @chunk, [ $class, $line ];
> > + } else {
> > + if (@chunk) {
> > + print format_diff_chunk(@chunk);
> > + @chunk = ();
> > + } elsif ($class eq 'chunk_header') {
> > + print $line;
> > + } else {
> > + print '<div class="chunk"><div class="old">',
> > + $line,
> > + '</div><div class="new">',
> > + $line,
> > + '</div></div>';
> > + }
> > + }
Note that your side by side diff wouldn't work for combined diff,
which gitweb supports. You should show 'unified' / 'inline' format
for combined diff (more than one parent / from).
--
Jakub Narębski
^ permalink raw reply
* [PATCH/RFC 3/2 (fixed)] Refactor Git::config_*
From: Jakub Narebski @ 2011-10-18 9:47 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Eric Wong, Cord Seele, Matthieu Moy, git, Cord Seele
In-Reply-To: <201110172347.42568.jnareb@gmail.com>
From: Junio C Hamano <gitster@pobox.com>
There is, especially with addition of Git::config_path(), much code
repetition in the Git::config_* family of subroutines.
Refactor common parts of Git::config(), Git::config_bool(),
Git::config_int() and Git::config_path() into _config_common()
helper method, reducing code duplication.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
Jakub Narebski wrote:
>
> I'll resend amended commit.
Here it is.
perl/Git.pm | 74 ++++++++++++++--------------------------------------------
1 files changed, 18 insertions(+), 56 deletions(-)
diff --git a/perl/Git.pm b/perl/Git.pm
index c775b4f..8e1e2fd 100644
--- a/perl/Git.pm
+++ b/perl/Git.pm
@@ -576,24 +576,7 @@ This currently wraps command('config') so it is not so fast.
sub config {
my ($self, $var) = _maybe_self(@_);
-
- try {
- my @cmd = ('config');
- unshift @cmd, $self if $self;
- if (wantarray) {
- return command(@cmd, '--get-all', $var);
- } else {
- return command_oneline(@cmd, '--get', $var);
- }
- } catch Git::Error::Command with {
- my $E = shift;
- if ($E->value() == 1) {
- # Key not found.
- return;
- } else {
- throw $E;
- }
- };
+ return _config_common($self, $var);
}
@@ -609,25 +592,10 @@ This currently wraps command('config') so it is not so fast.
sub config_bool {
my ($self, $var) = _maybe_self(@_);
-
- try {
- my @cmd = ('config', '--bool', '--get', $var);
- unshift @cmd, $self if $self;
- my $val = command_oneline(@cmd);
- return undef unless defined $val;
- return $val eq 'true';
- } catch Git::Error::Command with {
- my $E = shift;
- if ($E->value() == 1) {
- # Key not found.
- return undef;
- } else {
- throw $E;
- }
- };
+ my $val = scalar _config_common($self, $var, {'kind' => '--bool'});
+ return (defined $val && $val eq 'true');
}
-
=item config_path ( VARIABLE )
Retrieve the path configuration C<VARIABLE>. The return value
@@ -639,24 +607,7 @@ This currently wraps command('config') so it is not so fast.
sub config_path {
my ($self, $var) = _maybe_self(@_);
-
- try {
- my @cmd = ('config', '--path');
- unshift @cmd, $self if $self;
- if (wantarray) {
- return command(@cmd, '--get-all', $var);
- } else {
- return command_oneline(@cmd, '--get', $var);
- }
- } catch Git::Error::Command with {
- my $E = shift;
- if ($E->value() == 1) {
- # Key not found.
- return undef;
- } else {
- throw $E;
- }
- };
+ return _config_common($self, $var, {'kind' => '--path'});
}
@@ -705,16 +656,27 @@ This currently wraps command('config') so it is not so fast.
sub config_int {
my ($self, $var) = _maybe_self(@_);
+ return scalar _config_common($self, $var, {'kind' => '--int'});
+}
+
+# Common subroutine to implement bulk of what the config* family of methods
+# do. This curently wraps command('config') so it is not so fast.
+sub _config_common {
+ my ($self, $var, $opts) = @_;
try {
- my @cmd = ('config', '--int', '--get', $var);
+ my @cmd = ('config', $opts->{'kind'} ? $opts->{'kind'} : ());
unshift @cmd, $self if $self;
- return command_oneline(@cmd);
+ if (wantarray) {
+ return command(@cmd, '--get-all', $var);
+ } else {
+ return command_oneline(@cmd, '--get', $var);
+ }
} catch Git::Error::Command with {
my $E = shift;
if ($E->value() == 1) {
# Key not found.
- return undef;
+ return;
} else {
throw $E;
}
--
1.7.6
^ permalink raw reply related
* Re: [PATCH 1/4] git-gui: handle config booleans without value
From: Pat Thoyts @ 2011-10-18 8:25 UTC (permalink / raw)
To: Bert Wesarg; +Cc: git
In-Reply-To: <CAKPyHN3dQ+qWeJtGzigEm=fZe62ZeRW-QGq0jnycKEBVaWn=mA@mail.gmail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
>On Tue, Oct 18, 2011 at 01:13, Pat Thoyts
><patthoyts@users.sourceforge.net> wrote:
>> Bert Wesarg <bert.wesarg@googlemail.com> writes:
>>
>>>When git interprets a config variable without a value as bool it is considered
>>>as true. But git-gui doesn't so until yet.
>>>
>>>The value for boolean configs are also case-insensitive.
>>>
>>>Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>>>---
>>> git-gui.sh | 16 ++++++++++++++--
>>> 1 files changed, 14 insertions(+), 2 deletions(-)
>>>
>>>diff --git a/git-gui.sh b/git-gui.sh
>>>index f897160..d687871 100755
>>>--- a/git-gui.sh
>>>+++ b/git-gui.sh
>>>@@ -299,7 +299,9 @@ proc is_config_true {name} {
>>> global repo_config
>>> if {[catch {set v $repo_config($name)}]} {
>>> return 0
>>>- } elseif {$v eq {true} || $v eq {1} || $v eq {yes}} {
>>>+ }
>>>+ set v [string tolower $v]
>>>+ if {$v eq {} || $v eq {true} || $v eq {1} || $v eq {yes} || $v eq {on}} {
>>> return 1
>>> } else {
>>> return 0
>>
>> This looks ok - we actually have a [string is boolean $v] test we could
>> use eg:
>> if {[string is boolean $v]} {
>> return [expr {$v eq {} ? 1 : !!$v}]
>> }
>> although I'm not sure it gains us much. This would match everything Tcl
>> believes to be a boolean - yes/no, on/off, true/false and 1/0. Without
>> -strict the [string is] test will consider {} to be a boolean.
>>
>>
>>>@@ -310,7 +312,9 @@ proc is_config_false {name} {
>>> global repo_config
>>> if {[catch {set v $repo_config($name)}]} {
>>> return 0
>>>- } elseif {$v eq {false} || $v eq {0} || $v eq {no}} {
>>>+ }
>>>+ set v [string tolower $v]
>>>+ if {$v eq {false} || $v eq {0} || $v eq {no} || $v eq {off}} {
>>> return 1
>>> } else {
>>> return 0
>>>@@ -1060,6 +1064,10 @@ git-version proc _parse_config {arr_name args} {
>>> } else {
>>> set arr($name) $value
>>> }
>>>+ } elseif {[regexp {^([^\n]+)$} $line line name]} {
>>>+ # no value given, but interpreting them as
>>>+ # boolean will be handled as true
>>>+ set arr($name) {}
>>> }
>>> }
>>> }
>>>@@ -1075,6 +1083,10 @@ git-version proc _parse_config {arr_name args} {
>>> } else {
>>> set arr($name) $value
>>> }
>>>+ } elseif {[regexp {^([^=]+)$} $line line name]} {
>>>+ # no value given, but interpreting them as
>>>+ # boolean will be handled as true
>>>+ set arr($name) {}
>>> }
>>> }
>>> close $fd_rc
>>
>> Is this really how git treats boolean config values? I can't seem to
>> demonstrate that to myself:
>> pat@frog:/opt/src/git-gui$ git config --unset core.xyzzy
>> pat@frog:/opt/src/git-gui$ git config --bool --get core.xyzzy
>> pat@frog:/opt/src/git-gui$ git config --bool core.xyzzy 1
>> pat@frog:/opt/src/git-gui$ git config --bool --get core.xyzzy
>> true
>>
>> I assume I'm using the wrong test for this.
>
>It looks like you can't set it with git-config. But I know, that writing:
>
>[core]
> xyyzy
>
>into the git config file and than calling git config --bool --get
>core.xyzzy, will give you true.
>
>Bert
OK thanks for explaining.
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
^ permalink raw reply
* Re: [PATCH 3/3] git-gui: new config to control staging of untracked files
From: Pat Thoyts @ 2011-10-18 8:24 UTC (permalink / raw)
To: Bert Wesarg; +Cc: Heiko Voigt, git
In-Reply-To: <CAKPyHN2g2aVTB_Q7ZmpjfdznmUmkf=aodDmFEWgq6_KCMQe62w@mail.gmail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
>On Tue, Oct 18, 2011 at 00:51, Pat Thoyts
><patthoyts@users.sourceforge.net> wrote:
>> Heiko Voigt <hvoigt@hvoigt.net> writes:
>>
>>>Hi,
>>>
>>>On Mon, Oct 17, 2011 at 08:47:50PM +0200, Bert Wesarg wrote:
>>>> On Mon, Oct 17, 2011 at 20:34, Heiko Voigt <hvoigt@hvoigt.net> wrote:
>>>> > Here I am wondering whether we have a similar mechanism in git gui like
>>>> > in core git that makes yes,true,1 equivalents (and similar with other
>>>> > values) ?
>>>>
>>>> But it is not only yes,true,1 or no,false,0 its a tristate with the
>>>> third state 'ask'. For booleans, there is such functionality in git
>>>> gui. See is_config_true and is_config_false. Reusing these for this
>>>> tristate wouldn't work. The current check here is indeed very strict
>>>> and should be loosen by at least ignoring the case, surrounding
>>>> spaces, and allow also true/false. But also note, that this variable
>>>> can be set via the Options menu, so you can't mistype it.
>>>
>>>Well if using git config you can ;-). I just wanted to ask whether we
>>>may already have machinery which supports such tristate.
>>>If we do not I think the current "strict" configuration is fine. In most
>>>cases the user will use the gui itself to configure such behavior so
>>>thats no big deal.
>>>If someone needs that it can be added later on.
>>>
>>>Thanks, Heiko
>>>
>>
>> This set of 3 patches looks fine. I was a bit dubious of the new
>> phrasing for the ask condition but it is growing on me. I wonder it it
>> might be worth including the number of untracked files to be staged too
>> eg: "Stage 15 untracked files?"
>>
>> set reply [ask_popup [mc "Stage %d untracked files?" \
>> [llength $untracked_paths]]]
>
>I thought about to list the untracked files in the dialog, but
>couldn't find a good template dialog for this. But the number is
>definitely worth I think.
>
>>
>> Loosening the check we can do using
>> switch -glob -- [get_config gui.stageuntracked] {
>> [Nn]* { set reply 0}
>> [Yy]* { set reply 1}
>> default { ... }
>> }
>
>I think this is too loose ;-)
Heh - I'll add the number in the query dialog and leave the config check
unchanged then.
Thanks for all your work.
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
^ permalink raw reply
* Re: [PATCH] git-gui: fix multi selected file operation
From: Pat Thoyts @ 2011-10-18 8:13 UTC (permalink / raw)
To: Bert Wesarg; +Cc: git
In-Reply-To: <CAKPyHN0NUyd2E0UuJGpWoFNQw8h4kUkqP5Lcz0ywKjFNEgXsqw@mail.gmail.com>
Bert Wesarg <bert.wesarg@googlemail.com> writes:
>On Tue, Oct 18, 2011 at 00:26, Pat Thoyts
><patthoyts@users.sourceforge.net> wrote:
>> Bert Wesarg <bert.wesarg@googlemail.com> writes:
>>
>>>Hi,
>>>
>>>On Sun, Oct 16, 2011 at 00:48, Pat Thoyts
>>><patthoyts@users.sourceforge.net> wrote:
>>>> Bert Wesarg <bert.wesarg@googlemail.com> writes:
>>>>
>>>>>The current path for what we see the diff is not in the list of selected
>>>>>paths. But when we add single paths (with Ctrl) to the set the current path
>>>>>would not be used when the action is performed.
>>>>>
>>>>>Fix this by explicitly putting the path into the list before we start
>>>>>showing the diff.
>>>>>
>>>>>Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
>>>>>---
>>>>> git-gui.sh | 1 +
>>>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>>>
>>>>>diff --git a/git-gui.sh b/git-gui.sh
>>>>>index f897160..e5dd8bc 100755
>>>>>--- a/git-gui.sh
>>>>>+++ b/git-gui.sh
>>>>>@@ -2474,6 +2474,7 @@ proc toggle_or_diff {w x y} {
>>>>> [concat $after [list ui_ready]]
>>>>> }
>>>>> } else {
>>>>>+ set selected_paths($path) 1
>>>>> show_diff $path $w $lno
>>>>> }
>>>>> }
>>>>
>>>> It is not clear what I should be looking for to test this. Can you
>>>> re-write the commit message to be more clear about what you are
>>>> fixing. Is this multiple unstaged files in the staging box? If so I
>>>> don't see what path display is changing.
>>>
>>>Sorry, for this bad description. I will give you a recipe here what to
>>>do to expose the problem. I try later to form this into a new commit
>>>message:
>>>
>>>You have 2 modified, not staged files A and B. Your current view shows
>>>the diff for A. Adding B to the selection via Ctrl+Button1 and than
>>>perform the "Stage To Commit" action from the "Commit" menu results
>>>only in the staging of B.
>>>
>>>Note, using Shift+Button1 (i.e. 'adding a range of files to the
>>>selection') results in the staging of both files A and B.
>>>
>>>Bert
>>
>> Ah ok - that explains things and I can see the issue now. I think
>> something like:
>>
>> "When staging a selection of files using Shift-Click to choose a range
>> of files then using Ctrl-T or the Stage To Commit menu item will stage
>> all the selected files. However if a non-sequential range is selected
>> using Ctrl-Click then only the last name selected gets staged. This
>> commit fixes this to properly stage all selected files by explicitly
>> adding the path to the list before showing the diff."
>
>Thanks for this. A slight, but important, change to the second last sentence:
>
>"...using Ctrl-Click then all but the first name selected gets staged."
>
>Its the first which does not get staged. Ie. that one, which was
>selected just by a Click to view the diff.
>
>Bert
>
Thanks - applied with this change to the message.
--
Pat Thoyts http://www.patthoyts.tk/
PGP fingerprint 2C 6E 98 07 2C 59 C8 97 10 CE 11 E6 04 E0 B9 DD
^ permalink raw reply
* Re: [PATCH 3/3] completion: match ctags symbol names in grep patterns
From: Junio C Hamano @ 2011-10-18 7:55 UTC (permalink / raw)
To: Matthieu Moy; +Cc: Jonathan Nieder, Jeff King, git
In-Reply-To: <vpqpqhug31l.fsf@bauges.imag.fr>
Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:
> Junio C Hamano <gitster@pobox.com> writes:
>
>>>> +git_check = $(shell git ls-files >/dev/null 2>&1; echo $$?)
>>>> +ifeq ($(git_check),0)
>
>> Hmm, how would this punish anybody exactly (I just took the structure
>> from the way how the auto-depend is done)?
>
> The "shell git ls-files" is ran unconditionnally, hence a small
> performance penality even if you don't run ctags.
You mean it is run once whenever you type "make <RETURN>"? Doesn't the
same argument apply for the auto-depend thingy against "make doc<RETURN>"?
^ permalink raw reply
* Re: [PATCH 3/3] completion: match ctags symbol names in grep patterns
From: Jonathan Nieder @ 2011-10-18 7:55 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jeff King, git
In-Reply-To: <7v8voiiwfo.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> Jonathan Nieder <jrnieder@gmail.com> writes:
>> Junio C Hamano wrote:
>>> +git_check = $(shell git ls-files >/dev/null 2>&1; echo $$?)
[...]
>> Neat. I'd prefer something like
[...]
>> that avoid punishing people who were using the makefile for some
>> purpose unrelated to tags and cscope, though. ;)
>
> Hmm, how would this punish anybody exactly (I just took the structure
> from the way how the auto-depend is done)?
As Matthieu mentioned, the code in $(shell ...) gets run once each
time the makefile is loaded, adding to the runtime and possible
failure modes of
make clean
that does not care about the result. The dep_check test has that same
problem, and I was a little nervous about that when we added it. But:
i. it seemed to be worth the convenience
ii. computing whether the compiler supports -MMD once each time $(CC)
is launched would slow enough not to be an option
iii. in the end, most uses of the makefile are to compile something,
anyway, so it is not _that_ much of a waste.
iv. if someone finds the per-make-invocation to be too high, we
could introduce a DONT_COMPUTE_HEADER_DEPENDENCIES variable that
causes the check to be skipped by forcing that particular result.
Great.
In this new tags/cscope example, one could make an argument that
running exactly once is similarly better than running as needed (as in
(ii) above), by pointing out that
make tags TAGS cscope
would have to check for a working "git ls-files" once instead of three
times. But I don't buy it. :)
> Besides, you would need to have the whole thing in a subshell or
> something, as this is used as the upstream to "| xargs".
Good catch, thanks.
^ permalink raw reply
* What's cooking in git.git (Oct 2011, #06; Tue, 18)
From: Junio C Hamano @ 2011-10-18 7:50 UTC (permalink / raw)
To: git
What's cooking in git.git (Oct 2011, #06; Tue, 18)
--------------------------------------------------
Here are the topics that have been cooking. Commits prefixed with '-' are
only in 'pu' (proposed updates) while commits prefixed with '+' are in 'next'.
The fourth batch of topics have graduated to the master branch. This batch
ended up to be mostly fixes, as can be seen in the updates in the RelNotes
file. These topics will be further merged down to the maint branch for the
1.7.7.1 maintenance release.
Here are the repositories that have my integration branches:
With maint, master, next, pu, todo, html and man:
git://git.kernel.org/pub/scm/git/git.git
git://repo.or.cz/alt-git.git
https://code.google.com/p/git-core/
https://github.com/git/git
With only maint, master, html and man:
git://git.sourceforge.jp/gitroot/git-core/git.git
git://git-core.git.sourceforge.net/gitroot/git-core/git-core
With all the topics and integration branches but not todo, html or man:
https://github.com/gitster/git
By the way, I am planning to stop pushing the generated documentation
branches to the above repositories in the near term, as they are not
sources. The only reason the source repository at k.org has hosted these
branches was because it was the only repository over there that was
writable by me; it was an ugly historical and administrative workaround
and not a demonstration of the best practice.
They are pushed to their own separate repositories instead:
git://git.kernel.org/pub/scm/git/git-{htmldocs,manpages}.git/
git://repo.or.cz/git-{htmldocs,manpages}.git/
https://code.google.com/p/git-{htmldocs,manpages}.git/
https://github.com/gitster/git-{htmldocs,manpages}.git/
--------------------------------------------------
[Graduated to "master"]
* bc/attr-ignore-case (2011-10-11) 5 commits
(merged to 'next' on 2011-10-11 at daa6b51)
+ attr.c: respect core.ignorecase when matching attribute patterns
+ attr: read core.attributesfile from git_default_core_config
+ builtin/mv.c: plug miniscule memory leak
+ cleanup: use internal memory allocation wrapper functions everywhere
+ attr.c: avoid inappropriate access to strbuf "buf" member
* ef/mingw-syslog (2011-10-07) 1 commit
(merged to 'next' on 2011-10-11 at d5d6945)
+ mingw: avoid using strbuf in syslog
* jc/checkout-from-tree-keep-local-changes (2011-09-30) 1 commit
(merged to 'next' on 2011-10-06 at 64061aa)
+ checkout $tree $path: do not clobber local changes in $path not in $tree
Originally merged to 'next' on 2011-10-05.
* jk/config-test-cleanup (2011-10-12) 2 commits
(merged to 'next' on 2011-10-12 at 7c857dd)
+ t1300: test mixed-case variable retrieval
+ t1300: put git invocations inside test function
* jk/http-auth (2011-10-15) 6 commits
(merged to 'next' on 2011-10-15 at 2ff0053)
+ http_init: accept separate URL parameter
+ http: use hostname in credential description
+ http: retry authentication failures for all http requests
+ remote-curl: don't retry auth failures with dumb protocol
+ improve httpd auth tests
+ url: decode buffers that are not NUL-terminated
(this branch is tangled with jk/http-auth-keyring and js/cred-macos-x-keychain-2.)
Michael helped resurrecting uncontentious bits from the credential series.
* jk/name-hash-dirent (2011-10-07) 1 commit
(merged to 'next' on 2011-10-11 at e2ea68b)
+ fix phantom untracked files when core.ignorecase is set
* jk/pull-rebase-with-work-tree (2011-10-13) 1 commit
(merged to 'next' on 2011-10-15 at 2707482)
+ pull,rebase: handle GIT_WORK_TREE better
* js/bisect-no-checkout (2011-09-21) 1 commit
(merged to 'next' on 2011-10-06 at 0354e94)
+ bisect: fix exiting when checkout failed in bisect_start()
Originally merged to 'next' on 2011-09-21.
* js/check-ref-format-test-mingw (2011-10-13) 1 commit
(merged to 'next' on 2011-10-15 at fbc2ee6)
+ t1402-check-ref-format: skip tests of refs beginning with slash on Windows
* mm/maint-config-explicit-bool-display (2011-10-10) 1 commit
(merged to 'next' on 2011-10-11 at 795939f)
+ config: display key_delim for config --bool --get-regexp
* ph/push-to-delete-nothing (2011-09-30) 1 commit
(merged to 'next' on 2011-10-06 at 33ac777)
+ receive-pack: don't pass non-existent refs to post-{receive,update} hooks
* sg/completion (2011-10-10) 2 commits
(merged to 'next' on 2011-10-11 at 4724640)
+ completion: unite --format and --pretty for 'log' and 'show'
+ completion: unite --reuse-message and --reedit-message for 'notes'
(this branch is used by sg/complete-refs; uses tm/completion-commit-fixup-squash.)
* tc/fetch-leak (2011-10-07) 1 commit
(merged to 'next' on 2011-10-11 at d867153)
+ fetch: plug two leaks on error exit in store_updated_refs
* tm/completion-commit-fixup-squash (2011-10-06) 2 commits
(merged to 'next' on 2011-10-11 at 6bb192e)
+ completion: commit --fixup and --squash
+ completion: unite --reuse-message and --reedit-message handling
(this branch is used by sg/complete-refs and sg/completion.)
* tm/completion-push-set-upstream (2011-10-06) 1 commit
(merged to 'next' on 2011-10-11 at 85544e5)
+ completion: push --set-upstream
(this branch is used by sg/complete-refs.)
--------------------------------------------------
[New Topics]
* md/smtp-tls-hello-again (2011-10-15) 1 commit
(merged to 'next' on 2011-10-16 at 3e27de4)
+ send-email: Honour SMTP domain when using TLS
Will merge to 'master' soonish.
* pt/mingw-misc-fixes (2011-10-15) 7 commits
(merged to 'next' on 2011-10-16 at 2dc0b55)
+ t9901: fix line-ending dependency on windows
+ mingw: ensure sockets are initialized before calling gethostname
+ mergetools: use the correct tool for Beyond Compare 3 on Windows
+ t9300: do not run --cat-blob-fd related tests on MinGW
+ git-svn: On MSYS, escape and quote SVN_SSH also if set by the user
+ t9001: do not fail only due to CR/LF issues
+ t1020: disable the pwd test on MinGW
Will merge to 'master' soonish.
* pw/p4-update (2011-10-17) 6 commits
(merged to 'next' on 2011-10-17 at f69f6cc)
+ git-p4: handle files with shell metacharacters
+ git-p4: keyword flattening fixes
+ git-p4: stop ignoring apple filetype
+ git-p4: recognize all p4 filetypes
+ git-p4: handle utf16 filetype properly
+ git-p4 tests: refactor and cleanup
Will merge to 'master' in the fifth wave.
* cn/doc-config-bare-subsection (2011-10-16) 1 commit
(merged to 'next' on 2011-10-17 at a6412d4)
+ Documentation: update [section.subsection] to reflect what git does
Will merge to 'master' in the fifth wave.
* cb/daemon-permission-errors (2011-10-17) 2 commits
- daemon: report permission denied error to clients
- daemon: add tests
(this branch uses jk/daemon-msgs.)
The tip commit might be loosening things a bit too much.
Will keep in 'pu' until hearing a convincing argument for the patch.
* cb/httpd-test-fix-port (2011-10-17) 1 commit
(merged to 'next' on 2011-10-17 at 84fb7e6)
+ use test number as port number
Will merge to 'master' soonish.
* jc/verbose-checkout (2011-10-16) 2 commits
- checkout -v: give full status output after switching branches
- checkout: move the local changes report to the end
This is just to leave a record that the reason why we do not do this not
because we are incapable of coding this, but because it is not a good idea
to do this. I suspect people who are new to git that might think they need
it would soon realize the don't.
Will keep in 'pu' as a showcase for a while and then will drop.
* kk/gitweb-side-by-side-diff (2011-10-17) 2 commits
- gitweb: add a feature to show side-by-side diff
- gitweb: change format_diff_line() to remove leading SP from $diff_class
Fun.
Will keep in 'pu' until the planned re-roll comes.
* mh/ref-api-2 (2011-10-17) 14 commits
- resolve_gitlink_ref_recursive(): change to work with struct ref_cache
- Pass a (ref_cache *) to the resolve_gitlink_*() helper functions
- resolve_gitlink_ref(): improve docstring
- get_ref_dir(): change signature
- refs: change signatures of get_packed_refs() and get_loose_refs()
- is_dup_ref(): extract function from sort_ref_array()
- add_ref(): add docstring
- parse_ref_line(): add docstring
- is_refname_available(): remove the "quiet" argument
- clear_ref_array(): rename from free_ref_array()
- refs: rename parameters result -> sha1
- refs: rename "refname" variables
- struct ref_entry: document name member
- cache.h: add comments for git_path() and git_path_submodule()
(this branch uses mh/ref-api.)
Will merge to 'next'.
* po/insn-editor (2011-10-17) 1 commit
- "rebase -i": support special-purpose editor to edit insn sheet
Will merge to 'next'.
* dm/pack-objects-update (2011-10-18) 4 commits
- pack-objects: don't traverse objects unnecessarily
- pack-objects: rewrite add_descendants_to_write_order() iteratively
- pack-objects: use unsigned int for counter and offset values
- pack-objects: mark add_to_write_order() as inline
* jk/git-tricks (2011-10-18) 3 commits
- completion: match ctags symbol names in grep patterns
- contrib: add git-jump script
- contrib: add diff highlight script
* jc/make-tags (2011-10-18) 1 commit
- Makefile: ask "ls-files" to list source files if available
--------------------------------------------------
[Stalled]
* hv/submodule-merge-search (2011-10-13) 4 commits
- submodule.c: make two functions static
- allow multiple calls to submodule merge search for the same path
- push: Don't push a repository with unpushed submodules
- push: teach --recurse-submodules the on-demand option
What the topic aims to achieve may make sense, but the implementation
looked somewhat suboptimal.
The fix-up at the tip queued on fg/submodule-auto-push topic has been
moved to this topic.
* sr/transport-helper-fix-rfc (2011-07-19) 2 commits
- t5800: point out that deleting branches does not work
- t5800: document inability to push new branch with old content
Perhaps 281eee4 (revision: keep track of the end-user input from the
command line, 2011-08-25) would help.
* rr/revert-cherry-pick (2011-10-12) 7 commits
- revert: further simplify parsing of a line in insn sheet
- revert: Simplify passing command-line arguments around
- revert: Allow mixed pick and revert instructions
- revert: Make commit descriptions in insn sheet optional
- revert: Fix buffer overflow in insn sheet parser
- revert: Simplify getting commit subject
- revert: Free memory after get_message call
Probably needs a little bit more polish, e.g. squashing the tip fixup into
an earlier one in the series.
* jc/signed-commit (2011-10-05) 4 commits
- commit: teach --gpg-sign option
- Split GPG interface into its own helper library
- rename "match_refs()" to "match_push_refs()"
- send-pack: typofix error message
This is to replace the earlier "signed push" experiments. "verify-tag"
equivalent needs to be written before this can proceed. I suspect that
teaching "verify-tag" to notice and also handle signed commits would be
the easiest, but "git tag --verify $commit" might look slightly funny
from the UI POV. I dunno.
* jc/lookup-object-hash (2011-08-11) 6 commits
- object hash: replace linear probing with 4-way cuckoo hashing
- object hash: we know the table size is a power of two
- object hash: next_size() helper for readability
- pack-objects --count-only
- object.c: remove duplicated code for object hashing
- object.c: code movement for readability
I do not think there is anything fundamentally wrong with this series, but
the risk of breakage far outweighs observed performance gain in one
particular workload.
--------------------------------------------------
[Cooking]
* mh/ref-api (2011-10-16) 7 commits
(merged to 'next' on 2011-10-17 at 219000f)
+ clear_ref_cache(): inline function
+ write_ref_sha1(): only invalidate the loose ref cache
+ clear_ref_cache(): extract two new functions
+ clear_ref_cache(): rename parameter
+ invalidate_ref_cache(): expose this function in the refs API
+ invalidate_ref_cache(): take the submodule as parameter
+ invalidate_ref_cache(): rename function from invalidate_cached_refs()
(this branch is used by mh/ref-api-2.)
Will merge to 'master' in the sixth wave.
* jn/gitweb-manpages (2011-10-16) 5 commits
(merged to 'next' on 2011-10-16 at 6555a07)
+ gitweb: Add gitweb manpages to 'gitweb' package in git.spec
+ Documentation: Add gitweb config variables to git-config(1)
+ Documentation: Link to gitweb(1) and gitweb.conf(5) in other manpages
+ gitweb: Add gitweb(1) manpage for gitweb itself
+ gitweb: Add gitweb.conf(5) manpage for gitweb configuration files
Will merge to 'master' soonish.
* jm/maint-apply-detects-corrupt-patch-header (2011-10-12) 1 commit
(merged to 'next' on 2011-10-12 at 80d9503)
+ fix "git apply --index ..." not to deref NULL
Will merge to 'master' soonish.
* bk/submodule-in-recursive-merge (2011-10-13) 2 commits
(merged to 'next' on 2011-10-15 at e02205c)
+ submodule: Search for merges only at end of recursive merge
+ submodule: Demonstrate known breakage during recursive merge
Brad helped resurrecting good bits earlier tangled in the stalled topic
hv/submodule-merge-search by mistake.
Will merge to 'master' soonish.
* sg/complete-refs (2011-10-15) 10 commits
- completion: remove broken dead code from __git_heads() and __git_tags()
- completion: fast initial completion for config 'remote.*.fetch' value
- completion: improve ls-remote output filtering in __git_refs_remotes()
- completion: query only refs/heads/ in __git_refs_remotes()
- completion: support full refs from remote repositories
- completion: improve ls-remote output filtering in __git_refs()
- completion: make refs completion consistent for local and remote repos
- completion: optimize refs completion
- completion: document __gitcomp()
- Merge branches 'tm/completion-push-set-upstream', 'tm/completion-commit-fixup-squash' and 'sg/completion' into HEAD
Rerolled.
Will keep in 'pu' until an Ack or two from people who have worked on the
completion in the past comes.
* jc/unseekable-bundle (2011-10-13) 2 commits
- bundle: add parse_bundle_header() helper function
- bundle: allowing to read from an unseekable fd
I am not entirely happy with the first patch but it is not so bad either.
Will merge to 'next'.
* jk/daemon-msgs (2011-10-15) 1 commit
(merged to 'next' on 2011-10-15 at 415cf53)
+ daemon: give friendlier error messages to clients
(this branch is used by cb/daemon-permission-errors.)
Will merge to 'master' in the fifth wave.
* jk/maint-pack-objects-compete-with-delete (2011-10-14) 2 commits
(merged to 'next' on 2011-10-15 at 49479e4)
+ downgrade "packfile cannot be accessed" errors to warnings
+ pack-objects: protect against disappearing packs
Will merge to 'master' in the fifth wave.
* cn/fetch-prune (2011-10-15) 5 commits
(merged to 'next' on 2011-10-16 at 02a449e)
+ fetch: treat --tags like refs/tags/*:refs/tags/* when pruning
+ fetch: honor the user-provided refspecs when pruning refs
+ remote: separate out the remote_find_tracking logic into query_refspecs
+ t5510: add tests for fetch --prune
+ fetch: free all the additional refspecs
Will merge to 'master' in the sixth wave.
* js/merge-edit-option (2011-10-12) 1 commit
(merged to 'next' on 2011-10-12 at db28da3)
+ Teach merge the '[-e|--edit]' option
Will merge to 'master' in the fifth wave.
* rs/diff-whole-function (2011-10-10) 2 commits
(merged to 'next' on 2011-10-11 at 6196752)
+ diff: add option to show whole functions as context
+ xdiff: factor out get_func_line()
Will merge to 'master' in the fifth wave.
* rs/pickaxe (2011-10-07) 7 commits
(merged to 'next' on 2011-10-11 at 27d02b2)
+ pickaxe: factor out pickaxe
+ pickaxe: give diff_grep the same signature as has_changes
+ pickaxe: pass diff_options to contains and has_changes
+ pickaxe: factor out has_changes
+ pickaxe: plug regex/kws leak
+ pickaxe: plug regex leak
+ pickaxe: plug diff filespec leak with empty needle
Will merge to 'master' in the fifth wave.
* sc/difftool-skip (2011-10-14) 2 commits
(merged to 'next' on 2011-10-14 at b91c581)
+ t7800: avoid arithmetic expansion notation
(merged to 'next' on 2011-10-11 at 38d7e84)
+ git-difftool: allow skipping file by typing 'n' at prompt
Will merge to 'master' in the fifth wave.
* jc/check-ref-format-fixup (2011-10-12) 2 commits
(merged to 'next' on 2011-10-15 at 8e89bc5)
+ Restrict ref-like names immediately below $GIT_DIR
+ refs.c: move dwim_ref()/dwim_log() from sha1_name.c
An attempt to fix-up unfortunate side effect of mh/check-ref-format-3
topic. "git show -s config" is never meant to refer to $GIT_DIR/config
and treat it as a file that records an object name.
Will merge to 'master' soonish so that we can have enough time to deal
with possible fall-outs.
* jc/maint-remove-renamed-ref (2011-10-12) 1 commit
(merged to 'next' on 2011-10-12 at 819c3e4)
+ branch -m/-M: remove undocumented RENAMED-REF
Will merge to 'master' in the sixth wave.
* js/no-cherry-pick-head-after-punted (2011-10-06) 1 commit
(merged to 'next' on 2011-10-10 at acb29ee)
+ Merge branch 'js/maint-no-cherry-pick-head-after-punted' into js/no-cherry-pick-head-after-punted
(this branch uses js/maint-no-cherry-pick-head-after-punted.)
Will merge to 'master' in the fifth wave.
* js/maint-no-cherry-pick-head-after-punted (2011-10-06) 2 commits
+ cherry-pick: do not give irrelevant advice when cherry-pick punted
+ revert.c: defer writing CHERRY_PICK_HEAD till it is safe to do so
(this branch is used by js/no-cherry-pick-head-after-punted.)
Will merge to 'maint' later.
* js/log-show-children (2011-10-04) 1 commit
(merged to 'next' on 2011-10-06 at de8f6f2)
+ log --children
Will merge to 'master' in the fifth wave.
* ph/transport-with-gitfile (2011-10-11) 5 commits
(merged to 'next' on 2011-10-12 at 6d58417)
+ Fix is_gitfile() for files too small or larger than PATH_MAX to be a gitfile
(merged to 'next' on 2011-10-06 at 891b8b6)
+ Add test showing git-fetch groks gitfiles
+ Teach transport about the gitfile mechanism
+ Learn to handle gitfiles in enter_repo
+ enter_repo: do not modify input
Will merge to 'master' in the fifth wave.
* jc/request-pull-show-head-4 (2011-10-15) 11 commits
(merged to 'next' on 2011-10-15 at 7e340ff)
+ fmt-merge-msg.c: Fix an "dubious one-bit signed bitfield" sparse error
(merged to 'next' on 2011-10-10 at 092175e)
+ environment.c: Fix an sparse "symbol not declared" warning
+ builtin/log.c: Fix an "Using plain integer as NULL pointer" warning
(merged to 'next' on 2011-10-07 at fcaeca0)
+ fmt-merge-msg: use branch.$name.description
(merged to 'next' on 2011-10-06 at fa5e0fe)
+ request-pull: use the branch description
+ request-pull: state what commit to expect
+ request-pull: modernize style
+ branch: teach --edit-description option
+ format-patch: use branch description in cover letter
+ branch: add read_branch_desc() helper function
+ Merge branch 'bk/ancestry-path' into jc/branch-desc
Will merge to 'master' in the sixth wave.
--------------------------------------------------
[Discarded]
* jk/http-auth-keyring (2011-10-12) 19 commits
. http_init: accept separate URL parameter
. credential-cache: don't cache items without context
. check_expirations: don't copy over same element
. t0300: add missing EOF terminator for <<
. credential-store: use a better storage format
. t0300: make alternate username tests more robust
. t0300: make askpass tests a little more robust
. credential-cache: fix expiration calculation corner cases
. docs: minor tweaks to credentials API
. credentials: make credential_fill_gently() static
. credentials: add "getpass" helper
. credentials: add "store" helper
. credentials: add "cache" helper
. docs: end-user documentation for the credential subsystem
. http: use hostname in credential description
. allow the user to configure credential helpers
. look for credentials in config before prompting
. http: use credential API to get passwords
. introduce credentials API
(this branch is used by js/cred-macos-x-keychain-2.)
Discarded without prejudice to allow design level discussions to continue.
Expecting a re-roll based on jk/http-auth
* js/cred-macos-x-keychain-2 (2011-10-12) 1 commit
. contrib: add a pair of credential helpers for Mac OS X's keychain
(this branch uses jk/http-auth-keyring.)
Discarded without prejudice to allow design level discussions to continue.
Expecting a re-roll based on jk/http-auth
^ permalink raw reply
* Re: [PATCH 3/3] completion: match ctags symbol names in grep patterns
From: Matthieu Moy @ 2011-10-18 7:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Jonathan Nieder, Jeff King, git
In-Reply-To: <7v8voiiwfo.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
>>> +git_check = $(shell git ls-files >/dev/null 2>&1; echo $$?)
>>> +ifeq ($(git_check),0)
> Hmm, how would this punish anybody exactly (I just took the structure
> from the way how the auto-depend is done)?
The "shell git ls-files" is ran unconditionnally, hence a small
performance penality even if you don't run ctags.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox