Re: [problem with name-rev] (was: git log --graph with a sort of local revision number)

2019-08-20 Thread Rafael Ascensão
2) Make a tag to the commit you want to reference. Cheers, Rafael Ascensão

Re: git log --graph with a sort of local revision number

2019-08-18 Thread Rafael Ascensão
You can achieve something close (on small repos, more on that later) with: $ git log --graph --color \ --format='%C(auto)changeset: %h:%H%nuser: %an%ndate: %ad%nsummary: %s%n' \ | git name-rev --refs=$(git rev-parse --abbrev-ref HEAD) --name-only --stdin * changeset: 5fa0f52

Re: [bug?] clean: Demonstrate failure when used with paths

2019-06-03 Thread Rafael Ascensão
I missed this RFC series which fixes this and others issues: https://public-inbox.org/git/20180405173446.32372-1-new...@gmail.com Cheers, Rafael Ascensão

[bug?] clean: Demonstrate failure when used with paths

2019-05-31 Thread Rafael Ascensão
--- Yesterday on #git, an user reported the following behaviour of git clean: $ git init $ mkdir foo $ touch a.txt b.txt bar.txt foo/qux.txt $ git clean -f bar.txt foo/qux.txt Removing bar.txt Where the behaviour they expected would be: $ git clean -f bar.txt foo/qux.tx

Re: [PATCH] In `git log --graph`, default to --pretty=oneline --abbrev-commit

2019-03-24 Thread Rafael Ascensão
mine which format should be used with --graph. This would still require user configuration which may be what you were trying to avoid by proposing the change in default behaviour. Settling for a compromise feels like giving up on the strengths from both. Cheers, Rafael Ascensão

Re: Git log print commits between a revision range (inclusive)

2019-03-05 Thread Rafael Ascensão
h -. In other words, git log --boundary .. should give you exactly what you asked with the small caveat it marks excluded commits differently. Cheers, Rafael Ascensão

Re: Feeling confused a little bit

2019-03-01 Thread Rafael Ascensão
3e5d2a5d873 for an example. But my nitpick wasn't necessarily because I didn't agree about the way you line wrapped the patch. It was about figuring out if you had a misconfigured editor (that could also be the cause of tabs and spaces mix), which you later mentioned was probably the case. Cheers, Rafael Ascensão

Re: Bug: "orphaned" trees indistinguishable in git log --graph output

2019-02-26 Thread Rafael Ascensão
This issue was mentioned previously here in the mailing list. Here it is for reference: https://public-inbox.org/git/3305f7dc-0044-41fe-8aab-ee800535d...@kde.org/ Cheers, Rafael Ascensão

Re: What's cooking in git.git (Feb 2019, #02; Wed, 6)

2019-02-11 Thread Rafael Ascensão
omething else. For example adding `--list-head` instead, as discussed in early versions of this patch. https://public-inbox.org/git/20181011223457.GB7131@rigel/ Cheers, Rafael Ascensão

Re: Bug: `git commit --fixup` with duplicate commit messages

2018-12-14 Thread Rafael Ascensão
On Fri, Dec 14, 2018 at 12:30:28PM +, Oliver Joseph Ash wrote: > I believe I have found a bug in `git commit --fixup`. That's not a bug, it's actually the documented behaviour of rebase --autosquash. As you figured out, the squash/fixup is based on whether the message has the squash!/fixup! p

Re: [PATCH v2 2/2] branch: Mark and colorize a branch differently if it is checked out in a linked worktree

2018-11-12 Thread Rafael Ascensão
an ok combination. But I can see where personal preference starts to play a role here, as the logical solution isn't good enough. Which makes the case for being able to configure a bit stronger. Cheers, Rafael Ascensão

[PATCH 2/2] refs: fix some exclude patterns being ignored

