zsh-workers
 help / color / mirror / code / Atom feed
* _git commit object name completion
@ 2015-05-19  1:38 Daniel Shahaf
  2015-05-19  4:40 ` Bart Schaefer
  2015-05-19  8:27 ` Daniel Hahler
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Shahaf @ 2015-05-19  1:38 UTC (permalink / raw)
  To: zsh-workers

I am seeing an issues with the new __git_commit_objects completion.

In 'zsh -f':

% autoload compinit; compinit
% git reflog --all
ebca657 refs/heads/master@{0}: reset: moving to HEAD^
f82ecfc refs/heads/master@{1}: commit: m
ebca657 refs/heads/master@{2}: commit (initial): m
% git checkout f<TAB><TAB><TAB>
f82ecfc  -- [f82ecfc] m (3 minutes ago)

I expected 'f82ecfc' to be added to the command-line immediately, as
it's the only completion.  Instead, I only get the list of possible
completions and the buffer remains unmodified, no matter how many times
I press <TAB>.

Further information:

- That's in a new repository with just two commits in it: ebca657 is the root
  and f82ecfc has ebca657 as its parent, and HEAD is ebca657.

- At one point I saw _two_ suggested completions:
    f82ecfc  -- [f82ecfc] m (88 seconds ago)
    f82ecfc  -- [f82ecfc] m (89 seconds ago)

Using master, revision ff190946690b5e770721462b706029559c0f9587.

Daniel


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-05-19  1:38 _git commit object name completion Daniel Shahaf
@ 2015-05-19  4:40 ` Bart Schaefer
  2015-05-19  7:13   ` Daniel Hahler
  2015-05-19  8:27 ` Daniel Hahler
  1 sibling, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2015-05-19  4:40 UTC (permalink / raw)
  To: zsh-workers

On May 19,  1:38am, Daniel Shahaf wrote:
}
} % git checkout f<TAB><TAB><TAB>
} f82ecfc  -- [f82ecfc] m (3 minutes ago)
} 
} I expected 'f82ecfc' to be added to the command-line immediately, as
} it's the only completion.  Instead, I only get the list of possible
} completions and the buffer remains unmodified, no matter how many times
} I press <TAB>.

I'd make a small wager that this is another effect of workers/35101.  If
you revert 454f079852deb0c704870c7d5a462485f1e65bbf, do you get the result
you expect?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-05-19  4:40 ` Bart Schaefer
@ 2015-05-19  7:13   ` Daniel Hahler
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Hahler @ 2015-05-19  7:13 UTC (permalink / raw)
  To: zsh-workers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19.05.2015 06:40, Bart Schaefer wrote:
> On May 19,  1:38am, Daniel Shahaf wrote:
> }
> } % git checkout f<TAB><TAB><TAB>
> } f82ecfc  -- [f82ecfc] m (3 minutes ago)
> } 
> } I expected 'f82ecfc' to be added to the command-line immediately, as
> } it's the only completion.  Instead, I only get the list of possible
> } completions and the buffer remains unmodified, no matter how many times
> } I press <TAB>.
> 
> I'd make a small wager that this is another effect of workers/35101.  If
> you revert 454f079852deb0c704870c7d5a462485f1e65bbf, do you get the result
> you expect?
> 

Yes, 454f079 also triggered that issue, and it should be fixed by now.

Basically it promoted __git_recent_commits to be used by default, while it was
previously only used for --fixup and --squash.


Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFVWuKwfAK/hT/mPgARArbfAKCTOoPr5ahHhyJopuVRZ7qcVtR4IwCgjebt
AGFXeoX64dJ4a/kks0NrC3Y=
=MRpi
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-05-19  1:38 _git commit object name completion Daniel Shahaf
  2015-05-19  4:40 ` Bart Schaefer
@ 2015-05-19  8:27 ` Daniel Hahler
  2015-06-02 10:18   ` Daniel Shahaf
  1 sibling, 1 reply; 8+ messages in thread
From: Daniel Hahler @ 2015-05-19  8:27 UTC (permalink / raw)
  To: Zsh Hackers' List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 19.05.2015 03:38, Daniel Shahaf wrote:

> - At one point I saw _two_ suggested completions:
>     f82ecfc  -- [f82ecfc] m (88 seconds ago)
>     f82ecfc  -- [f82ecfc] m (89 seconds ago)

That's a "funny" side-effect of it being called twice.

__git_commits gets called through __git_revisions and
 __git_tree_ishs for git-commit.

Should be fixed by 35216, feedback/testing would be welcome on that.


Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFVWvP9fAK/hT/mPgARAm/fAJ9mGrzJeFmG7N7CF6yXfCxdwD0HAwCfeahE
xZeVXuTMKxXUB8rMtE5Ktyg=
=arkv
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-05-19  8:27 ` Daniel Hahler
@ 2015-06-02 10:18   ` Daniel Shahaf
  2015-06-06 19:27     ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Shahaf @ 2015-06-02 10:18 UTC (permalink / raw)
  To: Zsh Hackers' List

Daniel Hahler wrote on Tue, May 19, 2015 at 10:27:41 +0200:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 19.05.2015 03:38, Daniel Shahaf wrote:
> 
> > - At one point I saw _two_ suggested completions:
> >     f82ecfc  -- [f82ecfc] m (88 seconds ago)
> >     f82ecfc  -- [f82ecfc] m (89 seconds ago)
> 
> That's a "funny" side-effect of it being called twice.
> 
> __git_commits gets called through __git_revisions and
>  __git_tree_ishs for git-commit.
> 
> Should be fixed by 35216, feedback/testing would be welcome on that.

