Can Phabricator be made to understand git better?

Hi, I have to fight Phab too much because it doesn't understand git or git working conventions very well. For example, the other day I uploaded https://phabricator.haskell.org/D128, built from a single git commit on a feature branch I made on a local feature branch (based on my local master). First, doing that was in itself a bit of a pain. 'arc diff' didn't do the right thing and included some random commit(s) instead of my single commit in my feature branch. Perhaps it tried to diff against origin/master or something, which doesn't make any sense if you know how git is meant to be used (doing that would imply that you have to constantly sync with upstream to create a patch.) I eventually got it to used the right commit by doing 'arc diff <commit id>`. Second, today when I wanted to update my commit to address some review comments I 1) amended my commit in my feature branch and 2) ran 'arc diff', expecting that it would do the right thing. It didn't and now D128 contains a bunch of changes that aren't mine. I don't know where they came from. Is there a way to configure Phab so it works with git established workflows? -- Johan

On 2014-08-10 at 12:17:56 +0200, Johan Tibell wrote: [...]
First, doing that was in itself a bit of a pain. 'arc diff' didn't do the right thing and included some random commit(s) instead of my single commit in my feature branch. Perhaps it tried to diff against origin/master or something, which doesn't make any sense if you know how git is meant to be used (doing that would imply that you have to constantly sync with upstream to create a patch.) I eventually got it to used the right commit by doing 'arc diff <commit id>`.
While this doesn't answer your question (I'm looking forward to Austin chiming in to answer as I'd like to understand 'arc diff' better myself), I've been using arc which myself before performing 'arc diff's to reduce my surprise/confusion about which commits 'arc diff' will effectively pick. HTH, hvr

You normally want to do "arc diff HEAD^" in my experience. I believe you get to choose this to be the default when you initialize arc the first time, and I set it to HEAD^ for my arc. I'm not sure if you can change the default later, but you can always say "arc diff HEAD^". Cheers, Simon On 10/08/2014 12:17, Johan Tibell wrote:
Hi,
I have to fight Phab too much because it doesn't understand git or git working conventions very well. For example, the other day I uploaded https://phabricator.haskell.org/D128, built from a single git commit on a feature branch I made on a local feature branch (based on my local master).
First, doing that was in itself a bit of a pain. 'arc diff' didn't do the right thing and included some random commit(s) instead of my single commit in my feature branch. Perhaps it tried to diff against origin/master or something, which doesn't make any sense if you know how git is meant to be used (doing that would imply that you have to constantly sync with upstream to create a patch.) I eventually got it to used the right commit by doing 'arc diff <commit id>`.
Second, today when I wanted to update my commit to address some review comments I 1) amended my commit in my feature branch and 2) ran 'arc diff', expecting that it would do the right thing. It didn't and now D128 contains a bunch of changes that aren't mine. I don't know where they came from.
Is there a way to configure Phab so it works with git established workflows?
-- Johan
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs

I think this should set the default for you: arc set-config base "git:HEAD^" see https://secure.phabricator.com/book/phabricator/article/arcanist_commit_rang... Cheers, Simon On 04/09/2014 10:56, Simon Marlow wrote:
You normally want to do "arc diff HEAD^" in my experience. I believe you get to choose this to be the default when you initialize arc the first time, and I set it to HEAD^ for my arc. I'm not sure if you can change the default later, but you can always say "arc diff HEAD^".
Cheers, Simon
On 10/08/2014 12:17, Johan Tibell wrote:
Hi,
I have to fight Phab too much because it doesn't understand git or git working conventions very well. For example, the other day I uploaded https://phabricator.haskell.org/D128, built from a single git commit on a feature branch I made on a local feature branch (based on my local master).
First, doing that was in itself a bit of a pain. 'arc diff' didn't do the right thing and included some random commit(s) instead of my single commit in my feature branch. Perhaps it tried to diff against origin/master or something, which doesn't make any sense if you know how git is meant to be used (doing that would imply that you have to constantly sync with upstream to create a patch.) I eventually got it to used the right commit by doing 'arc diff <commit id>`.
Second, today when I wanted to update my commit to address some review comments I 1) amended my commit in my feature branch and 2) ran 'arc diff', expecting that it would do the right thing. It didn't and now D128 contains a bunch of changes that aren't mine. I don't know where they came from.
Is there a way to configure Phab so it works with git established workflows?
-- Johan
_______________________________________________ ghc-devs mailing list ghc-devs@haskell.org http://www.haskell.org/mailman/listinfo/ghc-devs
participants (3)
-
Herbert Valerio Riedel
-
Johan Tibell
-
Simon Marlow