2018-11-12 Thread Rafael Ascensão
27; which context the exclude pattern is tied to, so refs.c:filter_refs() can decide if it should ignore the prefix when trying to match. Signed-off-by: Rafael Ascensão --- refs.c | 4 t/t6018-rev-list-glob.sh | 24 2 files changed, 16 insertions(

[PATCH 1/2] refs: show --exclude failure with --branches/tags/remotes=glob

2018-11-12 Thread Rafael Ascensão
--branches`, `--tags`, `--remotes` use the optional inclusive glob. Demonstrate this failure. Signed-off-by: Rafael Ascensão --- t/t6018-rev-list-glob.sh | 60 ++-- 1 file changed, 57 insertions(+), 3 deletions(-) diff --git a/t/t6018-rev-list-glob.sh b/t/t601

[PATCH 0/2] fix some exclude patterns being ignored

2018-11-12 Thread Rafael Ascensão
While trying to set up some aliases for my own use, I found out that --exclude with --branches behave differently depending if the latter uses globs. I tried to fix it making my 2nd contribution. :) Cheers, Rafael Ascensão (2): refs: show --exclude failure with --branches/tags/remotes=glob

Re: [PATCH] branch: make --show-current use already resolved HEAD

2018-11-07 Thread Rafael Ascensão
necessary" helper and do everything > inside cmd_branch(), so perhaps this can be made function local, no? > I was not sure if these 3 lines were global intentionally or if it was just an artifact from the past. Since it looks like the latter, I'll make them local. -- Rafael Ascensão

[PATCH] branch: make --show-current use already resolved HEAD

2018-11-07 Thread Rafael Ascensão
logic to the more reliable check for the detached head. Signed-off-by: Rafael Ascensão --- This patch is meant to be either applied or squashed on top of the current series. I am basing the claims of it being more reliable of what Junio suggested on a previous iteration of this series: https://p

Re: Lost changes after merge

2018-10-30 Thread Rafael Ascensão
ced, is that you're using %p with --graph. And --graph enables parent rewriting. Which may surprise you if you don't know what it does. But apart from that, and assuming you only did `git merge f087081868` everything looks normal between those two pastes. Cheers, Rafael Ascensão

Re: the opposite of .gitignore, whitelist

2018-10-26 Thread Rafael Ascensão
the ones that were forcibly added. If needed, git ls-files can be used to list either category. Cheers, Rafael Ascensão

Re: [PATCH v4] branch: introduce --show-current display option

2018-10-17 Thread Rafael Ascensão
die(_("HEAD not found below refs/heads!")); What's being proposed can be achieved with + } else if (show_current) { + if (!filter.detached) + puts(head); + return 0; without failing tests. -- Cheers, Rafael Ascensão

Re: [PATCH v2 1/1] branch: introduce --show-current display option

2018-10-11 Thread Rafael Ascensão
and it would coalesce nicely as long as --list-head conforms with the default formatting for --list. -- Cheers Rafael Ascensão

Re: [PATCH v2 1/1] branch: introduce --show-current display option

2018-10-11 Thread Rafael Ascensão
en HEAD is detached (Showing the detached at message.) Is there a strong reason to *not* "resolve" HEAD when it is attached? Would it be that bad to have some DWIM behaviour here? After all, as HEAD is an invalid name for a branch, nothing would ever match it anyways. Thanks for the input. :) -- Cheers Rafael Ascensão

Re: [PATCH v2 1/1] branch: introduce --show-current display option

2018-10-11 Thread Rafael Ascensão
Otherwise people will eventually start parsing it instead of using the recommended plumbing. -- Cheers Rafael Ascensão -- >8 -- diff --git a/builtin/branch.c b/builtin/branch.c index b67593288c..78a3de526c 100644 --- a/builtin/branch.c +++ b/builtin/branch.c @@ -684,6 +684,17 @@ int cmd_bra

Re: [PATCH 0/2] branch: introduce --current display option

2018-10-10 Thread Rafael Ascensão
g that many new users misunderstand. So, if the original motivation behind this patch is to be able to determine the current branch without using the concept of 'HEAD', my suggestion falls short. Cheers, Rafael Ascensão

Re: [PATCH] branch: colorize branches checked out in a linked working tree the same way as the current branch is colorized

2018-09-27 Thread Rafael Ascensão
On Thu, Sep 27, 2018 at 03:35:59PM -0400, Jeff King wrote: > On Thu, Sep 27, 2018 at 08:28:04PM +0100, Rafael Ascensão wrote: > > But if we're open to change how branches are displayed maybe a config > > option like branch.format (probably not the best name choice) that can &g

Re: [PATCH] branch: colorize branches checked out in a linked working tree the same way as the current branch is colorized

2018-09-27 Thread Rafael Ascensão
. > I still defend using green and dim green for this case. Because all these worktrees are in a sense active. They're checked out in some place. It's just the case that the particular one that we are in is probably more relevant than the others. -- Cheers Rafael Ascensão

Re: [PATCH] branch: colorize branches checked out in a linked working tree the same way as the current branch is colorized

2018-09-27 Thread Rafael Ascensão
mbol and dimmed color would be a nice addition, but I am leaning towards giving the user the ultimate choice on how they want to format their output. (Maybe with dimmed plus symbol as default). -- Cheers, Rafael Ascensão

Re: Adding nested repository with slash adds files instead of gitlink

2018-06-20 Thread Rafael Ascensão
On Tue, Jun 19, 2018 at 11:28 AM Heiko Voigt wrote: > > Interesting and nobody complained to the mailinglist? > On Wed, Jun 20, 2018 at 3:57 PM Duy Nguyen wrote: > > Abusing a long standing bug does not make it a feature. > To make things clear, I wasn't defending if this should be considered a

Re: Adding nested repository with slash adds files instead of gitlink

2018-06-20 Thread Rafael Ascensão
On Wed, Jun 20, 2018 at 5:39 AM Kevin Daudt wrote: > > What this is about that when doing `git add path/` (with trailing /), > This is what I was referring to. If you search for 'Fake Submodules', you'll see that some people were/are intentionally using this instead of subtrees or submodules. Unf

Re: Adding nested repository with slash adds files instead of gitlink

2018-06-19 Thread Rafael Ascensão
On Tue, Jun 19, 2018 at 11:28 AM Heiko Voigt wrote: > > Interesting and nobody complained to the mailinglist? > For reference this was sometimes called "Fake Submodules" online.

Re: [RFC PATCH 1/2] docs: reflect supported fetch options of git pull

2018-06-05 Thread Rafael Ascensão
specifying them again and again. If the path is adding just couple of OPT_PASSTRHU, I could do it. But I'll wait and see if someone picks your parse-options suggestion. Thanks for the review. -- Rafael Ascensão

[RFC PATCH 1/2] docs: reflect supported fetch options of git pull

2018-06-04 Thread Rafael Ascensão
ation consistent with present behaviour by hiding unavailable options only. Reported-by: Marius Giurgi Signed-off-by: Rafael Ascensão --- Marius asked on freenode.#git if pull supported `--prune`, upon inspection seems like the man page was missing some of the supported options and listing others that ar

[RFC PATCH 2/2] pull: allow -e as a synonym for --edit

2018-06-04 Thread Rafael Ascensão
`git pull`'s documentation mentions that `--edit` can be used with short option `-e`. But `git pull` doesn't understand `-e`. To make things consistent, teach `git pull` `-e` for `--edit` Signed-off-by: Rafael Ascensão --- builtin/pull.c | 2 +- 1 file changed, 1 insertion(+),

Re: git update-ref fails to create reference. (bug)

2018-05-05 Thread Rafael Ascensão
00 && test $A = $(cat .git/PSEUDOREF) ' fails/succeeds appropriately in my limited testing. I am busy this weekend, but can try to write some if no one writes it until after the weekend. Cumprimentos, Rafael Ascensão

git update-ref fails to create reference. (bug)

2018-05-04 Thread Rafael Ascensão
f: check return values from read_ref(), 2015-07-15) Thanks, Rafael Ascensão

[PATCH v2] log: add option to choose which refs to decorate

2017-11-21 Thread Rafael Ascensão
efs and shorthand refs) yet remaining compatible with existent commands. Helped-by: Kevin Daudt Helped-by: Junio C Hamano Signed-off-by: Rafael Ascensão --- Notable changes since v1: * Do not change refs.c:for_each_glob_ref. Those changes were meant to address inconsistencies betwee

Re: [PATCH v1 2/2] log: add option to choose which refs to decorate

2017-11-10 Thread Rafael Ascensão
On 07/11/17 00:18, Junio C Hamano wrote: > Jacob Keller writes: > > I would have to say that the describe's one is wrong if it does not > match what for_each_glob_ref() does for the log family of commands' > "--branches=" etc. describe.c::get_name() uses positive > and negative patterns, just li

Re: [PATCH v1 2/2] log: add option to choose which refs to decorate

2017-11-05 Thread Rafael Ascensão
Would checking the output of ref_exists() make sense here? By that I mean, only add a trailing '/*' if the ref doesn't exist. Unless I am missing something obvious this would allow us to keep both shortcuts and exact patterns.

Re: [PATCH v1 1/2] refs: extract function to normalize partial refs

2017-11-05 Thread Rafael Ascensão
On 06/11/17 01:23, Junio C Hamano wrote: > Michael Haggerty writes: > >> [1] I say "almost entirely" because putting them in one function means >> that only `pattern` needs to be scanned for glob characters. But that is >> an unimportant detail. > > That could actually be an important detail, in

Re: [PATCH v1 2/2] log: add option to choose which refs to decorate

2017-11-04 Thread Rafael Ascensão
On 04/11/17 03:49, Junio C Hamano wrote: Rafael Ascensão writes: Using `--exclude=` can help mitigate that verboseness by removing unnecessary 'branches' from the output. However, if the tip of an excluded ref points to an ancestor of a non-excluded ref, git will decorate it regard

Re: [PATCH v1 1/2] refs: extract function to normalize partial refs

2017-11-04 Thread Rafael Ascensão
On 04/11/17 02:27, Junio C Hamano wrote: Rafael Ascensão writes: Signed-off-by: Kevin Daudt Signed-off-by: Rafael Ascensão Could you explain Kevin's sign-off we see above? It is a bit unusual (I am not yet saying it is wrong---I cannot judge until I find out why it is there) to

[PATCH v1 2/2] log: add option to choose which refs to decorate

2017-11-03 Thread Rafael Ascensão
ltiple times. Signed-off-by: Kevin Daudt Signed-off-by: Rafael Ascensão --- Documentation/git-log.txt | 12 ++ builtin/log.c | 10 - log-tree.c| 37 ++--- log-tree.h| 6 ++- pretty.c | 4 +- revision.c

[PATCH v1 1/2] refs: extract function to normalize partial refs

2017-11-03 Thread Rafael Ascensão
which can be reused elsewhere where the same behaviour is needed, and add an ENSURE_GLOB flag to toggle if a trailing '/*' is to be appended to the result. Signed-off-by: Kevin Daudt Signed-off-by: Rafael Ascensão --- refs.c | 34 -- refs.h |

[PATCH v1 0/2] Add option to git log to choose which refs receive decoration

2017-11-03 Thread Rafael Ascensão
ike this is worth 5+ command line options. I personally find that those two are enough. --- Rafael Ascensão Rafael Ascensão (2): refs: extract function to normalize partial refs log: add option to choose which refs to decorate Documentation/git-log.txt | 12 ++ built