I've been using 35216 in my normal build for the past couple of weeks
and haven't noticed anything odd.  Ship it?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-06-02 10:18   ` Daniel Shahaf
@ 2015-06-06 19:27     ` Bart Schaefer
  2015-06-07 22:38       ` Daniel Hahler
  0 siblings, 1 reply; 8+ messages in thread
From: Bart Schaefer @ 2015-06-06 19:27 UTC (permalink / raw)
  To: Zsh Hackers' List

On Jun 2, 10:18am, Daniel Shahaf wrote:
} Subject: Re: _git commit object name completion
}
} Daniel Hahler wrote on Tue, May 19, 2015 at 10:27:41 +0200:
} > 
} > __git_commits gets called through __git_revisions and
} >  __git_tree_ishs for git-commit.
} > 
} > Should be fixed by 35216, feedback/testing would be welcome on that.
} 
} I've been using 35216 in my normal build for the past couple of weeks
} and haven't noticed anything odd.  Ship it?

I would say so.  I thought it was already in.  Definitely now that 5.0.8
is out, it should get committed to be tested adequately.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: _git commit object name completion
  2015-06-06 19:27     ` Bart Schaefer
@ 2015-06-07 22:38       ` Daniel Hahler
  2015-06-11 11:30         ` ChangeLog generation (was: Re: _git commit object name completion) Daniel Shahaf
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Hahler @ 2015-06-07 22:38 UTC (permalink / raw)
  To: Zsh Hackers' List

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 06.06.2015 21:27, Bart Schaefer wrote:
> On Jun 2, 10:18am, Daniel Shahaf wrote:

> } > __git_commits gets called through __git_revisions and
> } >  __git_tree_ishs for git-commit.
> } > 
> } > Should be fixed by 35216, feedback/testing would be welcome on that.
> } 
> } I've been using 35216 in my normal build for the past couple of weeks
> } and haven't noticed anything odd.  Ship it?
> 
> I would say so.  I thought it was already in.  Definitely now that 5.0.8
> is out, it should get committed to be tested adequately.

Pushed as e8cf611.
Thanks for reminding me.

I've created a Vim function to automate the ChangeLog addition:

fun! InsertZshChangelog()
  " Get X-Ref and subject from "git log".
  let gitlog = systemlist("git log --name-only --pretty=format:'%s' -1")
  let [xref, subject] = split(gitlog[0], '^\d\+\zs: ')
  let files = gitlog[1:-1]

  exe "normal! ggO\<C-R>=strftime('%Y-%m-%d')\<CR>  Daniel Hahler  \<zsh@thequod.de>\<CR>\<CR>\<C-V>\<Tab>* \<C-R>=xref\<CR>: \<C-R>=join(files, ', ')\<CR>: \<C-R>=subject\<CR>.\<CR>"
endfun


Regards,
Daniel.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iD8DBQFVdMfVfAK/hT/mPgARAoy7AJ4u8N1InIGXI3RN9+x2AkqIedU6SgCgxWTo
CSUccAzgLj7Lg98VRVDcg84=
=nbcN
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 8+ messages in thread

* ChangeLog generation (was: Re: _git commit object name completion)
  2015-06-07 22:38       ` Daniel Hahler
@ 2015-06-11 11:30         ` Daniel Shahaf
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Shahaf @ 2015-06-11 11:30 UTC (permalink / raw)
  To: Zsh Hackers' List

Daniel Hahler wrote on Mon, Jun 08, 2015 at 00:38:13 +0200:
> I've created a Vim function to automate the ChangeLog addition:

So at least you, me, Bart, Frank, and Mikael each has his own
implementation...

diff --git a/Etc/zsh-development-guide b/Etc/zsh-development-guide
index 7f5266b..d92b724 100644
--- a/Etc/zsh-development-guide
+++ b/Etc/zsh-development-guide
@@ -70,6 +70,19 @@ avoided further changes to our workflow.
    a commit to the master repository. Don't create a separate change for
    this: amend the existing commit in your local repository.
 
+   Several developers use scripts to automate part or all of the ChangeLog
+   workflow:
+
+     Subject: helper script for making ChangeLog entries
+     X-Seq: 33835, 33872, 34912
+     http://www.zsh.org/mla/workers/2014/msg01622.html
+     http://www.zsh.org/mla/workers/2014/msg01659.html
+     http://www.zsh.org/mla/workers/2015/msg00836.html
+
+     Subject: Re: _git commit object name completion
+     X-Seq: 35414
+     http://www.zsh.org/mla/workers/2015/msg01338.html
+
  * Do not merge your private feature branches onto the master branch: a
    linear history without merge commits is simpler to follow (and to
    bisect).

I didn't link to Bart's post in that thread as it doesn't have code in it.

The aforelinked 34912 is broken in the archives in two ways: the
assignment to AUTHOR_NAME on line 3 needs to be double quoted, and the
zsh.org archives don't show the attachments' filenames (or even delimit
the attachments).

I suppose I could throw it on my github account and reference that, but
perhaps those scripts belong somewhere in the zsh repository itself?
(e.g., in Etc/ or a new dir devscripts/ or something).  They don't
really have any use anywhere else, no other project that I know of
embeds ezmlm X-Seq numbers in commit messages.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-06-11 11:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19  1:38 _git commit object name completion Daniel Shahaf
2015-05-19  4:40 ` Bart Schaefer
2015-05-19  7:13   ` Daniel Hahler
2015-05-19  8:27 ` Daniel Hahler
2015-06-02 10:18   ` Daniel Shahaf
2015-06-06 19:27     ` Bart Schaefer
2015-06-07 22:38       ` Daniel Hahler
2015-06-11 11:30         ` ChangeLog generation (was: Re: _git commit object name completion) Daniel Shahaf

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).