unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* nmbug log feature request
@ 2016-09-25 11:00 David Bremner
  2016-09-26 16:32 ` [PATCH] nmbug: Add --no-renames to default log options W. Trevor King
  0 siblings, 1 reply; 4+ messages in thread
From: David Bremner @ 2016-09-25 11:00 UTC (permalink / raw)
  To: notmuch


because nmbug is tracking empty files, it often detects false positives
of renaming, like commit  e473b453a25c

In nmbug log, this is pretty confusing (although in this case, at least
those two changes are semantically related).

commit e473b453a25c072b5df67d834d822121373321f5
Author: David Bremner <david@tethera.net>
Date:   Sun Sep 25 07:54:11 2016 -0300

R100    tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23   tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed

I think it would be better to turn off rename detection completely in
nmbug log.

d

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

* [PATCH] nmbug: Add --no-renames to default log options
  2016-09-25 11:00 nmbug log feature request David Bremner
@ 2016-09-26 16:32 ` W. Trevor King
  2016-09-26 18:46   ` Tomi Ollila
  2016-10-04 10:54   ` David Bremner
  0 siblings, 2 replies; 4+ messages in thread
From: W. Trevor King @ 2016-09-26 16:32 UTC (permalink / raw)
  To: notmuch

Git has supported this since b68ea12e (diff.c: respect diff.renames
config option, 2006-07-07, v1.4.2).  All of our information is in the
paths (the files are empty), so we don't want rename detection.  By
using --no-renames, we get entries like:

  $ nmbug log -- e473b453a2
  commit e473b453a25c072b5df67d834d822121373321f5
  Author: David Bremner <david@tethera.net>
  Date:   Sun Sep 25 07:54:11 2016 -0300

  D       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23
  A       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed

  ...

Instead of the old:

  $ nmbug log -- e473b453a2
  commit e473b453a25c072b5df67d834d822121373321f5
  Author: David Bremner <david@tethera.net>
  Date:   Sun Sep 25 07:54:11 2016 -0300

  R100    tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23   tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed
---
 devel/nmbug/nmbug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug
index 1dd5f14..6febf16 100755
--- a/devel/nmbug/nmbug
+++ b/devel/nmbug/nmbug
@@ -475,7 +475,7 @@ def log(args=()):
     'nmbug log HEAD..@{upstream}'.
     """
     # we don't want output trapping here, because we want the pager.
-    args = ['log', '--name-status'] + list(args)
+    args = ['log', '--name-status', '--no-renames'] + list(args)
     with _git(args=args, expect=(0, 1, -13)) as p:
         p.wait()
 
-- 
2.1.0.60.g85f0837

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

* Re: [PATCH] nmbug: Add --no-renames to default log options
  2016-09-26 16:32 ` [PATCH] nmbug: Add --no-renames to default log options W. Trevor King
@ 2016-09-26 18:46   ` Tomi Ollila
  2016-10-04 10:54   ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: Tomi Ollila @ 2016-09-26 18:46 UTC (permalink / raw)
  To: W. Trevor King, notmuch

On Mon, Sep 26 2016, "W. Trevor King" <wking@tremily.us> wrote:

> Git has supported this since b68ea12e (diff.c: respect diff.renames
> config option, 2006-07-07, v1.4.2).  All of our information is in the
> paths (the files are empty), so we don't want rename detection.  By
> using --no-renames, we get entries like:
>
>   $ nmbug log -- e473b453a2
>   commit e473b453a25c072b5df67d834d822121373321f5
>   Author: David Bremner <david@tethera.net>
>   Date:   Sun Sep 25 07:54:11 2016 -0300
>
>   D       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23
>   A       tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed
>
>   ...
>
> Instead of the old:
>
>   $ nmbug log -- e473b453a2
>   commit e473b453a25c072b5df67d834d822121373321f5
>   Author: David Bremner <david@tethera.net>
>   Date:   Sun Sep 25 07:54:11 2016 -0300
>
>   R100    tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/0.23   tags/1474196252-31700-1-git-send-email-markwalters1009@gmail.com/pushed
> ---

You must have newer git (than 2.8.2) (with smarter rename detection) as I
do not experience this using current nmbug -- also doing

( cd $HOME/.nmbug && exec git log --name-status e473b453a2 )

works as expected (I tried also renaming .gitconfig away w/o effect)

anyway, change looks good; i just cannot test it (fully), the it seems like
it works after change since git log --name-status --no-renames e473b453a2
works too


>  devel/nmbug/nmbug | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/devel/nmbug/nmbug b/devel/nmbug/nmbug
> index 1dd5f14..6febf16 100755
> --- a/devel/nmbug/nmbug
> +++ b/devel/nmbug/nmbug
> @@ -475,7 +475,7 @@ def log(args=()):
>      'nmbug log HEAD..@{upstream}'.
>      """
>      # we don't want output trapping here, because we want the pager.
> -    args = ['log', '--name-status'] + list(args)
> +    args = ['log', '--name-status', '--no-renames'] + list(args)
>      with _git(args=args, expect=(0, 1, -13)) as p:
>          p.wait()
>  
> -- 
> 2.1.0.60.g85f0837
>
> _______________________________________________
> notmuch mailing list
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch

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

* Re: [PATCH] nmbug: Add --no-renames to default log options
  2016-09-26 16:32 ` [PATCH] nmbug: Add --no-renames to default log options W. Trevor King
  2016-09-26 18:46   ` Tomi Ollila
@ 2016-10-04 10:54   ` David Bremner
  1 sibling, 0 replies; 4+ messages in thread
From: David Bremner @ 2016-10-04 10:54 UTC (permalink / raw)
  To: W. Trevor King, notmuch

"W. Trevor King" <wking@tremily.us> writes:

> Git has supported this since b68ea12e (diff.c: respect diff.renames
> config option, 2006-07-07, v1.4.2).  All of our information is in the
> paths (the files are empty), so we don't want rename detection.  By
> using --no-renames, we get entries like:

pushed to master

d

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

end of thread, other threads:[~2016-10-04 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-25 11:00 nmbug log feature request David Bremner
2016-09-26 16:32 ` [PATCH] nmbug: Add --no-renames to default log options W. Trevor King
2016-09-26 18:46   ` Tomi Ollila
2016-10-04 10:54   ` David Bremner

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

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).